1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/tools/llvm-symbolizer/split-debug.test
David Blaikie e5c30b9eef llvm-symbolizer: Extract individual test cases now that it's easier to use directly (without a piped input file)
Pulling out the split-dwarf tests by way of example of how I think
llvm-symbolizer should be tested going forward. Open to
debate/discussion, though.

llvm-svn: 352004
2019-01-24 01:19:17 +00:00

27 lines
623 B
Plaintext

#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-section=.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 0x40054d | FileCheck %s
#CHECK: 0x40054d
#CHECK: {{[/\]+}}tmp{{[/\]+}}x.c:14:0