Add addr2line equivalent of -pretty-print
Details
Diff Detail
Event Timeline
| docs/CommandGuide/llvm-symbolizer.rst | ||
|---|---|---|
| 113 | 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 | ||
| 170–171 | 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 | argument/variable names start with capital letters (here and below) | |
| 35 | Just make this function print all the data to OS instead of creating a string. | |
| 47 | extra semicolon? | |
| 51–54 | Do you need to use printName here? | |
| 57 | i is always less than FrameNum OS << printName(Info.getFrame(i), i > 0); | |
| include/llvm/DebugInfo/Symbolize/DIPrinter.h | ||
|---|---|---|
| 31 | "InlinedFrame"? (also, CamelCase for variables). | |
| lib/DebugInfo/Symbolize/DIPrinter.cpp | ||
| 35 | I still don't see why you need std::string here - just pass all the stuff you print directly to OS. | |
| 56–57 | CamelCase. Also, probably you don't need extra var for this. | |
| tools/llvm-symbolizer/llvm-symbolizer.cpp | ||
| 82 | "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 | You probably need to enclose "-inlining" in double ticks as we do with other flags (check generated file). | |
| 114 | Grammar: "refer to" | |
| lib/DebugInfo/Symbolize/DIPrinter.cpp | ||
| 33 | Delimiter (CamelCase) | |
| 35 | OS << Prefix << FunctionName << Delimiter; | |
| 41 | run this with clang-format. | |
| 56–57 | Please address | |
Consider providing more details about the output difference (closer to how -pretty-print is described in "man addr2line"). You can also expand EXAMPLE section.