summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2016-05-24 12:48:46 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2016-05-24 12:48:46 +0000
commit401e4e570e1e323484018b9ef8d3a70fe5d12bbe (patch)
tree5780d87767689ae37ce57dcc8ca66b877cf405cd /llvm/test
parent11de370ccae5dc9a5b99042eebef4e8040d69749 (diff)
downloadbcm5719-llvm-401e4e570e1e323484018b9ef8d3a70fe5d12bbe.tar.gz
bcm5719-llvm-401e4e570e1e323484018b9ef8d3a70fe5d12bbe.zip
Recommit r270547 ([llvm-dwarfdump] - Teach dwarfdump to decompress debug sections in zlib style.)
Fix was: 1) Had to regenerate dwarfdump-test-zlib.elf-x86-64, dwarfdump-test-zlib-gnu.elf-x86-64 (because llvm-symbolizer-zlib.test uses that inputs for its purposes and failed). 2) Updated llvm-symbolizer-zlib.test (updated used call function address to match new files + added one more check for newly created dwarfdump-test-zlib-gnu.elf-x86-64 binary input). 3) Updated comment in dwarfdump-test-zlib.cc. Original commit message: [llvm-dwarfdump] - Teach dwarfdump to decompress debug sections in zlib style. Before this llvm-dwarfdump only recognized zlib-gnu compression style of headers, this patch adds support for zlib style. It looks reasonable to support both styles for dumping, even if we are not going to suport generating of deprecated gnu one. Differential revision: http://reviews.llvm.org/D20470 llvm-svn: 270557
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.cc9
-rwxr-xr-xllvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.elf-x86-64bin9589 -> 10448 bytes
-rw-r--r--llvm/test/DebugInfo/Inputs/dwarfdump-test-zlibgnu.elf-x86-64bin0 -> 10384 bytes
-rw-r--r--llvm/test/DebugInfo/dwarfdump-zlib.test6
-rw-r--r--llvm/test/DebugInfo/llvm-symbolizer-zlib.test7
5 files changed, 17 insertions, 5 deletions
diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.cc b/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.cc
index 260c3c435c1..966a465f904 100644
--- a/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.cc
+++ b/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.cc
@@ -16,9 +16,12 @@ int main() {
return f(2, 3);
}
-// Built with Clang 3.2 and ld.gold linker:
+// Built with Clang 3.9 and GNU gold (GNU Binutils for Ubuntu 2.26) 1.11:
+// Note: llvm-symbolizer-zlib.test relies on the path and filename used !
// $ 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>
+// $ clang++ -g dwarfdump-test-zlib.cc -Wl,--compress-debug-sections=zlib -o dwarfdump-test-zlib.elf-x86-64
+// $ clang++ -g dwarfdump-test-zlib.cc -Wl,--compress-debug-sections=zlib-gnu -o dwarfdump-test-zlibgnu.elf-x86-64
+// llvm-readobj -sections can be used to see that outputs really contain the compressed sections, also output in both
+// cases is slightly smaller, that is because of compression. \ No newline at end of file
diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.elf-x86-64 b/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.elf-x86-64
index 16b3153939f..36e630ccae0 100755
--- a/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.elf-x86-64
+++ b/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlib.elf-x86-64
Binary files differ
diff --git a/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlibgnu.elf-x86-64 b/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlibgnu.elf-x86-64
new file mode 100644
index 00000000000..0ad7a3d8511
--- /dev/null
+++ b/llvm/test/DebugInfo/Inputs/dwarfdump-test-zlibgnu.elf-x86-64
Binary files differ
diff --git a/llvm/test/DebugInfo/dwarfdump-zlib.test b/llvm/test/DebugInfo/dwarfdump-zlib.test
index cbd85ca093c..d3ef806f3f8 100644
--- a/llvm/test/DebugInfo/dwarfdump-zlib.test
+++ b/llvm/test/DebugInfo/dwarfdump-zlib.test
@@ -1,6 +1,12 @@
REQUIRES: zlib
RUN: llvm-dwarfdump %p/Inputs/dwarfdump-test-zlib.elf-x86-64 | FileCheck %s
+RUN: llvm-dwarfdump %p/Inputs/dwarfdump-test-zlibgnu.elf-x86-64 | FileCheck %s
CHECK: .debug_abbrev contents
+
+// Dump content of a little section to check that both zlib and zlib gnu styles do
+// the decompression correctly and result is the same. This and above also checks
+// that sections names are properly shown in zlib-gnu style (without additional 'z' prefix).
CHECK: .debug_info contents
+CHECK: 0x00000000: Compile Unit: length = 0x00000144 version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000148)
diff --git a/llvm/test/DebugInfo/llvm-symbolizer-zlib.test b/llvm/test/DebugInfo/llvm-symbolizer-zlib.test
index 0aae7e6c692..2860d090eb8 100644
--- a/llvm/test/DebugInfo/llvm-symbolizer-zlib.test
+++ b/llvm/test/DebugInfo/llvm-symbolizer-zlib.test
@@ -1,7 +1,10 @@
REQUIRES: zlib
-RUN: echo "%p/Inputs/dwarfdump-test-zlib.elf-x86-64 0x400559" > %t.input
-RUN: llvm-symbolizer < %t.input | FileCheck %s
+RUN: echo "%p/Inputs/dwarfdump-test-zlib.elf-x86-64 0x4005e9" > %t1.input
+RUN: llvm-symbolizer < %t1.input | FileCheck %s
+
+RUN: echo "%p/Inputs/dwarfdump-test-zlibgnu.elf-x86-64 0x4005e9" > %t2.input
+RUN: llvm-symbolizer < %t2.input | FileCheck %s
CHECK: main
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test-zlib.cc:16
OpenPOWER on IntegriCloud