2013-04-05 16:30:13 +08:00
|
|
|
RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400559" > %t.input
|
2013-08-15 01:09:30 +08:00
|
|
|
RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64.debuglink 0x400559" >> %t.input
|
2017-08-16 05:02:17 +08:00
|
|
|
RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400436" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400528" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400586" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/dwarfdump-test2.elf-x86-64 0x4004e8" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/dwarfdump-test2.elf-x86-64 0x4004f4" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/dwarfdump-inl-test.elf-x86-64 0x8dc" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/dwarfdump-inl-test.elf-x86-64 0xa05" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/dwarfdump-inl-test.elf-x86-64 0x987" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/dwarfdump-inl-test.high_pc.elf-x86-64 0x568" >> %t.input
|
|
|
|
RUN: cp "%p/Inputs/dwarfdump-test3.elf-x86-64-space" "%T/dwarfdump-test3.elf-x86-64 space"
|
|
|
|
RUN: echo "\"%T/dwarfdump-test3.elf-x86-64 space\" 0x640" >> %t.input
|
|
|
|
RUN: echo "\"%T/dwarfdump-test3.elf-x86-64 space\" 0x633" >> %t.input
|
|
|
|
RUN: echo "\"%T/dwarfdump-test3.elf-x86-64 space\" 0x62d" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/macho-universal 0x1f84" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/macho-universal:i386 0x1f67" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/macho-universal:x86_64 0x100000f05" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/llvm-symbolizer-dwo-test 0x400514" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/fission-ranges.elf-x86_64 0x720" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/arange-overlap.elf-x86_64 0x714" >> %t.input
|
2014-09-06 03:29:45 +08:00
|
|
|
RUN: cp %p/Inputs/split-dwarf-test.dwo %T
|
2017-08-16 05:02:17 +08:00
|
|
|
RUN: echo "%p/Inputs/split-dwarf-test 0x4005d4" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/split-dwarf-test 0x4005c4" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/cross-cu-inlining.x86_64-macho.o 0x17" >> %t.input
|
2017-05-20 11:32:49 +08:00
|
|
|
RUN: cp %p/Inputs/split-dwarf-multiple-cu.dwo %T
|
2017-08-16 05:02:17 +08:00
|
|
|
RUN: echo "%p/Inputs/split-dwarf-multiple-cu.o 0x4" >> %t.input
|
2017-05-22 15:02:47 +08:00
|
|
|
RUN: cp %p/Inputs/split-dwarf-addr-object-relocation.dwo %T
|
2017-08-16 05:02:17 +08:00
|
|
|
RUN: echo "%p/Inputs/split-dwarf-addr-object-relocation.o 0x14" >> %t.input
|
2017-05-23 14:48:53 +08:00
|
|
|
RUN: cp %p/Inputs/split-dwarf-dwp.o %T
|
|
|
|
RUN: cp %p/Inputs/split-dwarf-dwp.o.dwp %T
|
2017-08-16 05:02:17 +08:00
|
|
|
RUN: echo "%T/split-dwarf-dwp.o 0x4" >> %t.input
|
2013-04-05 16:30:13 +08:00
|
|
|
|
2014-05-17 08:07:48 +08:00
|
|
|
RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \
|
2017-08-16 05:02:17 +08:00
|
|
|
RUN: --default-arch=i386 < %t.input | FileCheck --check-prefix=CHECK --check-prefix=SPLIT --check-prefix=DWO %s
|
2016-04-23 05:32:59 +08:00
|
|
|
|
|
|
|
Ensure we get the same results in the absence of gmlt-like data in the executable but the presence of a .dwo file
|
|
|
|
|
2017-08-16 05:02:17 +08:00
|
|
|
RUN: echo "%p/Inputs/split-dwarf-test-nogmlt 0x4005d4" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/split-dwarf-test-nogmlt 0x4005c4" >> %t.input
|
2016-04-23 05:32:59 +08:00
|
|
|
RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \
|
2017-08-16 05:02:17 +08:00
|
|
|
RUN: --default-arch=i386 < %t.input | FileCheck --check-prefix=SPLIT --check-prefix=DWO %s
|
2016-04-23 05:32:59 +08:00
|
|
|
|
|
|
|
Ensure we get gmlt like results in the absence of a .dwo file but the presence of gmlt-like data in the executable
|
|
|
|
|
|
|
|
RUN: rm %T/split-dwarf-test.dwo
|
2017-08-16 05:02:17 +08:00
|
|
|
RUN: echo "%p/Inputs/split-dwarf-test 0x4005d4" >> %t.input
|
|
|
|
RUN: echo "%p/Inputs/split-dwarf-test 0x4005c4" >> %t.input
|
2016-04-23 05:32:59 +08:00
|
|
|
RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \
|
2017-08-16 05:02:17 +08:00
|
|
|
RUN: --default-arch=i386 < %t.input | FileCheck --check-prefix=SPLIT --check-prefix=NODWO %s
|
2013-04-05 16:30:13 +08:00
|
|
|
|
2017-07-30 09:34:08 +08:00
|
|
|
RUN: cp %p/Inputs/split-dwarf-dwp.o %T/split-dwarf-dwp-different-name.o
|
2017-08-03 04:16:22 +08:00
|
|
|
RUN: echo "%T/split-dwarf-dwp-different-name.o 0x54" > %t.input
|
2017-07-30 09:34:08 +08:00
|
|
|
RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \
|
|
|
|
RUN: --default-arch=i386 --dwp=%p/Inputs/split-dwarf-dwp.o.dwp < %t.input | FileCheck --check-prefix=DWP %s
|
|
|
|
|
2013-04-05 16:30:13 +08:00
|
|
|
CHECK: main
|
|
|
|
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16
|
2013-06-04 15:57:38 +08:00
|
|
|
|
2013-08-15 01:09:30 +08:00
|
|
|
CHECK: main
|
|
|
|
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16
|
|
|
|
|
2013-06-04 15:57:38 +08:00
|
|
|
CHECK: _start
|
|
|
|
|
2014-05-20 02:45:32 +08:00
|
|
|
CHECK: _Z1fii
|
|
|
|
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:11
|
|
|
|
|
|
|
|
CHECK: DummyClass
|
|
|
|
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:4
|
|
|
|
|
|
|
|
CHECK: a
|
|
|
|
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test2-helper.cc:2
|
|
|
|
|
|
|
|
CHECK: main
|
|
|
|
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test2-main.cc:4
|
|
|
|
|
2013-04-05 16:30:13 +08:00
|
|
|
CHECK: _Z1cv
|
|
|
|
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test4-part1.cc:2
|
2013-06-04 15:57:38 +08:00
|
|
|
|
2013-04-05 16:30:13 +08:00
|
|
|
CHECK: inlined_h
|
|
|
|
CHECK-NEXT: dwarfdump-inl-test.h:2
|
|
|
|
CHECK-NEXT: inlined_g
|
|
|
|
CHECK-NEXT: dwarfdump-inl-test.h:7
|
|
|
|
CHECK-NEXT: inlined_f
|
|
|
|
CHECK-NEXT: dwarfdump-inl-test.cc:3
|
|
|
|
CHECK-NEXT: main
|
2014-05-20 02:45:32 +08:00
|
|
|
CHECK-NEXT: dwarfdump-inl-test.cc:8
|
|
|
|
|
|
|
|
CHECK: inlined_g
|
|
|
|
CHECK-NEXT: dwarfdump-inl-test.h:7
|
|
|
|
CHECK-NEXT: inlined_f
|
|
|
|
CHECK-NEXT: dwarfdump-inl-test.cc:3
|
|
|
|
CHECK-NEXT: main
|
|
|
|
CHECK-NEXT: dwarfdump-inl-test.cc:8
|
|
|
|
|
|
|
|
CHECK: inlined_f
|
|
|
|
CHECK-NEXT: dwarfdump-inl-test.cc:3
|
|
|
|
CHECK-NEXT: main
|
|
|
|
CHECK-NEXT: dwarfdump-inl-test.cc:8
|
2013-04-05 17:22:24 +08:00
|
|
|
|
2013-10-31 04:27:17 +08:00
|
|
|
CHECK: inlined_h
|
|
|
|
CHECK-NEXT: dwarfdump-inl-test.h:3
|
|
|
|
CHECK-NEXT: inlined_g
|
|
|
|
CHECK-NEXT: dwarfdump-inl-test.h:7
|
|
|
|
CHECK-NEXT: inlined_f
|
|
|
|
CHECK-NEXT: dwarfdump-inl-test.cc:3
|
|
|
|
CHECK-NEXT: main
|
2014-05-20 02:45:32 +08:00
|
|
|
CHECK-NEXT: dwarfdump-inl-test.cc:8
|
|
|
|
|
|
|
|
CHECK: C
|
|
|
|
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test3.cc:3
|
|
|
|
|
|
|
|
CHECK: _Z3do1v
|
|
|
|
CHECK-NEXT: /tmp/include{{[/\\]}}dwarfdump-test3-decl.h:7
|
2013-10-31 04:27:17 +08:00
|
|
|
|
2014-05-20 02:45:32 +08:00
|
|
|
CHECK: _Z3do2v
|
|
|
|
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}include{{[/\\]}}dwarfdump-test3-decl2.h:1
|
2013-06-03 22:12:39 +08:00
|
|
|
|
2013-06-28 22:25:52 +08:00
|
|
|
CHECK: main
|
|
|
|
CHECK: _Z3inci
|
|
|
|
CHECK: _Z3inci
|
2013-06-28 16:15:40 +08:00
|
|
|
|
2014-04-19 06:22:44 +08:00
|
|
|
CHECK: main
|
|
|
|
CHECK-NEXT: llvm-symbolizer-dwo-test.cc:11
|
|
|
|
|
2014-06-13 02:52:35 +08:00
|
|
|
CHECK: main
|
|
|
|
CHECK-NEXT: {{.*}}fission-ranges.cc:6
|
|
|
|
|
2014-06-13 07:58:49 +08:00
|
|
|
CHECK: _ZN1S3bazEv
|
|
|
|
CHECK-NEXT: {{.*}}arange-overlap.cc:6
|
|
|
|
|
2016-04-23 05:32:59 +08:00
|
|
|
DWO: _Z2f2v
|
|
|
|
NODWO: {{^f2$}}
|
|
|
|
SPLIT-NEXT: {{.*}}split-dwarf-test.cc
|
|
|
|
SPLIT-NEXT: main
|
|
|
|
SPLIT-NEXT: {{.*}}split-dwarf-test.cc
|
2014-09-06 03:29:45 +08:00
|
|
|
|
2016-04-23 05:32:59 +08:00
|
|
|
SPLIT: _Z2f1v
|
|
|
|
SPLIT-NEXT: {{.*}}split-dwarf-test.cc
|
2014-09-06 03:29:45 +08:00
|
|
|
|
2014-09-22 20:35:53 +08:00
|
|
|
; func has been inlined into main by LTO. Check that the symbolizer is able
|
|
|
|
; to resolve the cross-cu reference and retrieve func's name
|
|
|
|
CHECK: func
|
|
|
|
CHECK-NEXT: /tmp{{[/\\]}}cross-cu-inlining.c:16:3
|
|
|
|
CHECK-NEXT: main
|
|
|
|
CHECK-NEXT: /tmp{{[/\\]}}cross-cu-inlining.c:11:0
|
|
|
|
|
2017-05-20 11:32:49 +08:00
|
|
|
CHECK: f2
|
2017-07-01 00:05:03 +08:00
|
|
|
CHECK-NEXT: b.cpp:3:3
|
2017-05-20 11:32:49 +08:00
|
|
|
CHECK-NEXT: f3
|
2017-07-01 00:05:03 +08:00
|
|
|
CHECK-NEXT: b.cpp:6:0
|
2017-05-20 11:32:49 +08:00
|
|
|
|
2017-05-22 15:02:47 +08:00
|
|
|
CHECK: f2
|
|
|
|
CHECK-NEXT: split-dwarf-addr-object-relocation.cpp:3:3
|
|
|
|
CHECK-NEXT: f3
|
|
|
|
CHECK-NEXT: split-dwarf-addr-object-relocation.cpp:6:0
|
|
|
|
|
2017-07-30 09:34:08 +08:00
|
|
|
DWP: f2
|
|
|
|
DWP-NEXT: split-dwarf-dwp.cpp:3:3
|
2017-08-03 04:16:22 +08:00
|
|
|
DWP-NEXT: main
|
|
|
|
DWP-NEXT: split-dwarf-dwp.cpp:10:0
|
2017-05-23 14:48:53 +08:00
|
|
|
|
2017-08-16 05:02:17 +08:00
|
|
|
RUN: echo "unexisting-file 0x1234" > %t.input2
|
|
|
|
RUN: llvm-symbolizer < %t.input2 2>&1 | FileCheck %s --check-prefix=MISSING-FILE
|
2015-11-04 08:30:19 +08:00
|
|
|
|
2015-11-04 09:09:37 +08:00
|
|
|
MISSING-FILE: LLVMSymbolizer: error reading file: {{[Nn]}}o such file or directory
|
2013-06-28 16:15:40 +08:00
|
|
|
|
2017-08-16 05:02:17 +08:00
|
|
|
RUN: echo "%p/Inputs/macho-universal 0x1f84" > %t.input3
|
|
|
|
RUN: llvm-symbolizer < %t.input3 | FileCheck %s --check-prefix=UNKNOWN-ARCH
|
2013-06-28 16:15:40 +08:00
|
|
|
|
|
|
|
UNKNOWN-ARCH-NOT: main
|
|
|
|
UNKNOWN-ARCH: ??
|
|
|
|
UNKNOWN-ARCH-NOT: main
|
2013-12-25 03:33:22 +08:00
|
|
|
|
2017-08-16 05:02:17 +08:00
|
|
|
RUN: echo "0x400559" > %t.input4
|
|
|
|
RUN: echo "0x400436" >> %t.input4
|
|
|
|
RUN: llvm-symbolizer --obj %p/Inputs/dwarfdump-test.elf-x86-64 < %t.input4 \
|
2013-12-25 03:33:22 +08:00
|
|
|
RUN: | FileCheck %s --check-prefix=BINARY
|
|
|
|
|
|
|
|
BINARY: main
|
|
|
|
BINARY-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16
|
|
|
|
BINARY: _start
|
2014-01-17 01:25:12 +08:00
|
|
|
|
2017-08-16 05:02:17 +08:00
|
|
|
RUN: echo "0x400720" > %t.input5
|
|
|
|
RUN: echo "0x4004a0" >> %t.input5
|
|
|
|
RUN: echo "0x4006f0" >> %t.input5
|
|
|
|
RUN: llvm-symbolizer --obj %p/Inputs/llvm-symbolizer-test.elf-x86-64 < %t.input5 \
|
2014-01-17 01:25:12 +08:00
|
|
|
RUN: | FileCheck %s --check-prefix=BINARY_C
|
|
|
|
|
|
|
|
BINARY_C: main
|
|
|
|
BINARY_C-NEXT: /tmp/dbginfo{{[/\\]}}llvm-symbolizer-test.c:10
|
|
|
|
BINARY_C: _start
|
|
|
|
BINARY_C: {{g$}}
|
2014-02-26 21:10:01 +08:00
|
|
|
|
2017-08-16 05:02:17 +08:00
|
|
|
RUN: echo "0x1f1" > %t.input6
|
|
|
|
RUN: llvm-symbolizer --obj %p/Inputs/shared-object-stripped.elf-i386 < %t.input6 \
|
2014-02-26 21:10:01 +08:00
|
|
|
RUN: | FileCheck %s --check-prefix=STRIPPED
|
|
|
|
|
|
|
|
STRIPPED: global_func
|
2014-05-17 08:07:48 +08:00
|
|
|
|
2017-08-16 05:02:17 +08:00
|
|
|
RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" > %t.input7
|
|
|
|
RUN: llvm-symbolizer --functions=short --demangle=false < %t.input7 \
|
2014-05-17 08:07:48 +08:00
|
|
|
RUN: | FileCheck %s --check-prefix=SHORT_FUNCTION_NAME
|
|
|
|
|
|
|
|
SHORT_FUNCTION_NAME-NOT: _Z1cv
|