summaryrefslogtreecommitdiff
path: root/test/DebugInfo/Inputs
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-04-23 10:17:34 +0000
committerAlexey Samsonov <samsonov@google.com>2013-04-23 10:17:34 +0000
commit005159e92420a102516ee6e29ef2178c818da5d0 (patch)
tree12692c0e8cf95807e5645786b7bc751f8bf71692 /test/DebugInfo/Inputs
parentab4d569f2841beaf6152179b1f4da6b7e0f3530e (diff)
downloadllvm-005159e92420a102516ee6e29ef2178c818da5d0.tar.gz
llvm-005159e92420a102516ee6e29ef2178c818da5d0.tar.bz2
llvm-005159e92420a102516ee6e29ef2178c818da5d0.tar.xz
Use zlib to uncompress debug sections in DWARF parser.
This makes llvm-dwarfdump and llvm-symbolizer understand debug info sections compressed by ld.gold linker. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180088 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/DebugInfo/Inputs')
-rw-r--r--test/DebugInfo/Inputs/dwarfdump-test-zlib.cc24
-rwxr-xr-xtest/DebugInfo/Inputs/dwarfdump-test-zlib.elf-x86-64bin0 -> 9589 bytes
2 files changed, 24 insertions, 0 deletions
diff --git a/test/DebugInfo/Inputs/dwarfdump-test-zlib.cc b/test/DebugInfo/Inputs/dwarfdump-test-zlib.cc
new file mode 100644
index 0000000000..260c3c435c
--- /dev/null
+++ b/test/DebugInfo/Inputs/dwarfdump-test-zlib.cc
@@ -0,0 +1,24 @@
+class DummyClass {
+ int a_;
+ public:
+ DummyClass(int a) : a_(a) {}
+ int add(int b) {
+ return a_ + b;
+ }
+};
+
+int f(int a, int b) {
+ DummyClass c(a);
+ return c.add(b);
+}
+
+int main() {
+ return f(2, 3);
+}
+
+// Built with Clang 3.2 and ld.gold linker:
+// $ mkdir -p /tmp/dbginfo
+// $ cp dwarfdump-test-zlib.cc /tmp/dbginfo
+// $ cd /tmp/dbginfo
+// $ clang++ -g dwarfdump-test-zlib.cc -Wl,--compress-debug-sections=zlib \
+// -o <output>
diff --git a/test/DebugInfo/Inputs/dwarfdump-test-zlib.elf-x86-64 b/test/DebugInfo/Inputs/dwarfdump-test-zlib.elf-x86-64
new file mode 100755
index 0000000000..16b3153939
--- /dev/null
+++ b/test/DebugInfo/Inputs/dwarfdump-test-zlib.elf-x86-64
Binary files differ