summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2013-02-06 20:55:06 +0000
committerEli Bendersky <eliben@google.com>2013-02-06 20:55:06 +0000
commitc0d905c0e925d3a23cec68180f24504172e78cfd (patch)
tree0e14f1f7d0e41376c3b03b2cec1a858cae85d1a0 /llvm/test
parentef4558abd3e8d56b87bbf4408a831b312685337e (diff)
downloadbcm5719-llvm-c0d905c0e925d3a23cec68180f24504172e78cfd.tar.gz
bcm5719-llvm-c0d905c0e925d3a23cec68180f24504172e78cfd.zip
Add a test for checking the current .debug_frame dumping capability.
The test is a binary placed in test/DebugInfo/Inputs, with a source C file used for reference/reproducing. The source's first line is a clang build command for reproducing the binary. llvm-svn: 174543
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.c14
-rw-r--r--llvm/test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.obin0 -> 2432 bytes
-rw-r--r--llvm/test/DebugInfo/dwarfdump-debug-frame-simple.test14
3 files changed, 28 insertions, 0 deletions
diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.c b/llvm/test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.c
new file mode 100644
index 00000000000..708e037f4e3
--- /dev/null
+++ b/llvm/test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.c
@@ -0,0 +1,14 @@
+// clang -c -g -o dwarfdump-test-32bit.elf.o -m32 dwarfdump-test-32bit.elf.c
+
+extern int glob;
+
+int foo(int arg) {
+ int a = arg * 2;
+ return a + glob;
+}
+
+int bar(int arg) {
+ int a = foo(arg) * foo(arg * 2);
+ return glob - foo(a);
+}
+
diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.o b/llvm/test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.o
new file mode 100644
index 00000000000..817665e6a70
--- /dev/null
+++ b/llvm/test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.o
Binary files differ
diff --git a/llvm/test/DebugInfo/dwarfdump-debug-frame-simple.test b/llvm/test/DebugInfo/dwarfdump-debug-frame-simple.test
new file mode 100644
index 00000000000..65e650f191e
--- /dev/null
+++ b/llvm/test/DebugInfo/dwarfdump-debug-frame-simple.test
@@ -0,0 +1,14 @@
+; RUN: llvm-dwarfdump %p/Inputs/dwarfdump-test-32bit.elf.o -debug-dump=frames | FileCheck %s -check-prefix FRAMES
+
+; FRAMES: .debug_frame
+; FRAMES-NOT: .eh_frame
+
+; FRAMES: 00000000 00000010 ffffffff CIE
+; FRAMES: Version: 1
+
+; FRAMES: 00000014 00000010 00000000 FDE cie=00000000 pc=00000000...00000022
+; FRAMES: 00000028 00000014 00000000 FDE cie=00000000 pc=00000030...00000080
+
+; FRAMES-NOT: CIE
+; FRAMES-NOT: FDE
+
OpenPOWER on IntegriCloud