Add addr2line equivalent of -pretty-print
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
| docs/CommandGuide/llvm-symbolizer.rst | ||
|---|---|---|
| 105 ↗ | (On Diff #37154) | Consider providing more details about the output difference (closer to how -pretty-print is described in "man addr2line"). You can also expand EXAMPLE section. | 
| tools/llvm-symbolizer/LLVMSymbolize.h | ||
| 49 ↗ | (On Diff #37154) | Let's keep the same order of members and ctor args. | 
| tools/llvm-symbolizer/llvm-symbolizer.cpp | ||
| 164 ↗ | (On Diff #37154) | You can just use ternary operator here (and above). | 
You will need to update it after r251316. Also see http://reviews.llvm.org/D14099 with a brief plan of future changes - in case you want to hold this off until we factor out DILineInfo / DIInliningInfo rendering into separate class (PrettyPrint should be used there). It's fine if you want to proceed with this earlier, though,
I can wait till you re-factor the code. When are you planning to merge the patch that has SymbolizableObjectFile ?
I've changed a bunch of related code recently. Probably now you will need to add this functionality to DIPrinter implementation.
| include/llvm/DebugInfo/Symbolize/Symbolize.h | ||
|---|---|---|
| 41 ↗ | (On Diff #39257) | You don't need this now, do you? | 
| lib/DebugInfo/Symbolize/DIPrinter.cpp | ||
| 27 ↗ | (On Diff #39257) | argument/variable names start with capital letters (here and below) | 
| 36 ↗ | (On Diff #39257) | Just make this function print all the data to OS instead of creating a string. | 
| 48 ↗ | (On Diff #39257) | extra semicolon? | 
| 55 ↗ | (On Diff #39257) | Do you need to use printName here? | 
| 58 ↗ | (On Diff #39257) | i is always less than FrameNum OS << printName(Info.getFrame(i), i > 0); | 
| include/llvm/DebugInfo/Symbolize/DIPrinter.h | ||
|---|---|---|
| 31 ↗ | (On Diff #39380) | "InlinedFrame"? (also, CamelCase for variables). | 
| lib/DebugInfo/Symbolize/DIPrinter.cpp | ||
| 36 ↗ | (On Diff #39380) | I still don't see why you need std::string here - just pass all the stuff you print directly to OS. | 
| 58 ↗ | (On Diff #39380) | CamelCase. Also, probably you don't need extra var for this. | 
| tools/llvm-symbolizer/llvm-symbolizer.cpp | ||
| 82 ↗ | (On Diff #39380) | "readable". Also, I would prefer smth. along the lines of Make the output more human friendly. | 
Looks almost fine, minor remaining comments below.
| docs/CommandGuide/llvm-symbolizer.rst | ||
|---|---|---|
| 113 ↗ | (On Diff #39713) | You probably need to enclose "-inlining" in double ticks as we do with other flags (check generated file). | 
| 114 ↗ | (On Diff #39713) | Grammar: "refer to" | 
| lib/DebugInfo/Symbolize/DIPrinter.cpp | ||
| 33 ↗ | (On Diff #39713) | Delimiter (CamelCase) | 
| 35 ↗ | (On Diff #39713) | OS << Prefix << FunctionName << Delimiter; | 
| 41 ↗ | (On Diff #39713) | run this with clang-format. | 
| 56–57 ↗ | (On Diff #39713) | Please address |