[PATCH] D81585: [AIX][XCOFF] Decode trace back table information for xcoff object file for llvm-objdump -d

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 18 09:46:13 PDT 2020


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/tools/llvm-objdump/XCOFFDump.h:32-38
+void formatTracebackTableOutput(ArrayRef<uint8_t> Bytes, uint64_t Address,
+                                raw_ostream &OS);
+
+void dumpTracebackTable(ArrayRef<uint8_t> Bytes, uint64_t Address,
+                        raw_ostream &OS, uint64_t End);
+
+bool doesXCOFFTracebackTableBegin(ArrayRef<uint8_t> Bytes);
----------------
jhenderson wrote:
> DiggerLin wrote:
> > jhenderson wrote:
> > > It seems to me like this new code would be better off in a library somewhere, e.g. somewhere in the `Object` library. That would allow more focused testing of it (via unit tests), and in the future other tools could be taught to parse the data structure too.
> > we has discussed whether we need to decode traceback table in other tools in our team  and whether to implement some functionality in the object file. we do not find  other tools now, even if there is later, we can do a NFC patch. 
> You seem to have ignored the first half of my reasoning - it allows more focused unit testing, rather than trying to write all the tests in lit tests, especially given you currently have no way of generating the input files at test time.
I agree with @jhenderson's request to use the approach of implementing in the library so that smaller steps can be taken first, with the `llvm-objdump` change last.


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