2015-07-30 06:29:34 +08:00
|
|
|
RUN: llvm-dsymutil -dump-debug-map -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 | FileCheck %s
|
|
|
|
RUN: llvm-dsymutil -dump-debug-map -oso-prepend-path=%p %p/Inputs/basic-lto.macho.x86_64 | FileCheck %s --check-prefix=CHECK-LTO
|
|
|
|
RUN: llvm-dsymutil -verbose -dump-debug-map -oso-prepend-path=%p %p/Inputs/basic-archive.macho.x86_64 | FileCheck %s --check-prefix=CHECK-ARCHIVE
|
|
|
|
RUN: llvm-dsymutil -dump-debug-map %p/Inputs/basic.macho.x86_64 2>&1 | FileCheck %s --check-prefix=NOT-FOUND
|
|
|
|
RUN: not llvm-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
|
|
|
|
CHECK-DAG: sym: _val, objAddr: 0x0000000000000004, binAddr: 0x0000000100001004, size: 0x00000000
|
|
|
|
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'
|
|
|
|
CHECK-ARCHIVE-NEXT: loaded file.
|
|
|
|
CHECK-ARCHIVE-NEXT: trying to open {{.*}}/Inputs/basic1.macho.x86_64.o'
|
|
|
|
CHECK-ARCHIVE-NEXT: loaded file.
|
|
|
|
CHECK-ARCHIVE-NEXT: trying to open {{.*}}/libbasic.a(basic2.macho.x86_64.o)'
|
|
|
|
CHECK-ARCHIVE-NEXT: opened new archive {{.*}}/libbasic.a'
|
|
|
|
CHECK-ARCHIVE-NEXT: found member in current archive.
|
|
|
|
CHECK-ARCHIVE-NEXT: trying to open {{.*}}/libbasic.a(basic3.macho.x86_64.o)'
|
|
|
|
CHECK-ARCHIVE-NEXT: found member in current 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
|
|
|
|
CHECK-ARCHIVE-DAG: sym: _val, objAddr: 0x0000000000000004, binAddr: 0x0000000100001008, size: 0x00000000
|
|
|
|
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).
|
|
|
|
|
2014-12-13 02:52:07 +08:00
|
|
|
NOT-FOUND: cannot open{{.*}}"/Inputs/basic1.macho.x86_64.o": {{[Nn]o}} such file
|
|
|
|
NOT-FOUND: cannot open{{.*}}"/Inputs/basic2.macho.x86_64.o": {{[Nn]o}} such file
|
|
|
|
NOT-FOUND: cannot open{{.*}}"/Inputs/basic3.macho.x86_64.o": {{[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
|
|
|
|
|
|
|
Check that we correctly error out on invalid executatble.
|
|
|
|
|
2014-12-13 02:52:07 +08:00
|
|
|
NO-EXECUTABLE: cannot parse{{.*}}/inexistant": {{[Nn]o}} such file
|
2015-06-02 05:12:45 +08:00
|
|
|
NO-EXECUTABLE-NOT: ---
|