diff options
| author | Francis Ricci <francisjricci@gmail.com> | 2018-03-02 22:56:45 +0000 |
|---|---|---|
| committer | Francis Ricci <francisjricci@gmail.com> | 2018-03-02 22:56:45 +0000 |
| commit | fe6cbceec2aa6dd9eb4e188811d2a896ac0b33c0 (patch) | |
| tree | 802c75bbeac938942ba7bce2e81ac6962db32997 /llvm/test/tools | |
| parent | f69baf64ebc546681b296d8f339a11de2c411642 (diff) | |
| download | bcm5719-llvm-fe6cbceec2aa6dd9eb4e188811d2a896ac0b33c0.tar.gz bcm5719-llvm-fe6cbceec2aa6dd9eb4e188811d2a896ac0b33c0.zip | |
[llvm-symbolizer] Use correct path when resolving .gnu_debuglink in .debug
Summary:
The symbolizer was checking for .debug as a subdirectory of the
binary file itself, not of the directory containing the binary. This led to
a failure to find split debug info when it was contained in a .debug directory.
Reviewers: rnk, glider, zturner
Subscribers: llvm-commits, aprantl
Differential Revision: https://reviews.llvm.org/D44025
llvm-svn: 326630
Diffstat (limited to 'llvm/test/tools')
| -rw-r--r-- | llvm/test/tools/llvm-symbolizer/split-debug.test | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-symbolizer/split-debug.test b/llvm/test/tools/llvm-symbolizer/split-debug.test new file mode 100644 index 00000000000..2d5b0732c6d --- /dev/null +++ b/llvm/test/tools/llvm-symbolizer/split-debug.test @@ -0,0 +1,26 @@ +#Source: +##include <stdio.h> +#static inline int inctwo (int *a) { +# printf ("%d\n",(*a)++); +# return (*a)++; +#} +#static inline int inc (int *a) { +# printf ("%d\n",inctwo(a)); +# return (*a)++; +#} +# +# +#int main () { +# int x = 1; +# return inc(&x); +#} +# +#Build as : clang -g -O2 addr.c + +RUN: mkdir -p %t/.debug +RUN: llvm-objcopy --keep=.debug_info %p/Inputs/addr.exe %t/.debug/addr +RUN: llvm-objcopy --strip-debug --add-gnu-debuglink=%t/.debug/addr %p/Inputs/addr.exe %t/addr.exe +RUN: llvm-symbolizer -print-address -obj=%t/addr.exe < %p/Inputs/addr.inp | FileCheck %s + +#CHECK: 0x40054d +#CHECK: {{[/\]+}}tmp{{[/\]+}}x.c:14:0 |

