When running target module lookup command, show the name of absolute
symbols. Also fix indentation issue after printing an absolute symbol.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lldb/source/Commands/CommandObjectTarget.cpp | ||
---|---|---|
1552 | Could you use the stream's indent here instead of " Foo:"? You can pass a number of spaces to pad void IndentMore(unsigned amount = 2);. | |
lldb/test/Shell/SymbolFile/absolute-symbol.test | ||
4 | This is my ignorance talking, but isn't it redundant to print the name given that it's shown in the match line? Perhaps that lookup isn't exact and mangling or partial matches can lead to multiple matches in which case printing the line is very useful. |
lldb/source/Commands/CommandObjectTarget.cpp | ||
---|---|---|
1552 | I was just following the pre-existing code below and also in DumpAddress. I do have some issues with the output of the lookup command when there are multiple results -- there is no separation between different results which makes the output a bit hard to parse (and is why I made a semi-related patch in D134111), perhaps we can try to improve it more in a separate change. | |
lldb/test/Shell/SymbolFile/absolute-symbol.test | ||
4 | The lookup command can use regex filters which does usually return multiple matches. |
LGTM
lldb/source/Commands/CommandObjectTarget.cpp | ||
---|---|---|
1552 | Fair enough, I'd like it to be all stream.Indent but the result is the same so that's fine. It mostly helps if you come back later and add another level within this, but that doesn't seem likely here. |
Could you use the stream's indent here instead of " Foo:"? You can pass a number of spaces to pad void IndentMore(unsigned amount = 2);.