1RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400559" > %t.input 2RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64.debuglink 0x400559" >> %t.input 3RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400436" >> %t.input 4RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400528" >> %t.input 5RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400586" >> %t.input 6RUN: echo "%p/Inputs/dwarfdump-test2.elf-x86-64 0x4004e8" >> %t.input 7RUN: echo "%p/Inputs/dwarfdump-test2.elf-x86-64 0x4004f4" >> %t.input 8RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" >> %t.input 9RUN: echo "%p/Inputs/dwarfdump-inl-test.elf-x86-64 0x8dc" >> %t.input 10RUN: echo "%p/Inputs/dwarfdump-inl-test.elf-x86-64 0xa05" >> %t.input 11RUN: echo "%p/Inputs/dwarfdump-inl-test.elf-x86-64 0x987" >> %t.input 12RUN: echo "%p/Inputs/dwarfdump-inl-test.high_pc.elf-x86-64 0x568" >> %t.input 13RUN: echo "\"%p/Inputs/dwarfdump-test3.elf-x86-64 space\" 0x640" >> %t.input 14RUN: echo "\"%p/Inputs/dwarfdump-test3.elf-x86-64 space\" 0x633" >> %t.input 15RUN: echo "\"%p/Inputs/dwarfdump-test3.elf-x86-64 space\" 0x62d" >> %t.input 16RUN: echo "%p/Inputs/macho-universal 0x1f84" >> %t.input 17RUN: echo "%p/Inputs/macho-universal:i386 0x1f67" >> %t.input 18RUN: echo "%p/Inputs/macho-universal:x86_64 0x100000f05" >> %t.input 19RUN: echo "%p/Inputs/llvm-symbolizer-dwo-test 0x400514" >> %t.input 20RUN: echo "%p/Inputs/fission-ranges.elf-x86_64 0x720" >> %t.input 21RUN: echo "%p/Inputs/arange-overlap.elf-x86_64 0x714" >> %t.input 22RUN: cp %p/Inputs/split-dwarf-test.dwo %T 23RUN: echo "%p/Inputs/split-dwarf-test 0x4004d0" >> %t.input 24RUN: echo "%p/Inputs/split-dwarf-test 0x4004c0" >> %t.input 25RUN: echo "%p/Inputs/cross-cu-inlining.x86_64-macho.o 0x17" >> %t.input 26 27RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \ 28RUN: --default-arch=i386 < %t.input | FileCheck %s 29 30CHECK: main 31CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16 32 33CHECK: main 34CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16 35 36CHECK: _start 37 38CHECK: _Z1fii 39CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:11 40 41CHECK: DummyClass 42CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:4 43 44CHECK: a 45CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test2-helper.cc:2 46 47CHECK: main 48CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test2-main.cc:4 49 50CHECK: _Z1cv 51CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test4-part1.cc:2 52 53CHECK: inlined_h 54CHECK-NEXT: dwarfdump-inl-test.h:2 55CHECK-NEXT: inlined_g 56CHECK-NEXT: dwarfdump-inl-test.h:7 57CHECK-NEXT: inlined_f 58CHECK-NEXT: dwarfdump-inl-test.cc:3 59CHECK-NEXT: main 60CHECK-NEXT: dwarfdump-inl-test.cc:8 61 62CHECK: inlined_g 63CHECK-NEXT: dwarfdump-inl-test.h:7 64CHECK-NEXT: inlined_f 65CHECK-NEXT: dwarfdump-inl-test.cc:3 66CHECK-NEXT: main 67CHECK-NEXT: dwarfdump-inl-test.cc:8 68 69CHECK: inlined_f 70CHECK-NEXT: dwarfdump-inl-test.cc:3 71CHECK-NEXT: main 72CHECK-NEXT: dwarfdump-inl-test.cc:8 73 74CHECK: inlined_h 75CHECK-NEXT: dwarfdump-inl-test.h:3 76CHECK-NEXT: inlined_g 77CHECK-NEXT: dwarfdump-inl-test.h:7 78CHECK-NEXT: inlined_f 79CHECK-NEXT: dwarfdump-inl-test.cc:3 80CHECK-NEXT: main 81CHECK-NEXT: dwarfdump-inl-test.cc:8 82 83CHECK: C 84CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test3.cc:3 85 86CHECK: _Z3do1v 87CHECK-NEXT: /tmp/include{{[/\\]}}dwarfdump-test3-decl.h:7 88 89CHECK: _Z3do2v 90CHECK-NEXT: /tmp/dbginfo{{[/\\]}}include{{[/\\]}}dwarfdump-test3-decl2.h:1 91 92CHECK: main 93CHECK: _Z3inci 94CHECK: _Z3inci 95 96CHECK: main 97CHECK-NEXT: llvm-symbolizer-dwo-test.cc:11 98 99CHECK: main 100CHECK-NEXT: {{.*}}fission-ranges.cc:6 101 102CHECK: _ZN1S3bazEv 103CHECK-NEXT: {{.*}}arange-overlap.cc:6 104 105CHECK: _Z3fooi 106CHECK-NEXT: {{.*}}split-dwarf-test.cc 107CHECK-NEXT: main 108CHECK-NEXT: {{.*}}split-dwarf-test.cc 109 110CHECK: _Z3fooi 111CHECK-NEXT: {{.*}}split-dwarf-test.cc 112 113; func has been inlined into main by LTO. Check that the symbolizer is able 114; to resolve the cross-cu reference and retrieve func's name 115CHECK: func 116CHECK-NEXT: /tmp{{[/\\]}}cross-cu-inlining.c:16:3 117CHECK-NEXT: main 118CHECK-NEXT: /tmp{{[/\\]}}cross-cu-inlining.c:11:0 119 120RUN: echo "unexisting-file 0x1234" > %t.input2 121RUN: llvm-symbolizer < %t.input2 122 123RUN: echo "%p/Inputs/macho-universal 0x1f84" > %t.input3 124RUN: llvm-symbolizer < %t.input3 | FileCheck %s --check-prefix=UNKNOWN-ARCH 125 126UNKNOWN-ARCH-NOT: main 127UNKNOWN-ARCH: ?? 128UNKNOWN-ARCH-NOT: main 129 130RUN: echo "0x400559" > %t.input4 131RUN: echo "0x400436" >> %t.input4 132RUN: llvm-symbolizer --obj %p/Inputs/dwarfdump-test.elf-x86-64 < %t.input4 \ 133RUN: | FileCheck %s --check-prefix=BINARY 134 135BINARY: main 136BINARY-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16 137BINARY: _start 138 139RUN: echo "0x400720" > %t.input5 140RUN: echo "0x4004a0" >> %t.input5 141RUN: echo "0x4006f0" >> %t.input5 142RUN: llvm-symbolizer --obj %p/Inputs/llvm-symbolizer-test.elf-x86-64 < %t.input5 \ 143RUN: | FileCheck %s --check-prefix=BINARY_C 144 145BINARY_C: main 146BINARY_C-NEXT: /tmp/dbginfo{{[/\\]}}llvm-symbolizer-test.c:10 147BINARY_C: _start 148BINARY_C: {{g$}} 149 150RUN: echo "0x1f1" > %t.input6 151RUN: llvm-symbolizer --obj %p/Inputs/shared-object-stripped.elf-i386 < %t.input6 \ 152RUN: | FileCheck %s --check-prefix=STRIPPED 153 154STRIPPED: global_func 155 156RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" > %t.input7 157RUN: llvm-symbolizer --functions=short --use-symbol-table=false --demangle=false < %t.input7 \ 158RUN: | FileCheck %s --check-prefix=SHORT_FUNCTION_NAME 159 160SHORT_FUNCTION_NAME-NOT: _Z1cv 161