mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
[llvm-symbolizer] Add support for -i and -inlines as aliases for -inlining
This change adds two options, -i and -inlines as aliases for the -inlining option to llvm-symbolizer to improve compatibility with the GNU addr2line utility which accepts these options. It also modifies existing tests that use -inlining to exercise these new aliases as well. This fixes PR40073. Reviewed by: jhenderson, Quolyk, ruiu Differential Revision: https://reviews.llvm.org/D57083 llvm-svn: 351999
This commit is contained in:
parent
a57b77e247
commit
52ae0002e5
@ -91,7 +91,7 @@ OPTIONS
|
||||
|
||||
Don't print demangled function names.
|
||||
|
||||
.. option:: -inlining
|
||||
.. option:: -inlining, -inlines, -i
|
||||
|
||||
If a source code location is in an inlined function, prints all the
|
||||
inlnied frames. Defaults to true.
|
||||
|
@ -1,6 +1,12 @@
|
||||
RUN: grep '^ADDR:' %s | sed -s 's/ADDR: //' \
|
||||
RUN: | llvm-symbolizer --inlining --relative-address -obj="%p/Inputs/coff-dwarf.exe" \
|
||||
RUN: | FileCheck %s
|
||||
RUN: grep '^ADDR:' %s | sed -s 's/ADDR: //' \
|
||||
RUN: | llvm-symbolizer --inlines --relative-address -obj="%p/Inputs/coff-dwarf.exe" \
|
||||
RUN: | FileCheck %s
|
||||
RUN: grep '^ADDR:' %s | sed -s 's/ADDR: //' \
|
||||
RUN: | llvm-symbolizer -i --relative-address -obj="%p/Inputs/coff-dwarf.exe" \
|
||||
RUN: | FileCheck %s
|
||||
|
||||
This test relies on UnDecorateSymbolName, which is Windows-only.
|
||||
REQUIRES: target-windows, system-windows
|
||||
|
@ -1,6 +1,12 @@
|
||||
RUN: grep '^ADDR:' %s | sed -s 's/ADDR: //' \
|
||||
RUN: | llvm-symbolizer --inlining --relative-address -obj="%p/Inputs/coff-exports.exe" \
|
||||
RUN: | FileCheck %s
|
||||
RUN: grep '^ADDR:' %s | sed -s 's/ADDR: //' \
|
||||
RUN: | llvm-symbolizer --inlines --relative-address -obj="%p/Inputs/coff-exports.exe" \
|
||||
RUN: | FileCheck %s
|
||||
RUN: grep '^ADDR:' %s | sed -s 's/ADDR: //' \
|
||||
RUN: | llvm-symbolizer -i --relative-address -obj="%p/Inputs/coff-exports.exe" \
|
||||
RUN: | FileCheck %s
|
||||
|
||||
This test relies on UnDecorateSymbolName, which is Win32-only.
|
||||
REQUIRES: system-windows
|
||||
|
@ -1,4 +1,4 @@
|
||||
RUN: llvm-symbolizer -inlining -apfC -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
|
||||
RUN: llvm-symbolizer -apCi -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
|
||||
|
||||
CHECK: some text
|
||||
CHECK: 0x40054d: inctwo
|
||||
|
@ -22,6 +22,10 @@ RUN: llvm-symbolizer -addresses -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | F
|
||||
RUN: llvm-symbolizer -a -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
|
||||
RUN: llvm-symbolizer -inlining -print-address -pretty-print -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
|
||||
RUN: llvm-symbolizer -inlining -print-address -p -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
|
||||
RUN: llvm-symbolizer -inlines -print-address -pretty-print -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
|
||||
RUN: llvm-symbolizer -inlines -print-address -p -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
|
||||
RUN: llvm-symbolizer -i -print-address -pretty-print -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
|
||||
RUN: llvm-symbolizer -i -print-address -p -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
|
||||
RUN: echo "0x1" > %t.input
|
||||
RUN: llvm-symbolizer -obj=%p/Inputs/zero < %t.input | FileCheck -check-prefix="ZERO" %s
|
||||
|
||||
|
@ -58,6 +58,13 @@ static cl::opt<bool>
|
||||
static cl::opt<bool>
|
||||
ClPrintInlining("inlining", cl::init(true),
|
||||
cl::desc("Print all inlined frames for a given address"));
|
||||
static cl::alias
|
||||
ClPrintInliningAliasI("i", cl::desc("Alias for -inlining"),
|
||||
cl::NotHidden, cl::aliasopt(ClPrintInlining),
|
||||
cl::Grouping);
|
||||
static cl::alias
|
||||
ClPrintInliningAliasInlines("inlines", cl::desc("Alias for -inlining"),
|
||||
cl::NotHidden, cl::aliasopt(ClPrintInlining));
|
||||
|
||||
// -basenames, -s
|
||||
static cl::opt<bool> ClBasenames("basenames", cl::init(false),
|
||||
|
Loading…
x
Reference in New Issue
Block a user