This reverts commit r255790.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255791
91177308-0d34-0410-b5e6-
96231b3b80d8
void printCOFFExports() override;
void printCOFFDirectives() override;
void printCOFFBaseReloc() override;
void printCOFFExports() override;
void printCOFFDirectives() override;
void printCOFFBaseReloc() override;
- void printCodeViewDebugInfo() override;
void printStackMap() const override;
private:
void printSymbol(const SymbolRef &Sym);
void printStackMap() const override;
private:
void printSymbol(const SymbolRef &Sym);
void printBaseOfDataField(const pe32_header *Hdr);
void printBaseOfDataField(const pe32plus_header *Hdr);
void printBaseOfDataField(const pe32_header *Hdr);
void printBaseOfDataField(const pe32plus_header *Hdr);
- void printCodeViewSection(const SectionRef &Section);
+ void printCodeViewDebugInfo(const SectionRef &Section);
void printCodeViewSymbolsSubsection(StringRef Subsection,
const SectionRef &Section,
void printCodeViewSymbolsSubsection(StringRef Subsection,
const SectionRef &Section,
void COFFDumper::printBaseOfDataField(const pe32plus_header *) {}
void COFFDumper::printBaseOfDataField(const pe32plus_header *) {}
-void COFFDumper::printCodeViewDebugInfo() {
- for (const SectionRef &S : Obj->sections()) {
- StringRef SecName;
- error(S.getName(SecName));
- if (SecName == ".debug$S")
- printCodeViewSection(S);
- }
-}
-
-void COFFDumper::printCodeViewSection(const SectionRef &Section) {
+void COFFDumper::printCodeViewDebugInfo(const SectionRef &Section) {
StringRef Data;
error(Section.getContents(Data));
StringRef Data;
error(Section.getContents(Data));
switch (SubSectionType) {
case COFF::DEBUG_SYMBOL_SUBSECTION:
switch (SubSectionType) {
case COFF::DEBUG_SYMBOL_SUBSECTION:
- printCodeViewSymbolsSubsection(Contents, Section, Offset);
+ if (opts::SectionSymbols)
+ printCodeViewSymbolsSubsection(Contents, Section, Offset);
break;
case COFF::DEBUG_LINE_TABLE_SUBSECTION: {
// Holds a PC to file:line table. Some data to parse this subsection is
break;
case COFF::DEBUG_LINE_TABLE_SUBSECTION: {
// Holds a PC to file:line table. Some data to parse this subsection is
+ if (Name == ".debug$S" && opts::CodeView)
+ printCodeViewDebugInfo(Sec);
+
if (opts::SectionData &&
!(Section->Characteristics & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA)) {
StringRef Data;
if (opts::SectionData &&
!(Section->Characteristics & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA)) {
StringRef Data;
virtual void printCOFFExports() { }
virtual void printCOFFDirectives() { }
virtual void printCOFFBaseReloc() { }
virtual void printCOFFExports() { }
virtual void printCOFFDirectives() { }
virtual void printCOFFBaseReloc() { }
- virtual void printCodeViewDebugInfo() { }
// Only implemented for MachO.
virtual void printMachODataInCode() { }
// Only implemented for MachO.
virtual void printMachODataInCode() { }
Dumper->printCOFFDirectives();
if (opts::COFFBaseRelocs)
Dumper->printCOFFBaseReloc();
Dumper->printCOFFDirectives();
if (opts::COFFBaseRelocs)
Dumper->printCOFFBaseReloc();
- if (opts::CodeView)
- Dumper->printCodeViewDebugInfo();
}
if (Obj->isMachO()) {
if (opts::MachODataInCode)
}
if (Obj->isMachO()) {
if (opts::MachODataInCode)