1 # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj | \
2 # RUN: not llvm-dwarfdump -verify - | FileCheck %s
4 # CHECK: Name Index @ 0x0: String (baz) at index 2 hashes to 0xb8860c2, but the Name Index hash is 0xb8860c4
5 # CHECK: Name Index @ 0x0: Bucket 1 is not empty but points to a mismatched hash value 0xb8860c4 (belonging to bucket 0).
6 .section .debug_str,"MS",@progbits,1
12 .asciz "Hand-written dwarf"
14 .section .debug_abbrev,"",@progbits
16 .byte 1 # Abbreviation Code
17 .byte 17 # DW_TAG_compile_unit
18 .byte 1 # DW_CHILDREN_yes
19 .byte 37 # DW_AT_producer
20 .byte 14 # DW_FORM_strp
21 .byte 19 # DW_AT_language
22 .byte 5 # DW_FORM_data2
25 .byte 2 # Abbreviation Code
26 .byte 46 # DW_TAG_subprogram
27 .byte 0 # DW_CHILDREN_no
29 .byte 14 # DW_FORM_strp
30 .byte 63 # DW_AT_external
31 .byte 25 # DW_FORM_flag_present
36 .section .debug_info,"",@progbits
38 .long .Lcu_end0-.Lcu_start0 # Length of Unit
40 .short 4 # DWARF version number
41 .long .Lsection_abbrev # Offset Into Abbrev. Section
42 .byte 8 # Address Size (in bytes)
43 .byte 1 # Abbrev [1] DW_TAG_compile_unit
44 .long .Lstring_producer # DW_AT_producer
45 .short 12 # DW_AT_language
47 .byte 2 # Abbrev [2] DW_TAG_subprogram
48 .long .Lstring_bar # DW_AT_name
51 .byte 2 # Abbrev [2] DW_TAG_subprogram
52 .long .Lstring_baz # DW_AT_name
54 .byte 0 # End Of Children Mark
57 .section .debug_names,"",@progbits
58 .long .Lnames_end0-.Lnames_start0 # Header: contribution length
60 .short 5 # Header: version
61 .short 0 # Header: padding
62 .long 1 # Header: compilation unit count
63 .long 0 # Header: local type unit count
64 .long 0 # Header: foreign type unit count
65 .long 2 # Header: bucket count
66 .long 2 # Header: name count
67 .long .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size
68 .long 0 # Header: augmentation length
69 .long .Lcu_begin0 # Compilation unit 0
72 .long 193487034 # Hash in Bucket 1
73 .long 193487044 # Hash in Bucket 1 and 2
74 .long .Lstring_bar # String in Bucket 1: bar
75 .long .Lstring_baz # String in Bucket 1 and 2: baz
76 .long .Lnames0-.Lnames_entries0 # Offset in Bucket 1
77 .long .Lnames1-.Lnames_entries0 # Offset in Bucket 1 and 2
78 .Lnames_abbrev_start0:
79 .byte 46 # Abbrev code
80 .byte 46 # DW_TAG_subprogram
81 .byte 3 # DW_IDX_die_offset
82 .byte 19 # DW_FORM_ref4
83 .byte 0 # End of abbrev
84 .byte 0 # End of abbrev
85 .byte 0 # End of abbrev list
89 .byte 46 # Abbrev code
90 .long .Ldie_bar-.Lcu_begin0 # DW_IDX_die_offset
91 .long 0 # End of list: bar
93 .byte 46 # Abbrev code
94 .long .Ldie_baz-.Lcu_begin0 # DW_IDX_die_offset
95 .long 0 # End of list: baz