forked from OSchip/llvm-project
DebugInfo: Don't print DIEs multiple times.
llvm-svn: 139671
This commit is contained in:
parent
97095d68a6
commit
1b2a65ca3a
|
@ -95,8 +95,7 @@ void DWARFCompileUnit::dump(raw_ostream &OS) {
|
|||
<< ")\n";
|
||||
|
||||
extractDIEsIfNeeded(false);
|
||||
for (unsigned i = 0, e = DieArray.size(); i != e; ++i)
|
||||
DieArray[i].dump(OS, this, 10);
|
||||
DieArray[0].dump(OS, this, -1U);
|
||||
}
|
||||
|
||||
void DWARFCompileUnit::setDIERelations() {
|
||||
|
|
|
@ -45,12 +45,10 @@ void DWARFDebugInfoEntryMinimal::dump(raw_ostream &OS,
|
|||
|
||||
const DWARFDebugInfoEntryMinimal *child = getFirstChild();
|
||||
if (recurseDepth > 0 && child) {
|
||||
indent += 2;
|
||||
while (child) {
|
||||
child->dump(OS, cu, recurseDepth-1, indent);
|
||||
child->dump(OS, cu, recurseDepth-1, indent+2);
|
||||
child = child->getSibling();
|
||||
}
|
||||
indent -= 2;
|
||||
}
|
||||
} else {
|
||||
OS << "Abbreviation code not found in 'debug_abbrev' class for code: "
|
||||
|
|
|
@ -33,6 +33,9 @@ class DWARFDebugInfoEntryMinimal {
|
|||
|
||||
const DWARFAbbreviationDeclaration *AbbrevDecl;
|
||||
public:
|
||||
DWARFDebugInfoEntryMinimal()
|
||||
: Offset(0), ParentIdx(0), SiblingIdx(0), AbbrevDecl(0) {}
|
||||
|
||||
void dump(raw_ostream &OS, const DWARFCompileUnit *cu,
|
||||
unsigned recurseDepth, unsigned indent = 0) const;
|
||||
void dumpAttribute(raw_ostream &OS, const DWARFCompileUnit *cu,
|
||||
|
|
Loading…
Reference in New Issue