2 # unsigned char arr[0x100000];
4 # clang -O2 -gdwarf-3 -S 1.cpp -o 1.s --target=x86_64-pc-linux-gnu
6 # RUN: llvm-mc -triple x86_64-pc-linux-gnu -o - -filetype obj < %s | \
7 # RUN: llvm-dwarfdump -debug-info - | FileCheck %s
9 # CHECK: DW_AT_count (0x00100000)
13 .file 1 "/llvm-project" "1.cpp"
14 .type arr,@object # @arr
22 .section .debug_abbrev,"",@progbits
23 .byte 1 # Abbreviation Code
24 .byte 17 # DW_TAG_compile_unit
25 .byte 1 # DW_CHILDREN_yes
26 .byte 37 # DW_AT_producer
27 .byte 14 # DW_FORM_strp
28 .byte 19 # DW_AT_language
29 .byte 5 # DW_FORM_data2
31 .byte 14 # DW_FORM_strp
32 .byte 16 # DW_AT_stmt_list
33 .byte 6 # DW_FORM_data4
34 .byte 27 # DW_AT_comp_dir
35 .byte 14 # DW_FORM_strp
38 .byte 2 # Abbreviation Code
39 .byte 52 # DW_TAG_variable
40 .byte 0 # DW_CHILDREN_no
42 .byte 14 # DW_FORM_strp
44 .byte 19 # DW_FORM_ref4
45 .byte 63 # DW_AT_external
46 .byte 12 # DW_FORM_flag
47 .byte 58 # DW_AT_decl_file
48 .byte 11 # DW_FORM_data1
49 .byte 59 # DW_AT_decl_line
50 .byte 11 # DW_FORM_data1
51 .byte 2 # DW_AT_location
52 .byte 10 # DW_FORM_block1
55 .byte 3 # Abbreviation Code
56 .byte 1 # DW_TAG_array_type
57 .byte 1 # DW_CHILDREN_yes
59 .byte 19 # DW_FORM_ref4
62 .byte 4 # Abbreviation Code
63 .byte 33 # DW_TAG_subrange_type
64 .byte 0 # DW_CHILDREN_no
66 .byte 19 # DW_FORM_ref4
67 .byte 55 # DW_AT_count
68 .byte 6 # DW_FORM_data4
71 .byte 5 # Abbreviation Code
72 .byte 36 # DW_TAG_base_type
73 .byte 0 # DW_CHILDREN_no
75 .byte 14 # DW_FORM_strp
76 .byte 62 # DW_AT_encoding
77 .byte 11 # DW_FORM_data1
78 .byte 11 # DW_AT_byte_size
79 .byte 11 # DW_FORM_data1
82 .byte 6 # Abbreviation Code
83 .byte 36 # DW_TAG_base_type
84 .byte 0 # DW_CHILDREN_no
86 .byte 14 # DW_FORM_strp
87 .byte 11 # DW_AT_byte_size
88 .byte 11 # DW_FORM_data1
89 .byte 62 # DW_AT_encoding
90 .byte 11 # DW_FORM_data1
94 .section .debug_info,"",@progbits
96 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
98 .short 3 # DWARF version number
99 .long .debug_abbrev # Offset Into Abbrev. Section
100 .byte 8 # Address Size (in bytes)
101 .byte 1 # Abbrev [1] 0xb:0x47 DW_TAG_compile_unit
102 .long .Linfo_string0 # DW_AT_producer
103 .short 33 # DW_AT_language
104 .long .Linfo_string1 # DW_AT_name
105 .long .Lline_table_start0 # DW_AT_stmt_list
106 .long .Linfo_string2 # DW_AT_comp_dir
107 .byte 2 # Abbrev [2] 0x1e:0x16 DW_TAG_variable
108 .long .Linfo_string3 # DW_AT_name
109 .long 52 # DW_AT_type
110 .byte 1 # DW_AT_external
111 .byte 1 # DW_AT_decl_file
112 .byte 1 # DW_AT_decl_line
113 .byte 9 # DW_AT_location
116 .byte 3 # Abbrev [3] 0x34:0xf DW_TAG_array_type
117 .long 67 # DW_AT_type
118 .byte 4 # Abbrev [4] 0x39:0x9 DW_TAG_subrange_type
119 .long 74 # DW_AT_type
120 .long 1048576 # DW_AT_count
121 .byte 0 # End Of Children Mark
122 .byte 5 # Abbrev [5] 0x43:0x7 DW_TAG_base_type
123 .long .Linfo_string4 # DW_AT_name
124 .byte 8 # DW_AT_encoding
125 .byte 1 # DW_AT_byte_size
126 .byte 6 # Abbrev [6] 0x4a:0x7 DW_TAG_base_type
127 .long .Linfo_string5 # DW_AT_name
128 .byte 8 # DW_AT_byte_size
129 .byte 7 # DW_AT_encoding
130 .byte 0 # End Of Children Mark
132 .section .debug_str,"MS",@progbits,1
134 .asciz "clang version 13.0.0" # string offset=0
136 .asciz "1.cpp" # string offset=21
138 .asciz "/llvm-project" # string offset=27
140 .asciz "arr" # string offset=61
142 .asciz "unsigned char" # string offset=65
144 .asciz "__ARRAY_SIZE_TYPE__" # string offset=79
145 .ident "clang version 13.0.0"
146 .section ".note.GNU-stack","",@progbits
148 .section .debug_line,"",@progbits