[Lldb-commits] [PATCH] D134516: [lldb] Improve display of absolute symbol lookup

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 23 02:20:15 PDT 2022


DavidSpickett added a reviewer: DavidSpickett.
DavidSpickett added inline comments.


================
Comment at: lldb/source/Commands/CommandObjectTarget.cpp:1552
           strm.IndentMore();
+          strm.Indent("    Name: ");
+          strm.PutCString(symbol->GetDisplayName().GetStringRef());
----------------
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);`.


================
Comment at: lldb/test/Shell/SymbolFile/absolute-symbol.test:4
 # CHECK: 1 symbols match 'absolute_symbol'
+# CHECK:   Name: absolute_symbol
 # CHECK:   Value: 0x0000000012345678
----------------
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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134516/new/

https://reviews.llvm.org/D134516



More information about the lldb-commits mailing list