xref: /llvm-project/llvm/test/tools/llvm-dwarfdump/X86/debug-names-verify-completeness.s (revision 01bb3b07c346c4215a83893d15f3c6022773ef83)
180827f10SPavel Labath# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj -o - | not llvm-dwarfdump -verify - | FileCheck %s
280827f10SPavel Labath
3fa541860SPavel Labath# CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_namespace) with name namesp missing.
4fa541860SPavel Labath# CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_variable) with name var_block_addr missing.
5fa541860SPavel Labath# CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_namespace) with name (anonymous namespace) missing.
6fa541860SPavel Labath# CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_variable) with name var_loc_addr missing.
7fa541860SPavel Labath# CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_variable) with name var_loc_tls missing.
8fa541860SPavel Labath# CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_variable) with name var_loc_gnu_tls missing.
9fa541860SPavel Labath# CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_subprogram) with name fun_name missing.
10fa541860SPavel Labath# CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_subprogram) with name _Z8fun_name missing.
11fa541860SPavel Labath# CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_inlined_subroutine) with name fun_inline missing.
12fa541860SPavel Labath# CHECK: error: Name Index @ 0x0: Entry for DIE @ {{.*}} (DW_TAG_label) with name label missing.
1380827f10SPavel Labath
1480827f10SPavel Labath        .section        .debug_loc,"",@progbits
1580827f10SPavel Labath.Ldebug_loc0:
1680827f10SPavel Labath        .quad   0
1780827f10SPavel Labath        .quad   1
1880827f10SPavel Labath        .short  .Lloc0_end-.Lloc0_start # Loc expr size
1980827f10SPavel Labath.Lloc0_start:
2080827f10SPavel Labath        .byte   3                       # DW_OP_addr
2180827f10SPavel Labath        .quad 0x47
2280827f10SPavel Labath.Lloc0_end:
2380827f10SPavel Labath        .quad   0
2480827f10SPavel Labath        .quad   0
2580827f10SPavel Labath
2680827f10SPavel Labath        .section        .debug_abbrev,"",@progbits
2780827f10SPavel Labath        .byte   1                       # Abbreviation Code
2880827f10SPavel Labath        .byte   17                      # DW_TAG_compile_unit
2980827f10SPavel Labath        .byte   1                       # DW_CHILDREN_yes
3080827f10SPavel Labath        .byte   37                      # DW_AT_producer
31fa541860SPavel Labath        .byte   8                       # DW_FORM_string
32*01bb3b07SPavel Labath        .byte   17                      # DW_AT_low_pc
33*01bb3b07SPavel Labath        .byte   1                       # DW_FORM_addr
34*01bb3b07SPavel Labath        .byte   18                      # DW_AT_high_pc
35*01bb3b07SPavel Labath        .byte   6                       # DW_FORM_data4
3680827f10SPavel Labath        .byte   0                       # EOM(1)
3780827f10SPavel Labath        .byte   0                       # EOM(2)
3880827f10SPavel Labath
3980827f10SPavel Labath        .byte   2                       # Abbreviation Code
4080827f10SPavel Labath        .byte   52                      # DW_TAG_variable
4180827f10SPavel Labath        .byte   0                       # DW_CHILDREN_no
4280827f10SPavel Labath        .byte   3                       # DW_AT_name
43fa541860SPavel Labath        .byte   8                       # DW_FORM_string
4480827f10SPavel Labath        .byte   2                       # DW_AT_location
4580827f10SPavel Labath        .byte   24                      # DW_FORM_exprloc
4680827f10SPavel Labath        .byte   0                       # EOM(1)
4780827f10SPavel Labath        .byte   0                       # EOM(2)
4880827f10SPavel Labath
4980827f10SPavel Labath        .byte   3                       # Abbreviation Code
5080827f10SPavel Labath        .byte   46                      # DW_TAG_subprogram
5180827f10SPavel Labath        .byte   1                       # DW_CHILDREN_yes
5280827f10SPavel Labath        .byte   3                       # DW_AT_name
53fa541860SPavel Labath        .byte   8                       # DW_FORM_string
5480827f10SPavel Labath        .byte   110                     # DW_AT_linkage_name
55fa541860SPavel Labath        .byte   8                       # DW_FORM_string
5680827f10SPavel Labath        .byte   82                      # DW_AT_entry_pc
5780827f10SPavel Labath        .byte   1                       # DW_FORM_addr
5880827f10SPavel Labath        .byte   0                       # EOM(1)
5980827f10SPavel Labath        .byte   0                       # EOM(2)
6080827f10SPavel Labath
6180827f10SPavel Labath        .byte   4                       # Abbreviation Code
6280827f10SPavel Labath        .byte   57                      # DW_TAG_namespace
6380827f10SPavel Labath        .byte   1                       # DW_CHILDREN_yes
6480827f10SPavel Labath        .byte   3                       # DW_AT_name
65fa541860SPavel Labath        .byte   8                       # DW_FORM_string
6680827f10SPavel Labath        .byte   0                       # EOM(1)
6780827f10SPavel Labath        .byte   0                       # EOM(2)
6880827f10SPavel Labath
6980827f10SPavel Labath        .byte   5                       # Abbreviation Code
7080827f10SPavel Labath        .byte   52                      # DW_TAG_variable
7180827f10SPavel Labath        .byte   0                       # DW_CHILDREN_no
7280827f10SPavel Labath        .byte   3                       # DW_AT_name
73fa541860SPavel Labath        .byte   8                       # DW_FORM_string
7480827f10SPavel Labath        .byte   2                       # DW_AT_location
7580827f10SPavel Labath        .byte   23                      # DW_FORM_sec_offset
7680827f10SPavel Labath        .byte   0                       # EOM(1)
7780827f10SPavel Labath        .byte   0                       # EOM(2)
7880827f10SPavel Labath
7980827f10SPavel Labath        .byte   6                       # Abbreviation Code
8080827f10SPavel Labath        .byte   57                      # DW_TAG_namespace
8180827f10SPavel Labath        .byte   1                       # DW_CHILDREN_yes
8280827f10SPavel Labath        .byte   0                       # EOM(1)
8380827f10SPavel Labath        .byte   0                       # EOM(2)
8480827f10SPavel Labath
8580827f10SPavel Labath        .byte   7                       # Abbreviation Code
8680827f10SPavel Labath        .byte   29                      # DW_TAG_inlined_subroutine
8780827f10SPavel Labath        .byte   0                       # DW_CHILDREN_no
8880827f10SPavel Labath        .byte   3                       # DW_AT_name
89fa541860SPavel Labath        .byte   8                       # DW_FORM_string
9080827f10SPavel Labath        .byte   17                      # DW_AT_low_pc
9180827f10SPavel Labath        .byte   1                       # DW_FORM_addr
9280827f10SPavel Labath        .byte   18                      # DW_AT_high_pc
9380827f10SPavel Labath        .byte   1                       # DW_FORM_addr
9480827f10SPavel Labath        .byte   0                       # EOM(1)
9580827f10SPavel Labath        .byte   0                       # EOM(2)
9680827f10SPavel Labath
9780827f10SPavel Labath        .byte   8                       # Abbreviation Code
9880827f10SPavel Labath        .byte   10                      # DW_TAG_label
9980827f10SPavel Labath        .byte   0                       # DW_CHILDREN_no
10080827f10SPavel Labath        .byte   3                       # DW_AT_name
101fa541860SPavel Labath        .byte   8                       # DW_FORM_string
10280827f10SPavel Labath        .byte   82                      # DW_AT_entry_pc
10380827f10SPavel Labath        .byte   1                       # DW_FORM_addr
10480827f10SPavel Labath        .byte   0                       # EOM(1)
10580827f10SPavel Labath        .byte   0                       # EOM(2)
10680827f10SPavel Labath
10780827f10SPavel Labath        .byte   0                       # EOM(3)
10880827f10SPavel Labath        .section        .debug_info,"",@progbits
109*01bb3b07SPavel Labath
11080827f10SPavel Labath.Lcu_begin0:
11180827f10SPavel Labath        .long   .Lcu_end0-.Lcu_start0   # Length of Unit
11280827f10SPavel Labath.Lcu_start0:
11380827f10SPavel Labath        .short  4                       # DWARF version number
11480827f10SPavel Labath        .long   .debug_abbrev           # Offset Into Abbrev. Section
11580827f10SPavel Labath        .byte   8                       # Address Size (in bytes)
11680827f10SPavel Labath        .byte   1                       # Abbrev [1] DW_TAG_compile_unit
117fa541860SPavel Labath        .asciz  "hand-written DWARF"    # DW_AT_producer
118*01bb3b07SPavel Labath        .quad   0x0                     # DW_AT_low_pc
119*01bb3b07SPavel Labath        .long   0x100                   # DW_AT_high_pc
12080827f10SPavel Labath
12180827f10SPavel Labath        .byte   4                       # Abbrev [4] DW_TAG_namespace
122fa541860SPavel Labath        .asciz  "namesp"                # DW_AT_name
12380827f10SPavel Labath        .byte   2                       # Abbrev [2] DW_TAG_variable
124fa541860SPavel Labath        .asciz  "var_block_addr"        # DW_AT_name
12580827f10SPavel Labath        .byte   9                       # DW_AT_location
12680827f10SPavel Labath        .byte   3                       # DW_OP_addr
12780827f10SPavel Labath        .quad   0x47
12880827f10SPavel Labath        .byte   0                       # End Of Children Mark
12980827f10SPavel Labath
13080827f10SPavel Labath        .byte   6                       # Abbrev [6] DW_TAG_namespace
13180827f10SPavel Labath        .byte   5                       # Abbrev [5] DW_TAG_variable
132fa541860SPavel Labath        .asciz  "var_loc_addr"          # DW_AT_name
13380827f10SPavel Labath        .long   .Ldebug_loc0            # DW_AT_location
13480827f10SPavel Labath        .byte   0                       # End Of Children Mark
13580827f10SPavel Labath
13680827f10SPavel Labath        .byte   2                       # Abbrev [2] DW_TAG_variable
137fa541860SPavel Labath        .asciz  "var_loc_tls"           # DW_AT_name
13880827f10SPavel Labath        .byte   1                       # DW_AT_location
13980827f10SPavel Labath        .byte   0x9b                    # DW_OP_form_tls_address
14080827f10SPavel Labath
14180827f10SPavel Labath        .byte   2                       # Abbrev [2] DW_TAG_variable
142fa541860SPavel Labath        .asciz  "var_loc_gnu_tls"       # DW_AT_name
14380827f10SPavel Labath        .byte   1                       # DW_AT_location
14480827f10SPavel Labath        .byte   0xe0                    # DW_OP_GNU_push_tls_address
14580827f10SPavel Labath
14680827f10SPavel Labath        .byte   3                       # Abbrev [3] DW_TAG_subprogram
147fa541860SPavel Labath        .asciz  "fun_name"              # DW_AT_name
148fa541860SPavel Labath        .asciz  "_Z8fun_name"           # DW_AT_linkage_name
14980827f10SPavel Labath        .quad   0x47                    # DW_AT_entry_pc
15080827f10SPavel Labath        .byte   7                       # Abbrev [7] DW_TAG_inlined_subroutine
151fa541860SPavel Labath        .asciz  "fun_inline"            # DW_AT_name
15280827f10SPavel Labath        .quad   0x48                    # DW_AT_low_pc
15380827f10SPavel Labath        .quad   0x49                    # DW_AT_high_pc
15480827f10SPavel Labath        .byte   8                       # Abbrev [8] DW_TAG_label
155fa541860SPavel Labath        .asciz  "label"                 # DW_AT_name
15680827f10SPavel Labath        .quad   0x4a                    # DW_AT_entry_pc
15780827f10SPavel Labath        .byte   0                       # End Of Children Mark
15880827f10SPavel Labath
15980827f10SPavel Labath        .byte   0                       # End Of Children Mark
16080827f10SPavel Labath.Lcu_end0:
16180827f10SPavel Labath
16280827f10SPavel Labath        .section        .debug_names,"",@progbits
16380827f10SPavel Labath        .long   .Lnames_end0-.Lnames_start0 # Header: contribution length
16480827f10SPavel Labath.Lnames_start0:
16580827f10SPavel Labath        .short  5                       # Header: version
16680827f10SPavel Labath        .short  0                       # Header: padding
16780827f10SPavel Labath        .long   1                       # Header: compilation unit count
16880827f10SPavel Labath        .long   0                       # Header: local type unit count
16980827f10SPavel Labath        .long   0                       # Header: foreign type unit count
17080827f10SPavel Labath        .long   0                       # Header: bucket count
17180827f10SPavel Labath        .long   0                       # Header: name count
17280827f10SPavel Labath        .long   .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size
17380827f10SPavel Labath        .long   0                       # Header: augmentation length
17480827f10SPavel Labath        .long   .Lcu_begin0             # Compilation unit 0
17580827f10SPavel Labath.Lnames_abbrev_start0:
17680827f10SPavel Labath        .byte   0                       # End of abbrev list
17780827f10SPavel Labath.Lnames_abbrev_end0:
17880827f10SPavel Labath.Lnames_entries0:
17980827f10SPavel Labath.Lnames_end0:
18080827f10SPavel Labath
181