[llvm] r296663 - [DWARF] Print leading zeros in type signature

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 6 14:38:08 PST 2017


Thanks! I kept seeing that/meaning to fix it and never got around to it.


On Wed, Mar 1, 2017 at 11:55 AM Paul Robinson via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: probinson
> Date: Wed Mar  1 13:43:29 2017
> New Revision: 296663
>
> URL: http://llvm.org/viewvc/llvm-project?rev=296663&view=rev
> Log:
> [DWARF] Print leading zeros in type signature
>
> Modified:
>     llvm/trunk/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp
>     llvm/trunk/test/DebugInfo/Inputs/dwarfdump-header.elf-x86-64
>     llvm/trunk/test/DebugInfo/Inputs/dwarfdump-header.s
>     llvm/trunk/test/DebugInfo/dwarfdump-header.test
>
> Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp?rev=296663&r1=296662&r2=296663&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp (original)
> +++ llvm/trunk/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp Wed Mar  1 13:43:29
> 2017
> @@ -33,7 +33,7 @@ void DWARFTypeUnit::dump(raw_ostream &OS
>
>    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
>    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";
>
>
> Modified: llvm/trunk/test/DebugInfo/Inputs/dwarfdump-header.elf-x86-64
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Inputs/dwarfdump-header.elf-x86-64?rev=296663&r1=296662&r2=296663&view=diff
>
> ==============================================================================
> Binary files - no diff available.
>
> Modified: llvm/trunk/test/DebugInfo/Inputs/dwarfdump-header.s
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Inputs/dwarfdump-header.s?rev=296663&r1=296662&r2=296663&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/Inputs/dwarfdump-header.s (original)
> +++ llvm/trunk/test/DebugInfo/Inputs/dwarfdump-header.s Wed Mar  1
> 13:43:29 2017
> @@ -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
>
> Modified: llvm/trunk/test/DebugInfo/dwarfdump-header.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/dwarfdump-header.test?rev=296663&r1=296662&r2=296663&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/dwarfdump-header.test (original)
> +++ llvm/trunk/test/DebugInfo/dwarfdump-header.test Wed Mar  1 13:43:29
> 2017
> @@ -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].
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170306/f8d68a1b/attachment.html>


More information about the llvm-commits mailing list