[PATCH] D81585: [AIX][XCOFF] Decode trace back table information for xcoff object file for llvm-objdump -d
Digger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 17 09:08:55 PDT 2020
DiggerLin marked 21 inline comments as done.
DiggerLin added inline comments.
================
Comment at: llvm/tools/llvm-objdump/XCOFFDump.cpp:94
+
+bool objdump::isXCOFFTracebackTableBegin(ArrayRef<uint8_t> Bytes) {
+ // Tableback table begin with sizeof(long) bytes zero.
----------------
Xiangling_L wrote:
> nit:
> s/isXCOFFTracebackTableBegin/doesXCOFFTracebackTableBegin ?
thanks for your suggestion.
================
Comment at: llvm/tools/llvm-objdump/XCOFFDump.cpp:289
+ Index += Len;
+ }
+ }
----------------
Xiangling_L wrote:
> For line #276 - #289, can we do this?
>
> ```
> OS << "# Function Name: ";
> while (NameLen > 0) {
> int Len = NameLen >= 4 ? 4 : NameLen;
> CurBytes = Bytes.slice(Index, Len);
> formatTracebackTableOutput(CurBytes, Address + Index, OS);
> OS << StringRef((const char *)CurBytes.data(), Len) << "\n";
> NameLen -= Len;
> Index += Len;
> }
> ```
Sorry , I do not think we can do that.
currently , we print out as
be: 6d 61 69 6e # Function Name: main
if change . it will look like
# Function Name: be: 6d 61 69 6e main
================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:1461
bool DumpARMELFData = false;
+ bool IsXCOFFFunctionEntryPointSymbol =
+ Obj->isXCOFF() && Section.isText() && TracebackTable &&
----------------
Xiangling_L wrote:
> The queries you use kinda mismatch with `IsXCOFFFunctionEntryPointSymbol `. They are more like checking if we are gonna "DumpTracebackTableForXCOFFFunction"?
thanks for your suggestion
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81585/new/
https://reviews.llvm.org/D81585
More information about the llvm-commits
mailing list