mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
DebugInfo: Don't print DIEs multiple times.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139671 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e640a228f6
commit
15ec085c40
@ -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
Block a user