2018-03-18 19:38:41 +08:00
|
|
|
RUN: dsymutil -dump-debug-map -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 | FileCheck %s
|
|
|
|
RUN: dsymutil -dump-debug-map -oso-prepend-path=%p %p/Inputs/basic-lto.macho.x86_64 | FileCheck %s --check-prefix=CHECK-LTO
|
2018-06-30 00:51:52 +08:00
|
|
|
RUN: dsymutil -verbose -dump-debug-map -oso-prepend-path=%p %p/Inputs/basic-archive.macho.x86_64 2>&1 | FileCheck %s --check-prefix=CHECK-ARCHIVE
|
2018-03-18 19:38:41 +08:00
|
|
|
RUN: dsymutil -dump-debug-map %p/Inputs/basic.macho.x86_64 2>&1 | FileCheck %s --check-prefix=NOT-FOUND
|
|
|
|
RUN: not dsymutil -dump-debug-map %p/Inputs/inexistant 2>&1 | FileCheck %s --check-prefix=NO-EXECUTABLE
|
2015-01-06 05:29:28 +08:00
|
|
|
|
|
|
|
|
2014-12-13 01:31:24 +08:00
|
|
|
Check that We can parse the debug map of the basic executable.
|
|
|
|
|
|
|
|
CHECK-NOT: error
|
2015-06-02 05:12:45 +08:00
|
|
|
CHECK: ---
|
2015-07-24 14:41:04 +08:00
|
|
|
CHECK: triple: 'x86_64-apple-darwin'
|
2015-08-26 13:09:59 +08:00
|
|
|
CHECK: binary-path:{{.*}}/Inputs/basic.macho.x86_64
|
2015-06-02 05:12:45 +08:00
|
|
|
CHECK: filename:{{.*}}/Inputs/basic1.macho.x86_64.o
|
|
|
|
CHECK-DAG: sym: _main, objAddr: 0x0000000000000000, binAddr: 0x0000000100000EA0, size: 0x00000024
|
|
|
|
CHECK: filename{{.*}}/Inputs/basic2.macho.x86_64.o
|
|
|
|
CHECK-DAG: sym: _baz, objAddr: 0x0000000000000310, binAddr: 0x0000000100001000, size: 0x00000000
|
|
|
|
CHECK-DAG: sym: _foo, objAddr: 0x0000000000000020, binAddr: 0x0000000100000ED0, size: 0x00000050
|
|
|
|
CHECK-DAG: sym: _inc, objAddr: 0x0000000000000070, binAddr: 0x0000000100000F20, size: 0x00000017
|
|
|
|
CHECK-DAG: sym: _private_int, objAddr: 0x0000000000000560, binAddr: 0x0000000100001008, size: 0x00000000
|
|
|
|
CHECK: filename{{.*}}/Inputs/basic3.macho.x86_64.o
|
|
|
|
CHECK-DAG: sym: _bar, objAddr: 0x0000000000000020, binAddr: 0x0000000100000F40, size: 0x00000050
|
|
|
|
CHECK-DAG: sym: _inc, objAddr: 0x0000000000000070, binAddr: 0x0000000100000F90, size: 0x00000019
|
2016-01-31 12:29:34 +08:00
|
|
|
CHECK-DAG: sym: _val, binAddr: 0x0000000100001004, size: 0x00000000
|
2015-06-02 05:12:45 +08:00
|
|
|
CHECK: ...
|
2014-12-13 01:31:24 +08:00
|
|
|
|
|
|
|
|
|
|
|
Check that we can parse the debug-map of the basic-lto executable
|
|
|
|
|
|
|
|
CHECK-LTO-NOT: error
|
2015-06-02 05:12:45 +08:00
|
|
|
CHECK-LTO: ---
|
2015-07-24 14:41:04 +08:00
|
|
|
CHECK-LTO: triple: 'x86_64-apple-darwin'
|
2015-08-26 13:09:59 +08:00
|
|
|
CHECK-LTO: binary-path:{{.*}}/Inputs/basic-lto.macho.x86_64
|
2015-06-02 05:12:45 +08:00
|
|
|
CHECK-LTO: /Inputs/basic-lto.macho.x86_64.o
|
|
|
|
CHECK-LTO-DAG: sym: _bar, objAddr: 0x0000000000000050, binAddr: 0x0000000100000F90, size: 0x00000024
|
|
|
|
CHECK-LTO-DAG: sym: _baz, objAddr: 0x0000000000000658, binAddr: 0x0000000100001000, size: 0x00000000
|
|
|
|
CHECK-LTO-DAG: sym: _foo, objAddr: 0x0000000000000010, binAddr: 0x0000000100000F50, size: 0x00000040
|
|
|
|
CHECK-LTO-DAG: sym: _main, objAddr: 0x0000000000000000, binAddr: 0x0000000100000F40, size: 0x00000010
|
|
|
|
CHECK-LTO-DAG: sym: _private_int, objAddr: 0x00000000000008E8, binAddr: 0x0000000100001008, size: 0x00000000
|
|
|
|
CHECK-LTO-DAG: sym: _val, objAddr: 0x00000000000008EC, binAddr: 0x0000000100001004, size: 0x00000000
|
|
|
|
CHECK-LTO: ...
|
2014-12-13 01:31:24 +08:00
|
|
|
|
2015-01-06 05:29:28 +08:00
|
|
|
Check thet we correctly handle debug maps with archive members (including only
|
|
|
|
opening the archive once if mulitple of its members are used).
|
|
|
|
|
|
|
|
CHECK-ARCHIVE: trying to open {{.*}}basic-archive.macho.x86_64'
|
2018-06-30 00:51:52 +08:00
|
|
|
CHECK-ARCHIVE-NEXT: loaded object.
|
2015-01-06 05:29:28 +08:00
|
|
|
CHECK-ARCHIVE-NEXT: trying to open {{.*}}/Inputs/basic1.macho.x86_64.o'
|
2018-06-30 00:51:52 +08:00
|
|
|
CHECK-ARCHIVE-NEXT: loaded object.
|
2015-01-06 05:29:28 +08:00
|
|
|
CHECK-ARCHIVE-NEXT: trying to open {{.*}}/libbasic.a(basic2.macho.x86_64.o)'
|
2018-06-30 00:51:52 +08:00
|
|
|
CHECK-ARCHIVE-NEXT: loaded archive {{.*}}/libbasic.a'
|
|
|
|
CHECK-ARCHIVE-NEXT: found member in archive.
|
2015-01-06 05:29:28 +08:00
|
|
|
CHECK-ARCHIVE-NEXT: trying to open {{.*}}/libbasic.a(basic3.macho.x86_64.o)'
|
2018-06-30 00:51:52 +08:00
|
|
|
CHECK-ARCHIVE-NEXT: found member in archive.
|
2015-06-02 05:12:45 +08:00
|
|
|
CHECK-ARCHIVE: ---
|
2015-07-24 14:41:04 +08:00
|
|
|
CHECK-ARCHIVE: triple: 'x86_64-apple-darwin'
|
2015-08-26 13:09:59 +08:00
|
|
|
CHECK-ARCHIVE: binary-path:{{.*}}/Inputs/basic-archive.macho.x86_64
|
2015-06-02 05:12:45 +08:00
|
|
|
CHECK-ARCHIVE: /Inputs/basic1.macho.x86_64.o
|
|
|
|
CHECK-ARCHIVE-DAG: sym: _main, objAddr: 0x0000000000000000, binAddr: 0x0000000100000EA0, size: 0x00000024
|
|
|
|
CHECK-ARCHIVE: /Inputs/./libbasic.a(basic2.macho.x86_64.o)
|
|
|
|
CHECK-ARCHIVE-DAG: sym: _baz, objAddr: 0x0000000000000310, binAddr: 0x0000000100001000, size: 0x00000000
|
|
|
|
CHECK-ARCHIVE-DAG: sym: _foo, objAddr: 0x0000000000000020, binAddr: 0x0000000100000ED0, size: 0x00000050
|
|
|
|
CHECK-ARCHIVE-DAG: sym: _inc, objAddr: 0x0000000000000070, binAddr: 0x0000000100000F20, size: 0x00000017
|
|
|
|
CHECK-ARCHIVE-DAG: sym: _private_int, objAddr: 0x0000000000000560, binAddr: 0x0000000100001004, size: 0x00000000
|
|
|
|
CHECK-ARCHIVE: /Inputs/./libbasic.a(basic3.macho.x86_64.o)
|
|
|
|
CHECK-ARCHIVE-DAG: sym: _bar, objAddr: 0x0000000000000020, binAddr: 0x0000000100000F40, size: 0x00000050
|
|
|
|
CHECK-ARCHIVE-DAG: sym: _inc, objAddr: 0x0000000000000070, binAddr: 0x0000000100000F90, size: 0x00000019
|
2016-01-31 12:29:34 +08:00
|
|
|
CHECK-ARCHIVE-DAG: sym: _val, binAddr: 0x0000000100001008, size: 0x00000000
|
2015-06-02 05:12:45 +08:00
|
|
|
CHECK-ARCHIVE: ...
|
2015-01-06 05:29:28 +08:00
|
|
|
|
2014-12-13 01:31:24 +08:00
|
|
|
Check that we warn about missing object files (this presumes that the files aren't
|
|
|
|
present in the machine's /Inputs/ folder, which should be a pretty safe bet).
|
|
|
|
|
2018-03-14 17:34:54 +08:00
|
|
|
warning: (x86_64) /Inputs/basic1.macho.x86_64.o unable to open object file:
|
|
|
|
NOT-FOUND: warning: (x86_64) {{.*}}/Inputs/basic1.macho.x86_64.o unable to open object file: {{[Nn]o}} such file
|
|
|
|
NOT-FOUND: warning: (x86_64) {{.*}}/Inputs/basic2.macho.x86_64.o unable to open object file: {{[Nn]o}} such file
|
|
|
|
NOT-FOUND: warning: (x86_64) {{.*}}/Inputs/basic3.macho.x86_64.o unable to open object file: {{[Nn]o}} such file
|
2015-06-02 05:12:45 +08:00
|
|
|
NOT-FOUND: ---
|
2015-07-24 14:41:04 +08:00
|
|
|
NOT-FOUND-NEXT: triple: 'x86_64-apple-darwin'
|
2015-08-26 13:09:59 +08:00
|
|
|
NOT-FOUND-NEXT: binary-path:{{.*}}/Inputs/basic.macho.x86_64
|
2015-06-02 05:12:45 +08:00
|
|
|
NOT-FOUND-NEXT: ...
|
2014-12-13 01:31:24 +08:00
|
|
|
|
2018-04-02 18:40:43 +08:00
|
|
|
Check that we correctly error out on invalid executable.
|
2014-12-13 01:31:24 +08:00
|
|
|
|
2018-03-13 23:47:38 +08:00
|
|
|
NO-EXECUTABLE: cannot parse{{.*}}/inexistant': {{[Nn]o}} such file
|
2015-06-02 05:12:45 +08:00
|
|
|
NO-EXECUTABLE-NOT: ---
|