1 RUN: llvm-dsymutil -v -parse-only -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 | FileCheck %s
2 RUN: llvm-dsymutil -v -parse-only -oso-prepend-path=%p %p/Inputs/basic-lto.macho.x86_64 | FileCheck %s --check-prefix=CHECK-LTO
3 RUN: llvm-dsymutil -v -parse-only %p/Inputs/basic.macho.x86_64 2>&1 | FileCheck %s --check-prefix=NOT-FOUND
4 RUN: not llvm-dsymutil -v -parse-only %p/Inputs/inexistant 2>&1 | FileCheck %s --check-prefix=NO-EXECUTABLE
5 Check that We can parse the debug map of the basic executable.
9 CHECK: /Inputs/basic1.macho.x86_64.o:
10 CHECK: 0000000000000000 => 0000000100000ea0 _main
11 CHECK: /Inputs/basic2.macho.x86_64.o:
12 CHECK: 0000000000000310 => 0000000100001000 _baz
13 CHECK: 0000000000000020 => 0000000100000ed0 _foo
14 CHECK: 0000000000000070 => 0000000100000f20 _inc
15 CHECK: 0000000000000560 => 0000000100001008 _private_int
16 CHECK: /Inputs/basic3.macho.x86_64.o:
17 CHECK: 0000000000000020 => 0000000100000f40 _bar
18 CHECK: 0000000000000070 => 0000000100000f90 _inc
19 CHECK: 0000000000000004 => 0000000100001004 _val
23 Check that we can parse the debug-map of the basic-lto executable
27 CHECK-LTO: /Inputs/basic-lto.macho.x86_64.o:
28 CHECK-LTO: 0000000000000050 => 0000000100000f90 _bar
29 CHECK-LTO: 0000000000000658 => 0000000100001000 _baz
30 CHECK-LTO: 0000000000000010 => 0000000100000f50 _foo
31 CHECK-LTO: 0000000000000000 => 0000000100000f40 _main
32 CHECK-LTO: 00000000000008e8 => 0000000100001008 _private_int
33 CHECK-LTO: 00000000000008ec => 0000000100001004 _val
34 CHECK-LTO: END DEBUG MAP
36 Check that we warn about missing object files (this presumes that the files aren't
37 present in the machine's /Inputs/ folder, which should be a pretty safe bet).
39 NOT-FOUND: cannot open{{.*}}"/Inputs/basic1.macho.x86_64.o": {{[Nn]o}} such file
40 NOT-FOUND: cannot open{{.*}}"/Inputs/basic2.macho.x86_64.o": {{[Nn]o}} such file
41 NOT-FOUND: cannot open{{.*}}"/Inputs/basic3.macho.x86_64.o": {{[Nn]o}} such file
43 NOT-FOUND-NEXT: END DEBUG MAP
45 Check that we correctly error out on invalid executatble.
47 NO-EXECUTABLE: cannot parse{{.*}}/inexistant": {{[Nn]o}} such file
48 NO-EXECUTABLE-NOT: DEBUG MAP