diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-09-14 17:54:56 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-09-14 17:54:56 +0000 |
| commit | f915acc6134e0001160a0edb527d6e0c1c633a27 (patch) | |
| tree | 31c175715da5abbc9e4f653e5d12ac949c722086 /llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp | |
| parent | 2ced26ef72edc3a9f6d701681e623a889ef7e7af (diff) | |
| download | bcm5719-llvm-f915acc6134e0001160a0edb527d6e0c1c633a27.tar.gz bcm5719-llvm-f915acc6134e0001160a0edb527d6e0c1c633a27.zip | |
DWARF: Improve indentation of DIE dumping so it's easier to see the structure.
llvm-svn: 139705
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp')
| -rw-r--r-- | llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp b/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp index 6923f6cce46..627fad5afce 100644 --- a/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp +++ b/llvm/lib/DebugInfo/DWARFDebugInfoEntry.cpp @@ -28,12 +28,12 @@ void DWARFDebugInfoEntryMinimal::dump(raw_ostream &OS, if (debug_info_data.isValidOffset(offset)) { uint64_t abbrCode = debug_info_data.getULEB128(&offset); - OS.indent(indent) << format("\n0x%8.8x: ", Offset); + OS << format("\n0x%8.8x: ", Offset); if (abbrCode) { if (AbbrevDecl) { - OS << TagString(AbbrevDecl->getTag()) - << format(" [%u] %c\n", abbrCode, - AbbrevDecl->hasChildren() ? '*': ' '); + OS.indent(indent) << TagString(AbbrevDecl->getTag()) + << format(" [%u] %c\n", abbrCode, + AbbrevDecl->hasChildren() ? '*': ' '); // Dump all data in the .debug_info for the attributes const uint32_t numAttributes = AbbrevDecl->getNumAttributes(); @@ -55,7 +55,7 @@ void DWARFDebugInfoEntryMinimal::dump(raw_ostream &OS, << abbrCode << '\n'; } } else { - OS << "NULL\n"; + OS.indent(indent) << "NULL\n"; } } } @@ -66,9 +66,9 @@ void DWARFDebugInfoEntryMinimal::dumpAttribute(raw_ostream &OS, uint16_t attr, uint16_t form, unsigned indent) const { - OS.indent(indent) << format("0x%8.8x: ", *offset_ptr) - << AttributeString(attr) - << " [" << FormEncodingString(form) << ']'; + OS << format("0x%8.8x: ", *offset_ptr); + OS.indent(indent+2) << AttributeString(attr) + << " [" << FormEncodingString(form) << ']'; DWARFFormValue formValue(form); |

