[PATCH] Add addr2line aliases for symbolizer
khemant at codeaurora.org
khemant at codeaurora.org
Wed Jun 3 10:50:13 PDT 2015
Add -i for -inlining, -C for demangler and -e for -obj option.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D10221
Files:
test/DebugInfo/llvm-symbolizer.test
tools/llvm-symbolizer/llvm-symbolizer.cpp
Index: test/DebugInfo/llvm-symbolizer.test
===================================================================
--- test/DebugInfo/llvm-symbolizer.test
+++ test/DebugInfo/llvm-symbolizer.test
@@ -158,3 +158,18 @@
RUN: | FileCheck %s --check-prefix=SHORT_FUNCTION_NAME
SHORT_FUNCTION_NAME-NOT: _Z1cv
+
+RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" > %t.input7
+RUN: llvm-symbolizer --functions=short --use-symbol-table=false -C=false < %t.input7 \
+RUN: | FileCheck %s --check-prefix=ALIAS_SHORT_FUNCTION_NAME
+
+ALIAS_SHORT_FUNCTION_NAME-NOT: _Z1cv
+
+RUN: echo "0x400559" > %t.input4
+RUN: echo "0x400436" >> %t.input4
+RUN: llvm-symbolizer -e %p/Inputs/dwarfdump-test.elf-x86-64 < %t.input4 \
+RUN: | FileCheck %s --check-prefix=ALIAS_BINARY
+
+ALIAS_BINARY: main
+ALIAS_BINARY-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16
+ALIAS_BINARY: _start
Index: tools/llvm-symbolizer/llvm-symbolizer.cpp
===================================================================
--- tools/llvm-symbolizer/llvm-symbolizer.cpp
+++ tools/llvm-symbolizer/llvm-symbolizer.cpp
@@ -57,9 +57,15 @@
ClPrintInlining("inlining", cl::init(true),
cl::desc("Print all inlined frames for a given address"));
+static cl::alias ClAliasPrintInlining("i", cl::desc("alias for -inlining"),
+ cl::aliasopt(ClPrintInlining));
+
static cl::opt<bool>
ClDemangle("demangle", cl::init(true), cl::desc("Demangle function names"));
+static cl::alias ClAliasDemangle("C", cl::desc("alias for -demangle"),
+ cl::aliasopt(ClDemangle));
+
static cl::opt<std::string> ClDefaultArch("default-arch", cl::init(""),
cl::desc("Default architecture "
"(for multi-arch objects)"));
@@ -69,6 +75,9 @@
cl::desc("Path to object file to be symbolized (if not provided, "
"object file should be specified for each input line)"));
+static cl::alias ClAliasBinaryName("e", cl::desc("alias for -obj"),
+ cl::aliasopt(ClBinaryName));
+
static cl::list<std::string>
ClDsymHint("dsym-hint", cl::ZeroOrMore,
cl::desc("Path to .dSYM bundles to search for debug info for the "
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10221.27053.patch
Type: text/x-patch
Size: 2327 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150603/5bf6ffda/attachment.bin>
More information about the llvm-commits
mailing list