[PATCH] D89049: [AIX][XCOFF] print out the traceback info
Stephen Peckham via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 26 11:05:58 PDT 2023
stephenpeckham added a comment.
The changes to the yaml2obj files allow valid XCOFF files to be generated. With the suggested changes, you can run "ld -r" on the generate object files.
Testing for this patch is difficult because the compiler doesn't generate all combinations of optional traceback-table fields.
================
Comment at: llvm/lib/Object/XCOFFObjectFile.cpp:1464
+ // Skip two bytes of padding after vector info.
+ DE.skip(Cur, 2);
}
----------------
This is not right. The only potential padding in a traceback table is before the EH value (if TB_EH_INFO is set), because the eh value must be aligned on a word boundary.
Removing DH.skip(2) will affect the tests.
An object with vector information and EH information will be displayed incorrectly.
================
Comment at: llvm/test/tools/llvm-objdump/XCOFF/disassemble-invalid-traceback-table.test:23
+ - Type: AUX_CSECT
+ SymbolAlignmentAndType: 0x02
+ StorageMappingClass: XMC_PR
----------------
SectionOrLength: 40
SymbolAlignmentAndType: 0x21
will generate a valid XCOFF file
================
Comment at: llvm/test/tools/llvm-objdump/XCOFF/disassemble-traceback-table-warning.test:22
+ - Type: AUX_CSECT
+ SymbolAlignmentAndType: 0x02
+ StorageMappingClass: XMC_PR
----------------
SymbolAlignmentAndType: 0x21
SetionOrLength: 0x24
================
Comment at: llvm/test/tools/llvm-objdump/XCOFF/disassemble-traceback-table-warning.test:31
+ - Type: AUX_CSECT
+ SymbolAlignmentAndType: 0x02
+ StorageMappingClass: XMC_PR
----------------
SymbolAlignmentAndType: 0x21
================
Comment at: llvm/test/tools/llvm-objdump/XCOFF/disassemble-traceback-table.test:28
+ - Type: AUX_CSECT
+ SymbolAlignmentAndType: 0x02
+ StorageMappingClass: XMC_PR
----------------
SymbolAlignmentAndType: 0x21
SectionOrLength:0x24
================
Comment at: llvm/test/tools/llvm-objdump/XCOFF/disassemble-traceback-table.test:37
+ - Type: AUX_CSECT
+ SymbolAlignmentAndType: 0x02
+ StorageMappingClass: XMC_PR
----------------
SymbolAlignmentAndType: 0x21
SectionOrLength:0x38
================
Comment at: llvm/tools/llvm-objdump/XCOFFDump.cpp:270
+ PrintBytes(4);
+ OS << "\t ControlledStorageInfoDisp[" << I << "] = " << Disp[I];
+ // Print another 4 bytes for 64 bit.
----------------
It's not critical, but I would use "# " in the output for the array of displacements.
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