[llvm] r191408 - Dump the normal dwarf pubtypes section as well.
Eric Christopher
echristo at gmail.com
Wed Sep 25 16:02:41 PDT 2013
Author: echristo
Date: Wed Sep 25 18:02:41 2013
New Revision: 191408
URL: http://llvm.org/viewvc/llvm-project?rev=191408&view=rev
Log:
Dump the normal dwarf pubtypes section as well.
Modified:
llvm/trunk/include/llvm/DebugInfo/DIContext.h
llvm/trunk/lib/DebugInfo/DWARFContext.cpp
llvm/trunk/lib/DebugInfo/DWARFContext.h
llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
Modified: llvm/trunk/include/llvm/DebugInfo/DIContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/DIContext.h?rev=191408&r1=191407&r2=191408&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/DIContext.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/DIContext.h Wed Sep 25 18:02:41 2013
@@ -109,6 +109,7 @@ enum DIDumpType {
DIDT_Loc,
DIDT_Ranges,
DIDT_Pubnames,
+ DIDT_Pubtypes,
DIDT_GnuPubnames,
DIDT_GnuPubtypes,
DIDT_Str,
Modified: llvm/trunk/lib/DebugInfo/DWARFContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFContext.cpp?rev=191408&r1=191407&r2=191408&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARFContext.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARFContext.cpp Wed Sep 25 18:02:41 2013
@@ -54,7 +54,7 @@ static void dumpPubSection(raw_ostream &
<< ' ' << '\"' << pubNames.getCStr(&offset) << "\"\n";
} else {
OS << format("0x%8.8x ", dieRef);
- OS << pubNames.getCStr(&offset) << "\n";
+ OS << '\"' << pubNames.getCStr(&offset) << "\"\n";
}
}
}
@@ -143,6 +143,10 @@ void DWARFContext::dump(raw_ostream &OS,
dumpPubSection(OS, "debug_pubnames", getPubNamesSection(),
isLittleEndian(), false);
+ if (DumpType == DIDT_All || DumpType == DIDT_Pubtypes)
+ dumpPubSection(OS, "debug_pubtypes", getPubTypesSection(),
+ isLittleEndian(), false);
+
if (DumpType == DIDT_All || DumpType == DIDT_GnuPubnames)
dumpPubSection(OS, "debug_gnu_pubnames", getGnuPubNamesSection(),
isLittleEndian(), true /* GnuStyle */);
@@ -605,25 +609,27 @@ DWARFContextInMemory::DWARFContextInMemo
UncompressedSections.push_back(UncompressedSection.take());
}
- StringRef *Section = StringSwitch<StringRef*>(name)
- .Case("debug_info", &InfoSection.Data)
- .Case("debug_abbrev", &AbbrevSection)
- .Case("debug_loc", &LocSection.Data)
- .Case("debug_line", &LineSection.Data)
- .Case("debug_aranges", &ARangeSection)
- .Case("debug_frame", &DebugFrameSection)
- .Case("debug_str", &StringSection)
- .Case("debug_ranges", &RangeSection)
- .Case("debug_pubnames", &PubNamesSection)
- .Case("debug_gnu_pubnames", &GnuPubNamesSection)
- .Case("debug_gnu_pubtypes", &GnuPubTypesSection)
- .Case("debug_info.dwo", &InfoDWOSection.Data)
- .Case("debug_abbrev.dwo", &AbbrevDWOSection)
- .Case("debug_str.dwo", &StringDWOSection)
- .Case("debug_str_offsets.dwo", &StringOffsetDWOSection)
- .Case("debug_addr", &AddrSection)
- // Any more debug info sections go here.
- .Default(0);
+ StringRef *Section =
+ StringSwitch<StringRef *>(name)
+ .Case("debug_info", &InfoSection.Data)
+ .Case("debug_abbrev", &AbbrevSection)
+ .Case("debug_loc", &LocSection.Data)
+ .Case("debug_line", &LineSection.Data)
+ .Case("debug_aranges", &ARangeSection)
+ .Case("debug_frame", &DebugFrameSection)
+ .Case("debug_str", &StringSection)
+ .Case("debug_ranges", &RangeSection)
+ .Case("debug_pubnames", &PubNamesSection)
+ .Case("debug_pubtypes", &PubTypesSection)
+ .Case("debug_gnu_pubnames", &GnuPubNamesSection)
+ .Case("debug_gnu_pubtypes", &GnuPubTypesSection)
+ .Case("debug_info.dwo", &InfoDWOSection.Data)
+ .Case("debug_abbrev.dwo", &AbbrevDWOSection)
+ .Case("debug_str.dwo", &StringDWOSection)
+ .Case("debug_str_offsets.dwo", &StringOffsetDWOSection)
+ .Case("debug_addr", &AddrSection)
+ // Any more debug info sections go here.
+ .Default(0);
if (Section) {
*Section = data;
if (name == "debug_ranges") {
Modified: llvm/trunk/lib/DebugInfo/DWARFContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFContext.h?rev=191408&r1=191407&r2=191408&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARFContext.h (original)
+++ llvm/trunk/lib/DebugInfo/DWARFContext.h Wed Sep 25 18:02:41 2013
@@ -147,6 +147,7 @@ public:
virtual StringRef getStringSection() = 0;
virtual StringRef getRangeSection() = 0;
virtual StringRef getPubNamesSection() = 0;
+ virtual StringRef getPubTypesSection() = 0;
virtual StringRef getGnuPubNamesSection() = 0;
virtual StringRef getGnuPubTypesSection() = 0;
@@ -187,6 +188,7 @@ class DWARFContextInMemory : public DWAR
StringRef StringSection;
StringRef RangeSection;
StringRef PubNamesSection;
+ StringRef PubTypesSection;
StringRef GnuPubNamesSection;
StringRef GnuPubTypesSection;
@@ -217,6 +219,7 @@ public:
virtual StringRef getStringSection() { return StringSection; }
virtual StringRef getRangeSection() { return RangeSection; }
virtual StringRef getPubNamesSection() { return PubNamesSection; }
+ virtual StringRef getPubTypesSection() { return PubTypesSection; }
virtual StringRef getGnuPubNamesSection() { return GnuPubNamesSection; }
virtual StringRef getGnuPubTypesSection() { return GnuPubTypesSection; }
Modified: llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp?rev=191408&r1=191407&r2=191408&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp (original)
+++ llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp Wed Sep 25 18:02:41 2013
@@ -67,6 +67,7 @@ DumpType("debug-dump", cl::init(DIDT_All
clEnumValN(DIDT_Frames, "frames", ".debug_frame"),
clEnumValN(DIDT_Ranges, "ranges", ".debug_ranges"),
clEnumValN(DIDT_Pubnames, "pubnames", ".debug_pubnames"),
+ clEnumValN(DIDT_Pubtypes, "pubtypes", ".debug_pubtypes"),
clEnumValN(DIDT_Str, "str", ".debug_str"),
clEnumValN(DIDT_StrDwo, "str.dwo", ".debug_str.dwo"),
clEnumValN(DIDT_StrOffsetsDwo, "str_offsets.dwo", ".debug_str_offsets.dwo"),
More information about the llvm-commits
mailing list