41 lines · plain
1This test checks that when inlined frames are not shown (--no-inlines) and the output2style is set to GNU (--output-style=GNU) the name of an inlined function is not3replaced with the name of the top caller function. At the same time, the current4behavior of llvm-symbolizer is preserved with --output-style=LLVM or when5the option is not specified.6 7RUN: llvm-symbolizer --no-inlines -e %p/Inputs/addr.exe 0x40054d \8RUN: | FileCheck %s --check-prefix=LLVM --implicit-check-not=inctwo9## 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.11RUN: llvm-symbolizer --inlining=false -e %p/Inputs/addr.exe 0x40054d \12RUN: | FileCheck %s --check-prefix=LLVM --implicit-check-not=inctwo13 14RUN: llvm-symbolizer --output-style=LLVM --no-inlines -e %p/Inputs/addr.exe 0x40054d \15RUN: | FileCheck %s --check-prefix=LLVM --implicit-check-not=inctwo16 17RUN: llvm-symbolizer --output-style=GNU --no-inlines -e %p/Inputs/addr.exe 0x40054d \18RUN: | FileCheck %s --check-prefix=GNU --implicit-check-not=main19 20RUN: llvm-addr2line -f -e %p/Inputs/addr.exe 0x40054d \21RUN: | FileCheck %s --check-prefix=GNU --implicit-check-not=main22 23RUN: llvm-addr2line --output-style=GNU -f -e %p/Inputs/addr.exe 0x40054d \24RUN: | FileCheck %s --check-prefix=GNU --implicit-check-not=main25 26RUN: llvm-addr2line --output-style=LLVM -f -e %p/Inputs/addr.exe 0x40054d \27RUN: | FileCheck %s --check-prefix=LLVM --implicit-check-not=inctwo28 29LLVM: main30GNU: inctwo31 32## Check that we are able to produce an output properly when the --no-inlines option33## is specified, but a file doesn't exist. Check we report an error.34 35RUN: not llvm-symbolizer --output-style=GNU --obj=%p/Inputs/not.exist 0x1 0x2 --no-inlines 2>&1 \36RUN: | FileCheck %s --check-prefix=NOT-EXIST -DMSG=%errc_ENOENT37RUN: not llvm-symbolizer --output-style=LLVM --obj=%p/Inputs/not.exist 0x1 0x2 --no-inlines 2>&1 \38RUN: | FileCheck %s --check-prefix=NOT-EXIST -DMSG=%errc_ENOENT39 40NOT-EXIST: llvm-symbolizer{{.*}}: error: '{{.*}}Inputs/not.exist': [[MSG]]41