From e5adb68e044da6733e9ebba7aea913c1ca9618dd Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Sun, 30 Jul 2017 01:34:08 +0000 Subject: DebugInfo: Provide option for explicitly specifying the name of the DWP file If you've archived the DWP file somewhere it's probably useful to be able to just tell llvm-symbolizer where it is when you're symbolizing stack traces from the binary. This only provides a mechanism for specifying a single DWP file, good if you're symbolizing a program with a single DWP file, but it's likely if the program is dynamically linked that you might have a DWP for each dynamic library - in which case this feature won't help (at least as it's surfaced in llvm-symbolizer for now) - in theory it could be extended to specify a collection of DWP files that could all be consulted for split CU hash resolution. llvm-svn: 309498 --- llvm/test/DebugInfo/llvm-symbolizer.test | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'llvm/test/DebugInfo/llvm-symbolizer.test') diff --git a/llvm/test/DebugInfo/llvm-symbolizer.test b/llvm/test/DebugInfo/llvm-symbolizer.test index bcad37cf9a4..342c1a9e925 100644 --- a/llvm/test/DebugInfo/llvm-symbolizer.test +++ b/llvm/test/DebugInfo/llvm-symbolizer.test @@ -50,6 +50,11 @@ RUN: echo "%p/Inputs/split-dwarf-test 0x4005c4" >> %t.input RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \ RUN: --default-arch=i386 < %t.input | FileCheck --check-prefix=SPLIT --check-prefix=NODWO %s +RUN: cp %p/Inputs/split-dwarf-dwp.o %T/split-dwarf-dwp-different-name.o +RUN: echo "%T/split-dwarf-dwp-different-name.o 0x4" > %t.input +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 + CHECK: main CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16 @@ -151,10 +156,10 @@ CHECK-NEXT: split-dwarf-addr-object-relocation.cpp:3:3 CHECK-NEXT: f3 CHECK-NEXT: split-dwarf-addr-object-relocation.cpp:6:0 -CHECK: f2 -CHECK-NEXT: split-dwarf-dwp.cpp:3:3 -CHECK-NEXT: f3 -CHECK-NEXT: split-dwarf-dwp.cpp:6:0 +DWP: f2 +DWP-NEXT: split-dwarf-dwp.cpp:3:3 +DWP-NEXT: f3 +DWP-NEXT: split-dwarf-dwp.cpp:6:0 RUN: echo "unexisting-file 0x1234" > %t.input2 RUN: llvm-symbolizer < %t.input2 2>&1 | FileCheck %s --check-prefix=MISSING-FILE -- cgit v1.2.3