Pavel Labath | 906b777 | 2018-03-16 10:02:16 +0000 | [diff] [blame] | 1 | # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj | \ |
| 2 | # RUN: llvm-dwarfdump -verify - | FileCheck %s |
| 3 | |
| 4 | # CHECK: warning: Name Index @ 0x0 does not contain a hash table. |
| 5 | .section .debug_str,"MS",@progbits,1 |
| 6 | .Lstring_foo: |
| 7 | .asciz "foo" |
| 8 | .Lstring_producer: |
| 9 | .asciz "Hand-written dwarf" |
| 10 | |
| 11 | .section .debug_abbrev,"",@progbits |
| 12 | .Lsection_abbrev: |
| 13 | .byte 1 # Abbreviation Code |
| 14 | .byte 17 # DW_TAG_compile_unit |
| 15 | .byte 1 # DW_CHILDREN_yes |
| 16 | .byte 37 # DW_AT_producer |
| 17 | .byte 14 # DW_FORM_strp |
| 18 | .byte 19 # DW_AT_language |
| 19 | .byte 5 # DW_FORM_data2 |
| 20 | .byte 0 # EOM(1) |
| 21 | .byte 0 # EOM(2) |
| 22 | .byte 2 # Abbreviation Code |
| 23 | .byte 46 # DW_TAG_subprogram |
| 24 | .byte 0 # DW_CHILDREN_no |
| 25 | .byte 3 # DW_AT_name |
| 26 | .byte 14 # DW_FORM_strp |
| 27 | .byte 63 # DW_AT_external |
| 28 | .byte 25 # DW_FORM_flag_present |
| 29 | .byte 0 # EOM(1) |
| 30 | .byte 0 # EOM(2) |
| 31 | .byte 0 # EOM(3) |
| 32 | |
| 33 | .section .debug_info,"",@progbits |
| 34 | .Lcu_begin0: |
| 35 | .long .Lcu_end0-.Lcu_start0 # Length of Unit |
| 36 | .Lcu_start0: |
| 37 | .short 4 # DWARF version number |
| 38 | .long .Lsection_abbrev # Offset Into Abbrev. Section |
| 39 | .byte 8 # Address Size (in bytes) |
| 40 | .byte 1 # Abbrev [1] DW_TAG_compile_unit |
| 41 | .long .Lstring_producer # DW_AT_producer |
| 42 | .short 12 # DW_AT_language |
| 43 | .Ldie_foo: |
| 44 | .byte 2 # Abbrev [2] DW_TAG_subprogram |
| 45 | .long .Lstring_foo # DW_AT_name |
| 46 | # DW_AT_external |
| 47 | .byte 0 # End Of Children Mark |
| 48 | .Lcu_end0: |
| 49 | |
| 50 | .section .debug_names,"",@progbits |
| 51 | .long .Lnames_end0-.Lnames_start0 # Header: contribution length |
| 52 | .Lnames_start0: |
| 53 | .short 5 # Header: version |
| 54 | .short 0 # Header: padding |
| 55 | .long 1 # Header: compilation unit count |
| 56 | .long 0 # Header: local type unit count |
| 57 | .long 0 # Header: foreign type unit count |
| 58 | .long 0 # Header: bucket count |
| 59 | .long 1 # Header: name count |
| 60 | .long .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size |
| 61 | .long 0 # Header: augmentation length |
| 62 | .long .Lcu_begin0 # Compilation unit 0 |
| 63 | .long .Lstring_foo # String in Bucket 1: foo |
| 64 | .long .Lnames0-.Lnames_entries0 # Offset in Bucket 1 |
| 65 | .Lnames_abbrev_start0: |
| 66 | .byte 46 # Abbrev code |
| 67 | .byte 46 # DW_TAG_subprogram |
| 68 | .byte 3 # DW_IDX_die_offset |
Pavel Labath | 79cd942 | 2018-03-22 14:50:44 +0000 | [diff] [blame] | 69 | .byte 19 # DW_FORM_ref4 |
Pavel Labath | 906b777 | 2018-03-16 10:02:16 +0000 | [diff] [blame] | 70 | .byte 0 # End of abbrev |
| 71 | .byte 0 # End of abbrev |
| 72 | .byte 0 # End of abbrev list |
| 73 | .Lnames_abbrev_end0: |
| 74 | .Lnames_entries0: |
| 75 | .Lnames0: |
| 76 | .byte 46 # Abbrev code |
| 77 | .long .Ldie_foo-.Lcu_begin0 # DW_IDX_die_offset |
| 78 | .long 0 # End of list: foo |
| 79 | .p2align 2 |
| 80 | .Lnames_end0: |