Index: test/DebugInfo/Inputs/dwarfdump-test3-decl.h =================================================================== --- test/DebugInfo/Inputs/dwarfdump-test3-decl.h +++ test/DebugInfo/Inputs/dwarfdump-test3-decl.h @@ -1,7 +0,0 @@ -#include "dwarfdump-test3-decl2.h" - -class C { - explicit C(bool a = false, bool b = false); -}; - -void do1() {} Index: test/DebugInfo/Inputs/dwarfdump-test3-decl2.h =================================================================== --- test/DebugInfo/Inputs/dwarfdump-test3-decl2.h +++ test/DebugInfo/Inputs/dwarfdump-test3-decl2.h @@ -1 +0,0 @@ -void do2() { } Index: test/DebugInfo/Inputs/dwarfdump-test3.cc =================================================================== --- test/DebugInfo/Inputs/dwarfdump-test3.cc +++ test/DebugInfo/Inputs/dwarfdump-test3.cc @@ -1,12 +0,0 @@ -#include "dwarfdump-test3-decl.h" - -C::C(bool a, bool b) {} - -// Built with gcc 4.6.3 -// $ mkdir -p /tmp/dbginfo/include -// $ mkdir -p /tmp/include -// $ cp dwarfdump-test3.cc /tmp/dbginfo -// $ cp dwarfdump-test3-decl.h /tmp/include -// $ cp dwarfdump-test3-decl2.h /tmp/dbginfo/include -// $ cd /tmp/dbginfo -// $ gcc dwarfdump-test3.cc -g -I/tmp/include -Iinclude -fPIC -shared -o Index: test/DebugInfo/llvm-symbolizer.test =================================================================== --- test/DebugInfo/llvm-symbolizer.test +++ test/DebugInfo/llvm-symbolizer.test @@ -1,21 +1,11 @@ -RUN: rm -rf %t -RUN: mkdir -p %t RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x40113f" > %t.input -RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64.debuglink 0x40113f" >> %t.input RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x401020" >> %t.input RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x40110e" >> %t.input RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x401160" >> %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 @@ -23,16 +13,12 @@ RUN: echo "%p/Inputs/arange-overlap.elf-x86_64 0x714" >> %t.input RUN: echo "%p/Inputs/cross-cu-inlining.x86_64-macho.o 0x17" >> %t.input -RUN: cd %t RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \ RUN: --default-arch=i386 < %t.input | FileCheck --check-prefix=CHECK --check-prefix=SPLIT --check-prefix=DWO %s CHECK: main CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16 -CHECK: main -CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16 - CHECK: _start CHECK: _Z1fii @@ -51,27 +37,6 @@ CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test4-part1.cc:2 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 -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 - -CHECK: inlined_h CHECK-NEXT: dwarfdump-inl-test.h:3 CHECK-NEXT: inlined_g CHECK-NEXT: dwarfdump-inl-test.h:7 @@ -80,15 +45,6 @@ CHECK-NEXT: main 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 - -CHECK: _Z3do2v -CHECK-NEXT: /tmp/dbginfo{{[/\\]}}include{{[/\\]}}dwarfdump-test3-decl2.h:1 - CHECK: main CHECK: _Z3inci CHECK: _Z3inci @@ -107,11 +63,6 @@ CHECK-NEXT: main CHECK-NEXT: /tmp{{[/\\]}}cross-cu-inlining.c:11:0 -RUN: echo "unexisting-file 0x1234" > %t.input2 -RUN: llvm-symbolizer < %t.input2 2>&1 | FileCheck %s --check-prefix=MISSING-FILE - -MISSING-FILE: LLVMSymbolizer: error reading file: {{[Nn]}}o such file or directory - RUN: echo "%p/Inputs/macho-universal 0x1f84" > %t.input3 RUN: llvm-symbolizer < %t.input3 | FileCheck %s --check-prefix=UNKNOWN-ARCH Index: test/DebugInfo/symbolize-gnu-debuglink.test =================================================================== --- test/DebugInfo/symbolize-gnu-debuglink.test +++ test/DebugInfo/symbolize-gnu-debuglink.test @@ -0,0 +1,4 @@ +RUN: llvm-symbolizer --obj=%p/Inputs/dwarfdump-test.elf-x86-64.debuglink 0x40113f | FileCheck %s + +CHECK: main +CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16 Index: test/DebugInfo/symbolize-inlined.test =================================================================== --- test/DebugInfo/symbolize-inlined.test +++ test/DebugInfo/symbolize-inlined.test @@ -0,0 +1,22 @@ +RUN: llvm-symbolizer --inlining --obj=%p/Inputs/dwarfdump-inl-test.elf-x86-64 0x8dc 0xa05 0x987 | FileCheck %s + +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 +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 Index: test/DebugInfo/symbolize-missing-file.test =================================================================== --- test/DebugInfo/symbolize-missing-file.test +++ test/DebugInfo/symbolize-missing-file.test @@ -0,0 +1,3 @@ +RUN: llvm-symbolizer --obj=unexisting-file 0x1234 2>&1 | FileCheck %s + +CHECK: LLVMSymbolizer: error reading file: {{[Nn]}}o such file or directory Index: test/tools/llvm-symbolizer/space-in-path.s =================================================================== --- test/tools/llvm-symbolizer/space-in-path.s +++ test/tools/llvm-symbolizer/space-in-path.s @@ -0,0 +1,15 @@ +# REQUIRES: x86-registered-target + +.type foo,@function +foo: + nop + +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o "%t space.o" -g + +# Test both passing via stdin and via --obj. +# RUN: echo "\"%t space.o\" 0" > %t.input +# RUN: llvm-symbolizer < %t.input | FileCheck %s +# RUN: llvm-symbolizer --obj="%t space.o" 0 | FileCheck %s + +# CHECK: foo +# CHECK-NEXT: space-in-path.s:5