1 This test checks that when inlined frames are not shown (--no-inlines) and the output
2 style is set to GNU (--output-style=GNU) the name of an inlined function is not
3 replaced with the name of the top caller function. At the same time, the current
4 behavior of llvm-symbolizer is preserved with --output-style=LLVM or when
5 the option is not specified.
7 RUN: llvm-symbolizer --no-inlines -e %p/Inputs/addr.exe 0x40054d \
8 RUN: | FileCheck %s --check-prefix=LLVM --implicit-check-not=inctwo
9 ## Before 2020-08-04, asan_symbolize.py passed --inlining=false if 'symbolize_inline_frames'
10 ## is set to false. Support this compatibility alias for a while.
11 RUN: llvm-symbolizer --inlining=false -e %p/Inputs/addr.exe 0x40054d \
12 RUN: | FileCheck %s --check-prefix=LLVM --implicit-check-not=inctwo
14 RUN: llvm-symbolizer --output-style=LLVM --no-inlines -e %p/Inputs/addr.exe 0x40054d \
15 RUN: | FileCheck %s --check-prefix=LLVM --implicit-check-not=inctwo
17 RUN: llvm-symbolizer --output-style=GNU --no-inlines -e %p/Inputs/addr.exe 0x40054d \
18 RUN: | FileCheck %s --check-prefix=GNU --implicit-check-not=main
20 RUN: llvm-addr2line -f -e %p/Inputs/addr.exe 0x40054d \
21 RUN: | FileCheck %s --check-prefix=GNU --implicit-check-not=main
23 RUN: llvm-addr2line --output-style=GNU -f -e %p/Inputs/addr.exe 0x40054d \
24 RUN: | FileCheck %s --check-prefix=GNU --implicit-check-not=main
26 RUN: llvm-addr2line --output-style=LLVM -f -e %p/Inputs/addr.exe 0x40054d \
27 RUN: | FileCheck %s --check-prefix=LLVM --implicit-check-not=inctwo
32 ## Check that we are able to produce an output properly when the --no-inlines option
33 ## is specified, but a file doesn't exist. Check we report an error.
35 RUN: not llvm-symbolizer --output-style=GNU --obj=%p/Inputs/not.exist 0x1 0x2 --no-inlines 2>&1 \
36 RUN: | FileCheck %s --check-prefix=NOT-EXIST -DMSG=%errc_ENOENT
37 RUN: not llvm-symbolizer --output-style=LLVM --obj=%p/Inputs/not.exist 0x1 0x2 --no-inlines 2>&1 \
38 RUN: | FileCheck %s --check-prefix=NOT-EXIST -DMSG=%errc_ENOENT
40 NOT-EXIST: llvm-symbolizer{{.*}}: error: '{{.*}}Inputs/not.exist': [[MSG]]