[llvm] r259723 - Print the OffsetStart field's relocation
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 3 14:45:22 PST 2016
Author: majnemer
Date: Wed Feb 3 16:45:21 2016
New Revision: 259723
URL: http://llvm.org/viewvc/llvm-project?rev=259723&view=rev
Log:
Print the OffsetStart field's relocation
Modified:
llvm/trunk/tools/llvm-readobj/COFFDumper.cpp
Modified: llvm/trunk/tools/llvm-readobj/COFFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/COFFDumper.cpp?rev=259723&r1=259722&r2=259723&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/COFFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/COFFDumper.cpp Wed Feb 3 16:45:21 2016
@@ -89,7 +89,9 @@ private:
StringRef getFileNameForFileOffset(uint32_t FileOffset);
void printFileNameForOffset(StringRef Label, uint32_t FileOffset);
void printTypeIndex(StringRef FieldName, TypeIndex TI);
- void printLocalVariableAddrRange(const LocalVariableAddrRange &Range);
+ void printLocalVariableAddrRange(const LocalVariableAddrRange &Range,
+ const coff_section *Sec,
+ StringRef SectionContents);
void printLocalVariableAddrGap(const LocalVariableAddrGap &Gap);
void printCodeViewSymbolsSubsection(StringRef Subsection,
@@ -1507,7 +1509,8 @@ void COFFDumper::printCodeViewSymbolsSub
error(consumeObject(SymData, DefRangeRegister));
W.printNumber("Register", DefRangeRegister->Register);
W.printNumber("MayHaveNoName", DefRangeRegister->MayHaveNoName);
- printLocalVariableAddrRange(DefRangeRegister->Range);
+ printLocalVariableAddrRange(DefRangeRegister->Range, Sec,
+ SectionContents);
while (!SymData.empty()) {
const LocalVariableAddrGap *Gap;
error(consumeObject(SymData, Gap));
@@ -1524,7 +1527,8 @@ void COFFDumper::printCodeViewSymbolsSub
DefRangeSubfieldRegisterSym->MayHaveNoName);
W.printNumber("OffsetInParent",
DefRangeSubfieldRegisterSym->OffsetInParent);
- printLocalVariableAddrRange(DefRangeSubfieldRegisterSym->Range);
+ printLocalVariableAddrRange(DefRangeSubfieldRegisterSym->Range, Sec,
+ SectionContents);
while (!SymData.empty()) {
const LocalVariableAddrGap *Gap;
error(consumeObject(SymData, Gap));
@@ -1537,7 +1541,8 @@ void COFFDumper::printCodeViewSymbolsSub
const DefRangeFramePointerRelSym *DefRangeFramePointerRel;
error(consumeObject(SymData, DefRangeFramePointerRel));
W.printNumber("Offset", DefRangeFramePointerRel->Offset);
- printLocalVariableAddrRange(DefRangeFramePointerRel->Range);
+ printLocalVariableAddrRange(DefRangeFramePointerRel->Range, Sec,
+ SectionContents);
while (!SymData.empty()) {
const LocalVariableAddrGap *Gap;
error(consumeObject(SymData, Gap));
@@ -1561,7 +1566,8 @@ void COFFDumper::printCodeViewSymbolsSub
W.printBoolean("HasSpilledUDTMember",
DefRangeRegisterRel->hasSpilledUDTMember());
W.printNumber("OffsetInParent", DefRangeRegisterRel->offsetInParent());
- printLocalVariableAddrRange(DefRangeRegisterRel->Range);
+ printLocalVariableAddrRange(DefRangeRegisterRel->Range, Sec,
+ SectionContents);
while (!SymData.empty()) {
const LocalVariableAddrGap *Gap;
error(consumeObject(SymData, Gap));
@@ -1884,9 +1890,10 @@ void COFFDumper::printTypeIndex(StringRe
}
void COFFDumper::printLocalVariableAddrRange(
- const LocalVariableAddrRange &Range) {
- W.printNumber("OffsetStart", Range.OffsetStart);
- W.printNumber("ISectStart", Range.ISectStart);
+ const LocalVariableAddrRange &Range, const coff_section *Sec,
+ StringRef SectionContents) {
+ printRelocatedField("OffsetStart", Sec, SectionContents, &Range.OffsetStart);
+ W.printHex("ISectStart", Range.ISectStart);
W.printNumber("Range", Range.Range);
}
More information about the llvm-commits
mailing list