diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-11-01 17:53:30 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-11-01 17:53:30 +0000 |
commit | 2e110c3fa62bce0182c1635964f5e09e34e3cbb5 (patch) | |
tree | 5c87038de5083a5105934556656693bf35761326 /lib | |
parent | 26cc826a0e4693b861776d6b349d41d0e5c2678e (diff) | |
download | llvm-2e110c3fa62bce0182c1635964f5e09e34e3cbb5.tar.gz llvm-2e110c3fa62bce0182c1635964f5e09e34e3cbb5.tar.bz2 llvm-2e110c3fa62bce0182c1635964f5e09e34e3cbb5.tar.xz |
DebugInfo: Make pubnames header printing similar to unit header printing
In a failed attempt to allow the gnu-public-names.ll test case to not
hardcode the size of the unit that the pubnames section referred to I've
at least managed to have unit headers and pubnames headers print out in
a similar style.
This failed to achieve the desired goal because the header in a unit
specifies the length of the unit without the length element of the
header whereas the length in the pubnames includes this element, so the
numbers are off by 4 bytes. I don't know of any arithmetic powers in
FileCheck so the test case can't simply say "CU_LENGTH + 4".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/DebugInfo/DWARFContext.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/DebugInfo/DWARFContext.cpp b/lib/DebugInfo/DWARFContext.cpp index 6056de7a35..e47719025c 100644 --- a/lib/DebugInfo/DWARFContext.cpp +++ b/lib/DebugInfo/DWARFContext.cpp @@ -34,10 +34,10 @@ static void dumpPubSection(raw_ostream &OS, StringRef Name, StringRef Data, OS << "\n." << Name << " contents:\n"; DataExtractor pubNames(Data, LittleEndian, 0); uint32_t offset = 0; - OS << "Length: " << pubNames.getU32(&offset) << "\n"; - OS << "Version: " << pubNames.getU16(&offset) << "\n"; - OS << "Offset in .debug_info: " << pubNames.getU32(&offset) << "\n"; - OS << "Size: " << pubNames.getU32(&offset) << "\n"; + OS << "length = " << format("0x%08x", pubNames.getU32(&offset)); + OS << " version = " << format("0x%04x", pubNames.getU16(&offset)); + OS << " unit_offset = " << format("0x%08x", pubNames.getU32(&offset)); + OS << " unit_size = " << format("0x%08x", pubNames.getU32(&offset)) << '\n'; if (GnuStyle) OS << "Offset Linkage Kind Name\n"; else |