[sanitizer] Improve FreeBSD ASLR detection
[llvm-project.git] / llvm / test / tools / llvm-symbolizer / output-style-inlined.test
blob1b8e3a2f22fb3a58d10bfba6b990aabed7898d66
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
29 LLVM: main
30 GNU: 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: llvm-symbolizer --output-style=GNU --obj=%p/Inputs/not.exist 0x1 0x2 --no-inlines 2>&1 \
36 RUN:   | FileCheck %s --check-prefix=NOT-EXIST-GNU -DMSG=%errc_ENOENT
37 RUN: llvm-symbolizer --output-style=LLVM --obj=%p/Inputs/not.exist 0x1 0x2 --no-inlines 2>&1 \
38 RUN:   | FileCheck %s --check-prefix=NOT-EXIST-LLVM -DMSG=%errc_ENOENT
40 # NOT-EXIST-GNU:      LLVMSymbolizer: error reading file: [[MSG]]
41 # NOT-EXIST-GNU-NEXT: ??
42 # NOT-EXIST-GNU-NEXT: ??:0
43 # NOT-EXIST-GNU-NEXT: ??
44 # NOT-EXIST-GNU-NEXT: ??:0
46 # NOT-EXIST-LLVM:       LLVMSymbolizer: error reading file: [[MSG]]
47 # NOT-EXIST-LLVM-NEXT:  ??
48 # NOT-EXIST-LLVM-NEXT:  ??:0:0
49 # NOT-EXIST-LLVM-EMPTY:
50 # NOT-EXIST-LLVM-NEXT:  ??
51 # NOT-EXIST-LLVM-NEXT:  ??:0:0