mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Migrate llvm-symbolizer tests to not use %T
(context around the %T removal here: https://reviews.llvm.org/D35396 ) llvm-svn: 312828
This commit is contained in:
parent
fd3510562f
commit
2f713860f5
10
test/DebugInfo/Inputs/split-dwarf-addr-object-relocation.cpp
Normal file
10
test/DebugInfo/Inputs/split-dwarf-addr-object-relocation.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
void f1();
|
||||
__attribute__((always_inline)) void f2() {
|
||||
f1();
|
||||
}
|
||||
void f3() {
|
||||
f2();
|
||||
}
|
||||
|
||||
// $ clang++ split-dwarf-addr-object-relocation.cpp -gsplit-dwarf -c Xclang \
|
||||
// -fdebug-compilation-dir -Xclang .
|
Binary file not shown.
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
__attribute__((optnone)) void f1() {}
|
||||
inline __attribute__((always_inline)) void f2() {
|
||||
void f1() {}
|
||||
__attribute__((always_inline)) inline void f2() {
|
||||
f1();
|
||||
}
|
||||
// throw a gap in the address range to force use of DW_AT_ranges, ranges_base,
|
||||
@ -17,6 +17,6 @@ int main() {
|
||||
// void other1() {}
|
||||
// __attribute__((nodebug)) void other2() {}
|
||||
// void other3() {}
|
||||
// $ clang++ other.cpp split-dwarf-dwp.cpp -gsplit-dwarf -c -Xclang -fdebug-compilation-dir -Xclang Output -fno-split-dwarf-inlining
|
||||
// $ llvm-dwp other.dwo other.dwo split-dwarf-dwp.dwo -o test/DebugInfo/Inputs/split-dwarf-dwp.o.dwp
|
||||
// $ clang++ other.cpp split-dwarf-dwp.cpp -gsplit-dwarf -c -Xclang -fdebug-compilation-dir -Xclang . -fno-split-dwarf-inlining
|
||||
// $ llvm-dwp other.dwo split-dwarf-dwp.dwo -o test/DebugInfo/Inputs/split-dwarf-dwp.o.dwp
|
||||
// $ ld -r other.o split-dwarf-dwp.o -o test/DebugInfo/Inputs/split-dwarf-dwp.o
|
||||
|
Binary file not shown.
Binary file not shown.
15
test/DebugInfo/Inputs/split-dwarf-multiple-cu.cpp
Normal file
15
test/DebugInfo/Inputs/split-dwarf-multiple-cu.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
void f1();
|
||||
__attribute__((always_inline)) inline void f2() {
|
||||
f1();
|
||||
}
|
||||
void f3() {
|
||||
f2();
|
||||
}
|
||||
|
||||
// $ cat > other.cpp
|
||||
// extern int i;
|
||||
// int i;
|
||||
// $ clang++ other.cpp split-dwarf-multiple-cu.cpp -g -c -Xclang \
|
||||
// -fdebug-compilation-dir -Xclang . -emit-llvm -S
|
||||
// $ llvm-link other.ll split-dwarf-multiple-cu.ll -o split-dwarf-multiple-cu.bc
|
||||
// $ clang++ -gsplit-dwarf split-dwarf-multiple-cu.bc -c
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
13
test/DebugInfo/Inputs/split-dwarf-test.cpp
Normal file
13
test/DebugInfo/Inputs/split-dwarf-test.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
void f1() {}
|
||||
__attribute__((always_inline)) inline void f2() {
|
||||
f1();
|
||||
}
|
||||
int main() {
|
||||
f2();
|
||||
}
|
||||
|
||||
// $ clang++ split-dwarf-test.cpp -gsplit-dwarf -Xclang \
|
||||
// -fdebug-compilation-dir -Xclang . -o split-dwarf-test
|
||||
// $ clang++ split-dwarf-test.cpp -gsplit-dwarf -Xclang \
|
||||
// -fdebug-compilation-dir -Xclang . -fno-split-dwarf-inlining \
|
||||
// -o split-dwarf-test-nogmlt
|
Binary file not shown.
@ -1,3 +1,5 @@
|
||||
RUN: rm -rf %t
|
||||
RUN: mkdir -p %t
|
||||
RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400559" > %t.input
|
||||
RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64.debuglink 0x400559" >> %t.input
|
||||
RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400436" >> %t.input
|
||||
@ -10,48 +12,49 @@ 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: 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
|
||||
RUN: cp %p/Inputs/split-dwarf-test.dwo %T
|
||||
RUN: echo "%p/Inputs/split-dwarf-test 0x4005d4" >> %t.input
|
||||
RUN: echo "%p/Inputs/split-dwarf-test 0x4005c4" >> %t.input
|
||||
RUN: cp %p/Inputs/split-dwarf-test.dwo %t
|
||||
RUN: echo "%p/Inputs/split-dwarf-test 0x400504" >> %t.input
|
||||
RUN: echo "%p/Inputs/split-dwarf-test 0x4004f4" >> %t.input
|
||||
RUN: echo "%p/Inputs/cross-cu-inlining.x86_64-macho.o 0x17" >> %t.input
|
||||
RUN: cp %p/Inputs/split-dwarf-multiple-cu.dwo %T
|
||||
RUN: cp %p/Inputs/split-dwarf-multiple-cu.dwo %t
|
||||
RUN: echo "%p/Inputs/split-dwarf-multiple-cu.o 0x4" >> %t.input
|
||||
RUN: cp %p/Inputs/split-dwarf-addr-object-relocation.dwo %T
|
||||
RUN: cp %p/Inputs/split-dwarf-addr-object-relocation.dwo %t
|
||||
RUN: echo "%p/Inputs/split-dwarf-addr-object-relocation.o 0x14" >> %t.input
|
||||
RUN: cp %p/Inputs/split-dwarf-dwp.o %T
|
||||
RUN: cp %p/Inputs/split-dwarf-dwp.o.dwp %T
|
||||
RUN: echo "%T/split-dwarf-dwp.o 0x4" >> %t.input
|
||||
RUN: cp %p/Inputs/split-dwarf-dwp.o %t
|
||||
RUN: cp %p/Inputs/split-dwarf-dwp.o.dwp %t
|
||||
RUN: echo "%t/split-dwarf-dwp.o 0x4" >> %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
|
||||
|
||||
Ensure we get the same results in the absence of gmlt-like data in the executable but the presence of a .dwo file
|
||||
|
||||
RUN: echo "%p/Inputs/split-dwarf-test-nogmlt 0x4005d4" >> %t.input
|
||||
RUN: echo "%p/Inputs/split-dwarf-test-nogmlt 0x4005c4" >> %t.input
|
||||
RUN: echo "%p/Inputs/split-dwarf-test-nogmlt 0x400504" >> %t.input
|
||||
RUN: echo "%p/Inputs/split-dwarf-test-nogmlt 0x4004f4" >> %t.input
|
||||
RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \
|
||||
RUN: --default-arch=i386 < %t.input | FileCheck --check-prefix=SPLIT --check-prefix=DWO %s
|
||||
|
||||
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
|
||||
RUN: echo "%p/Inputs/split-dwarf-test 0x4005d4" >> %t.input
|
||||
RUN: echo "%p/Inputs/split-dwarf-test 0x4005c4" >> %t.input
|
||||
RUN: rm %t/split-dwarf-test.dwo
|
||||
RUN: echo "%p/Inputs/split-dwarf-test 0x400504" >> %t.input
|
||||
RUN: echo "%p/Inputs/split-dwarf-test 0x4004f4" >> %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 0x54" > %t.input
|
||||
RUN: cp %p/Inputs/split-dwarf-dwp.o %t/split-dwarf-dwp-different-name.o
|
||||
RUN: echo "%t/split-dwarf-dwp-different-name.o 0x54" > %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
|
||||
|
||||
@ -132,12 +135,12 @@ CHECK-NEXT: {{.*}}arange-overlap.cc:6
|
||||
|
||||
DWO: _Z2f2v
|
||||
NODWO: {{^f2$}}
|
||||
SPLIT-NEXT: {{.*}}split-dwarf-test.cc
|
||||
SPLIT-NEXT: {{.*}}split-dwarf-test.cpp
|
||||
SPLIT-NEXT: main
|
||||
SPLIT-NEXT: {{.*}}split-dwarf-test.cc
|
||||
SPLIT-NEXT: {{.*}}split-dwarf-test.cpp
|
||||
|
||||
SPLIT: _Z2f1v
|
||||
SPLIT-NEXT: {{.*}}split-dwarf-test.cc
|
||||
SPLIT-NEXT: {{.*}}split-dwarf-test.cpp
|
||||
|
||||
; 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
|
||||
@ -147,9 +150,9 @@ CHECK-NEXT: main
|
||||
CHECK-NEXT: /tmp{{[/\\]}}cross-cu-inlining.c:11:0
|
||||
|
||||
CHECK: f2
|
||||
CHECK-NEXT: b.cpp:3:3
|
||||
CHECK-NEXT: split-dwarf-multiple-cu.cpp:3:3
|
||||
CHECK-NEXT: f3
|
||||
CHECK-NEXT: b.cpp:6:0
|
||||
CHECK-NEXT: split-dwarf-multiple-cu.cpp:6:0
|
||||
|
||||
CHECK: f2
|
||||
CHECK-NEXT: split-dwarf-addr-object-relocation.cpp:3:3
|
||||
|
Loading…
x
Reference in New Issue
Block a user