summaryrefslogtreecommitdiff
path: root/tools/llvm-symbolizer
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2017-01-31 22:19:38 +0000
committerDavid Blaikie <dblaikie@gmail.com>2017-01-31 22:19:38 +0000
commitfbad5bd6910ae387588281f8cd518540832df391 (patch)
treeec116fb8fe31920039fa2a4a57a78f2d6ea14dee /tools/llvm-symbolizer
parentc2913cb380e80863d34435a989691adc21bee402 (diff)
downloadllvm-fbad5bd6910ae387588281f8cd518540832df391.tar.gz
Add a verbose/human readable mode to llvm-symbolizer to investigate discriminators and other line table/backtrace features
Patch by Simon Que! Differential Revision: https://reviews.llvm.org/D29094 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-symbolizer')
-rw-r--r--tools/llvm-symbolizer/llvm-symbolizer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/llvm-symbolizer/llvm-symbolizer.cpp b/tools/llvm-symbolizer/llvm-symbolizer.cpp
index fc37dea4c484..c9e0cc2b3b05 100644
--- a/tools/llvm-symbolizer/llvm-symbolizer.cpp
+++ b/tools/llvm-symbolizer/llvm-symbolizer.cpp
@@ -85,6 +85,9 @@ static cl::opt<int> ClPrintSourceContextLines(
"print-source-context-lines", cl::init(0),
cl::desc("Print N number of source file context"));
+static cl::opt<bool> ClVerbose("verbose", cl::init(false),
+ cl::desc("Print verbose line info"));
+
template<typename T>
static bool error(Expected<T> &ResOrErr) {
if (ResOrErr)
@@ -160,7 +163,7 @@ int main(int argc, char **argv) {
LLVMSymbolizer Symbolizer(Opts);
DIPrinter Printer(outs(), ClPrintFunctions != FunctionNameKind::None,
- ClPrettyPrint, ClPrintSourceContextLines);
+ ClPrettyPrint, ClPrintSourceContextLines, ClVerbose);
const int kMaxInputStringLength = 1024;
char InputString[kMaxInputStringLength];