[PATCH] D89049: [AIX][XCOFF] print out the traceback info

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 23 13:06:41 PDT 2023


MaskRay added a comment.

I just took a rough look. The new code and test look good to me.



================
Comment at: llvm/tools/llvm-objdump/XCOFFDump.cpp:163
+    uint64_t LastNonZero = Index;
+
+    for (uint64_t I = Index; I < Size; I += 4) {
----------------
delete blank line


================
Comment at: llvm/tools/llvm-objdump/XCOFFDump.cpp:164
+
+    for (uint64_t I = Index; I < Size; I += 4) {
+      if (support::endian::read32be(Bytes.slice(I, 4).data()) != 0)
----------------
omit braces 


================
Comment at: llvm/tools/llvm-objdump/XCOFFDump.cpp:187
+
+  XCOFFTracebackTable TbTable = *TTOrErr;
+
----------------
move this to the first use site and delete the blank line after the declaration.

actually, it may be better to avoid this used-only-once variable.


================
Comment at: llvm/tools/llvm-objdump/XCOFFDump.cpp:278
+    uint16_t FunctionNameLen = TbTable.getFunctionName()->size();
+
+    if (FunctionNameLen == 0) {
----------------
delete blank line


================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:1746
+          Symbols[SI - 1].XCOFFSymInfo.StorageMappingClass &&
+          (*Symbols[SI - 1].XCOFFSymInfo.StorageMappingClass == XCOFF::XMC_PR);
+
----------------
Is there a risk that `SI-1 == size_t(-1)` ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89049



More information about the llvm-commits mailing list