62 lines · plain
1# RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o - | \2# RUN: llvm-dwarfdump -debug-info - 2>&1 | FileCheck %s3 4## llvm-dwarfdump used to crash with this input because of an invalid size5## of the compilation unit contribution in the .debug_cu_index section.6 7# CHECK: warning: DWARF package unit at offset 0x00000000 has an inconsistent index (expected: 23, actual: 24)8 9 .section .debug_abbrev.dwo, "e", @progbits10.LAbbrBegin:11 .uleb128 1 # Abbreviation Code12 .uleb128 17 # DW_TAG_compile_unit13 .byte 0 # DW_CHILDREN_no14 .uleb128 3 # DW_AT_name15 .uleb128 8 # DW_FORM_string16 .uleb128 0x2131 # DW_AT_GNU_dwo_id17 .uleb128 7 # DW_FORM_data818 .byte 0 # EOM(1)19 .byte 0 # EOM(2)20 .byte 0 # EOM(3)21.LAbbrEnd:22 23 .section .debug_info.dwo, "e", @progbits24.LCUBegin:25 .long .LCUEnd-.LCUVersion # Length26.LCUVersion:27 .short 4 # Version28 .long 0 # Abbrev offset29 .byte 4 # Address size30 .uleb128 1 # Abbrev [1] DW_TAG_compile_unit31 .asciz "a.c" # DW_AT_name32 .quad 0x1100001122222222 # DW_AT_GNU_dwo_id33.LCUEnd:34 35 .section .debug_cu_index, "", @progbits36## Header:37 .short 2 # Version38 .space 2 # Padding39 .long 2 # Section count40 .long 1 # Unit count41 .long 4 # Slot count42## Hash Table of Signatures:43 .quad 044 .quad 045 .quad 0x110000112222222246 .quad 047## Parallel Table of Indexes:48 .long 049 .long 050 .long 151 .long 052## Table of Section Offsets:53## Row 0:54 .long 1 # DW_SECT_INFO55 .long 3 # DW_SECT_ABBREV56## Row 1:57 .long .LCUBegin-.debug_info.dwo # Offset in .debug_info.dwo58 .long .LAbbrBegin-.debug_abbrev.dwo # Offset in .debug_abbrev.dwo59## Table of Section Sizes:60 .long .LCUEnd-.LCUBegin-1 # Size of the contribution in .debug_info.dwo (invalid)61 .long .LAbbrEnd-.LAbbrBegin62