summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/Inputs
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-09-05 19:29:45 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-09-05 19:29:45 +0000
commitd3e121331bafa274b654bf2e1691cde628b7ff55 (patch)
tree2d7c338cd2fbd0a25618f9d4433502243a9f105b /llvm/test/DebugInfo/Inputs
parente4d4801c3a644923c672e25dc3a76bef9973c494 (diff)
downloadbcm5719-llvm-d3e121331bafa274b654bf2e1691cde628b7ff55.tar.gz
bcm5719-llvm-d3e121331bafa274b654bf2e1691cde628b7ff55.zip
[DWARF parser] Fix nasty memory corruption in .dwo files handling.
Forge a test case where llvm-symbolizer has to use external .dwo file to produce the inlining information. llvm-svn: 217270
Diffstat (limited to 'llvm/test/DebugInfo/Inputs')
-rwxr-xr-xllvm/test/DebugInfo/Inputs/split-dwarf-testbin0 -> 9379 bytes
-rw-r--r--llvm/test/DebugInfo/Inputs/split-dwarf-test.cc17
-rw-r--r--llvm/test/DebugInfo/Inputs/split-dwarf-test.dwobin0 -> 1609 bytes
3 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/DebugInfo/Inputs/split-dwarf-test b/llvm/test/DebugInfo/Inputs/split-dwarf-test
new file mode 100755
index 00000000000..a4411129a9b
--- /dev/null
+++ b/llvm/test/DebugInfo/Inputs/split-dwarf-test
Binary files differ
diff --git a/llvm/test/DebugInfo/Inputs/split-dwarf-test.cc b/llvm/test/DebugInfo/Inputs/split-dwarf-test.cc
new file mode 100644
index 00000000000..5ed56f94b36
--- /dev/null
+++ b/llvm/test/DebugInfo/Inputs/split-dwarf-test.cc
@@ -0,0 +1,17 @@
+int foo(int a) {
+ return a + 1;
+}
+
+int main(int argc, char *argv[]) {
+ return foo(argc);
+}
+
+// Build instructions:
+// 1) clang++ -### -O2 -gsplit-dwarf.cc split-dwarf-test.cc -o split-dwarf-test
+// 2) Replace the value "-fdebug-compilation-dir" flag to "Output"
+// (this is the temp directory used by lit).
+// 3) Manually run clang-cc1, objcopy and ld invocations.
+// 4) Copy the binary and .dwo file to the Inputs directory. Make sure the
+// .dwo file will be available for symbolizer (use test RUN-lines to copy
+// the .dwo file to a directory
+// <execution_directory>/<directory_provided_in_fdebug_compilation_dir>.
diff --git a/llvm/test/DebugInfo/Inputs/split-dwarf-test.dwo b/llvm/test/DebugInfo/Inputs/split-dwarf-test.dwo
new file mode 100644
index 00000000000..74183a4b622
--- /dev/null
+++ b/llvm/test/DebugInfo/Inputs/split-dwarf-test.dwo
Binary files differ
OpenPOWER on IntegriCloud