[llvm-commits] [llvm] r139705 - /llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp
Benjamin Kramer
benny.kra at googlemail.com
Wed Sep 14 10:54:56 PDT 2011
Author: d0k
Date: Wed Sep 14 12:54:56 2011
New Revision: 139705
URL: http://llvm.org/viewvc/llvm-project?rev=139705&view=rev
Log:
DWARF: Improve indentation of DIE dumping so it's easier to see the structure.
Modified:
llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp
Modified: llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp?rev=139705&r1=139704&r2=139705&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARFDebugInfoEntry.cpp Wed Sep 14 12:54:56 2011
@@ -28,12 +28,12 @@
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 @@
<< abbrCode << '\n';
}
} else {
- OS << "NULL\n";
+ OS.indent(indent) << "NULL\n";
}
}
}
@@ -66,9 +66,9 @@
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);
More information about the llvm-commits
mailing list