[PATCH] D89049: [AIX][XCOFF] print out the traceback info
Digger Lin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 26 07:20:33 PDT 2023
DiggerLin added inline comments.
================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:1746
+ Symbols[SI - 1].XCOFFSymInfo.StorageMappingClass &&
+ (*Symbols[SI - 1].XCOFFSymInfo.StorageMappingClass == XCOFF::XMC_PR);
+
----------------
MaskRay wrote:
> Is there a risk that `SI-1 == size_t(-1)` ?
I do not think there is a risk
```
for (size_t SI = 0, SE = Symbols.size(); SI != SE;) {
// Advance SI past all the symbols starting at the same address,
// and make an ArrayRef of them.
unsigned FirstSI = SI;
uint64_t Start = Symbols[SI].Addr;
ArrayRef<SymbolInfoTy> SymbolsHere;
while (SI != SE && Symbols[SI].Addr == Start)
++SI;
```
while (SI != SE && Symbols[SI].Addr == Start)
++SI;
must be run when the code first time enter the loop. so after the ++SI, the SI must be large than 0.
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