[PATCH] D109452: implement the --syms and using "symbol index and qualname" for --sym --symbol--description for llvm-objdump for xcoff

Esme Yi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 30 02:07:10 PDT 2021


Esme accepted this revision.
Esme added a comment.
This revision is now accepted and ready to land.

LGTM. Thanks for doing this.



================
Comment at: llvm/test/tools/llvm-objdump/XCOFF/print-linenumber.test:21
 # LINES32:       00000000 <.text>:
-# LINES32:       ; main():
+# LINES32:       ; .main():
 # LINES32-NEXT:  ; /basic.c:1
----------------
DiggerLin wrote:
> jhenderson wrote:
> > Mildly surprising there's a test change here. Why is there this change?
> for we implement the getSymbolFlag() and getSymbolType() in the patch. after implement the getSymbolType() , the symbol ".main" is  marked as  function (it is correct to mark .main as function, the symbol "main" is function description in aix).  so the here change to .main(),   @Esme , can you help to confirm it ?
Yes, I think the change is reasonable.
I'm trying to figure out why the output function name changed. By tracing the output of line `;.main():`, I found that after applying this patch, we override the default LineInfo.FunctionName with the name from symbol table (see function `SymbolizableObjectFile::symbolizeCode()` ). And I believe it was correct to do so.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109452



More information about the llvm-commits mailing list