From 859385d79e8c0f651652adf2ee44c10cdec8daab Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Wed, 1 Mar 2017 19:43:29 +0000 Subject: [PATCH] [DWARF] Print leading zeros in type signature git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296663 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/DebugInfo/DWARF/DWARFTypeUnit.cpp | 4 ++-- .../Inputs/dwarfdump-header.elf-x86-64 | Bin 2376 -> 2376 bytes test/DebugInfo/Inputs/dwarfdump-header.s | 2 +- test/DebugInfo/dwarfdump-header.test | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp b/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp index 9df5daec091..e0f81938328 100644 --- a/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp +++ b/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp @@ -33,7 +33,7 @@ void DWARFTypeUnit::dump(raw_ostream &OS, bool SummarizeTypes) { if (SummarizeTypes) { OS << "name = '" << Name << "'" - << " type_signature = " << format("0x%16" PRIx64, TypeHash) + << " type_signature = " << format("0x%016" PRIx64, TypeHash) << " length = " << format("0x%08x", getLength()) << '\n'; return; } @@ -46,7 +46,7 @@ void DWARFTypeUnit::dump(raw_ostream &OS, bool SummarizeTypes) { OS << " abbr_offset = " << format("0x%04x", getAbbreviations()->getOffset()) << " addr_size = " << format("0x%02x", getAddressByteSize()) << " name = '" << Name << "'" - << " type_signature = " << format("0x%16" PRIx64, TypeHash) + << " type_signature = " << format("0x%016" PRIx64, TypeHash) << " type_offset = " << format("0x%04x", TypeOffset) << " (next unit at " << format("0x%08x", getNextUnitOffset()) << ")\n"; diff --git a/test/DebugInfo/Inputs/dwarfdump-header.elf-x86-64 b/test/DebugInfo/Inputs/dwarfdump-header.elf-x86-64 index 5a6f0cf7bb30ec0125a1305a156fdde4ed7244aa..447813419e3ee74e8b0241a2608db17b8acd7b24 100644 GIT binary patch delta 20 bcmX>hbV6vtKaTRWP#0q*L59t2j7}T?Q8)%G delta 20 bcmX>hbV6vtKaP&_v``mgCBe;Xj7}T?RzwD~ diff --git a/test/DebugInfo/Inputs/dwarfdump-header.s b/test/DebugInfo/Inputs/dwarfdump-header.s index f9ebc047d57..ce51e987f38 100644 --- a/test/DebugInfo/Inputs/dwarfdump-header.s +++ b/test/DebugInfo/Inputs/dwarfdump-header.s @@ -111,7 +111,7 @@ TU_4_version: .short 4 # DWARF version number .long .debug_abbrev # Offset Into Abbrev. Section .byte 8 # Address Size (in bytes) - .quad 0x1122334455667788 # Type Signature + .quad 0x0011223344556677 # Type Signature .long TU_4_type-TU_4_start # Type offset # The type-unit DIE, which has a name. .byte 2 diff --git a/test/DebugInfo/dwarfdump-header.test b/test/DebugInfo/dwarfdump-header.test index 7c198d423f3..3947c8b438d 100644 --- a/test/DebugInfo/dwarfdump-header.test +++ b/test/DebugInfo/dwarfdump-header.test @@ -19,7 +19,7 @@ CHECK-LABEL: .debug_types contents: The v4 type unit header. -CHECK: 0x00000000: Type Unit: length = 0x0000001f version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 name = 'V4_type_unit' type_signature = 0x1122334455667788 type_offset = 0x001c (next unit at 0x00000023) +CHECK: 0x00000000: Type Unit: length = 0x0000001f version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 name = 'V4_type_unit' type_signature = 0x0011223344556677 type_offset = 0x001c (next unit at 0x00000023) CHECK: 0x00000017: DW_TAG_type_unit FIXME: DWARF v5 wants type units in .debug_info[.dwo] not .debug_types[.dwo]. -- 2.40.0