Skip to content

Commit 29b9eb6

Browse files
ivanivanov884jeffmahoney
authored andcommitted
gdb-archer-vla-tests.patch
;;=fedoratest
1 parent 1722b79 commit 29b9eb6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+3471
-1
lines changed

gdb/testsuite/gdb.ada/packed_array.exp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,11 @@ gdb_test_multiple "$test" "$test" {
5656
# are. Observed with (FSF GNU Ada 4.5.3 20110124).
5757
xfail $test
5858
}
59+
-re "= \\(\\)\[\r\n\]+$gdb_prompt $" {
60+
# archer-jankratochvil-vla resolves it as a dynamic type resolved as an
61+
# empty array [0..-1].
62+
# DW_AT_upper_bound : (DW_OP_fbreg: -48; DW_OP_deref)
63+
xfail $test
64+
}
5965
}
6066

Lines changed: 358 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,358 @@
1+
.file "x86_64-vla-pointer.c"
2+
.text
3+
.Ltext0:
4+
.globl foo
5+
.type foo, @function
6+
foo:
7+
.LFB0:
8+
.file 1 "gdb.arch/x86_64-vla-pointer.c"
9+
# gdb.arch/x86_64-vla-pointer.c:22
10+
.loc 1 22 0
11+
.cfi_startproc
12+
# BLOCK 2 seq:0
13+
# PRED: ENTRY (FALLTHRU)
14+
pushq %rbp
15+
.cfi_def_cfa_offset 16
16+
.cfi_offset 6, -16
17+
movq %rsp, %rbp
18+
.cfi_def_cfa_register 6
19+
pushq %rbx
20+
subq $56, %rsp
21+
.cfi_offset 3, -24
22+
movl %edi, -52(%rbp)
23+
# gdb.arch/x86_64-vla-pointer.c:22
24+
.loc 1 22 0
25+
movq %rsp, %rax
26+
movq %rax, %rsi
27+
# gdb.arch/x86_64-vla-pointer.c:23
28+
.loc 1 23 0
29+
movl -52(%rbp), %eax
30+
movslq %eax, %rdx
31+
subq $1, %rdx
32+
movq %rdx, -32(%rbp)
33+
movslq %eax, %rdx
34+
movq %rdx, %r8
35+
movl $0, %r9d
36+
# gdb.arch/x86_64-vla-pointer.c:24
37+
.loc 1 24 0
38+
movslq %eax, %rdx
39+
movq %rdx, %rcx
40+
movl $0, %ebx
41+
cltq
42+
movl $16, %edx
43+
subq $1, %rdx
44+
addq %rdx, %rax
45+
movl $16, %ebx
46+
movl $0, %edx
47+
divq %rbx
48+
imulq $16, %rax, %rax
49+
subq %rax, %rsp
50+
movq %rsp, %rax
51+
addq $0, %rax
52+
movq %rax, -40(%rbp)
53+
# gdb.arch/x86_64-vla-pointer.c:27
54+
.loc 1 27 0
55+
movl $0, -20(%rbp)
56+
# SUCC: 4 [100.0%]
57+
jmp .L2
58+
# BLOCK 3 seq:1
59+
# PRED: 4
60+
.L3:
61+
# gdb.arch/x86_64-vla-pointer.c:28
62+
.loc 1 28 0 discriminator 3
63+
movl -20(%rbp), %eax
64+
movl %eax, %ecx
65+
movq -40(%rbp), %rdx
66+
movl -20(%rbp), %eax
67+
cltq
68+
movb %cl, (%rdx,%rax)
69+
# SUCC: 4 (FALLTHRU,DFS_BACK)
70+
# gdb.arch/x86_64-vla-pointer.c:27
71+
.loc 1 27 0 discriminator 3
72+
addl $1, -20(%rbp)
73+
# BLOCK 4 seq:2
74+
# PRED: 3 (FALLTHRU,DFS_BACK) 2 [100.0%]
75+
.L2:
76+
# gdb.arch/x86_64-vla-pointer.c:27
77+
.loc 1 27 0 is_stmt 0 discriminator 1
78+
movl -20(%rbp), %eax
79+
cmpl -52(%rbp), %eax
80+
# SUCC: 3 5 (FALLTHRU)
81+
jl .L3
82+
# BLOCK 5 seq:3
83+
# PRED: 4 (FALLTHRU)
84+
# gdb.arch/x86_64-vla-pointer.c:30
85+
.loc 1 30 0 is_stmt 1
86+
movq -40(%rbp), %rax
87+
movb $0, (%rax)
88+
movq %rsi, %rsp
89+
# gdb.arch/x86_64-vla-pointer.c:31
90+
.loc 1 31 0
91+
nop
92+
movq -8(%rbp), %rbx
93+
leave
94+
.cfi_def_cfa 7, 8
95+
# SUCC: EXIT [100.0%]
96+
ret
97+
.cfi_endproc
98+
.LFE0:
99+
.size foo, .-foo
100+
.Letext0:
101+
.section .debug_info,"",@progbits
102+
.Ldebug_info0:
103+
.long 0xa5 # Length of Compilation Unit Info
104+
.value 0x4 # DWARF version number
105+
.long .Ldebug_abbrev0 # Offset Into Abbrev. Section
106+
.byte 0x8 # Pointer Size (in bytes)
107+
.uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit)
108+
.long .LASF3 # DW_AT_producer: "GNU C11 6.2.1 20160916 (Red Hat 6.2.1-2) -mtune=generic -march=x86-64 -g"
109+
.byte 0xc # DW_AT_language
110+
.long .LASF4 # DW_AT_name: "gdb.arch/x86_64-vla-pointer.c"
111+
.long .LASF5 # DW_AT_comp_dir: "/home/jkratoch/redhat/fedora/gdb/master/gdb-7.12/gdb/testsuite"
112+
.quad .Ltext0 # DW_AT_low_pc
113+
.quad .Letext0-.Ltext0 # DW_AT_high_pc
114+
.long .Ldebug_line0 # DW_AT_stmt_list
115+
.uleb128 0x2 # (DIE (0x2d) DW_TAG_subprogram)
116+
# DW_AT_external
117+
.ascii "foo\0" # DW_AT_name
118+
.byte 0x1 # DW_AT_decl_file (gdb.arch/x86_64-vla-pointer.c)
119+
.byte 0x15 # DW_AT_decl_line
120+
# DW_AT_prototyped
121+
.quad .LFB0 # DW_AT_low_pc
122+
.quad .LFE0-.LFB0 # DW_AT_high_pc
123+
.uleb128 0x1 # DW_AT_frame_base
124+
.byte 0x9c # DW_OP_call_frame_cfa
125+
# DW_AT_GNU_all_call_sites
126+
.long 0x80 # DW_AT_sibling
127+
.uleb128 0x3 # (DIE (0x4a) DW_TAG_formal_parameter)
128+
.long .LASF6 # DW_AT_name: "size"
129+
.byte 0x1 # DW_AT_decl_file (gdb.arch/x86_64-vla-pointer.c)
130+
.byte 0x15 # DW_AT_decl_line
131+
.long 0x80 # DW_AT_type
132+
.uleb128 0x3 # DW_AT_location
133+
.byte 0x91 # DW_OP_fbreg
134+
.sleb128 -68
135+
.uleb128 0x4 # (DIE (0x59) DW_TAG_typedef)
136+
.long .LASF7 # DW_AT_name: "array_t"
137+
.byte 0x1 # DW_AT_decl_file (gdb.arch/x86_64-vla-pointer.c)
138+
.byte 0x17 # DW_AT_decl_line
139+
.long 0x87 # DW_AT_type
140+
.uleb128 0x5 # (DIE (0x64) DW_TAG_variable)
141+
.long .LASF0 # DW_AT_name: "array"
142+
.byte 0x1 # DW_AT_decl_file (gdb.arch/x86_64-vla-pointer.c)
143+
.byte 0x18 # DW_AT_decl_line
144+
.long 0x59 # DW_AT_type
145+
.uleb128 0x3 # DW_AT_location
146+
.byte 0x91 # DW_OP_fbreg
147+
.sleb128 -56
148+
.byte 0x6 # DW_OP_deref
149+
.uleb128 0x6 # (DIE (0x73) DW_TAG_variable)
150+
.ascii "i\0" # DW_AT_name
151+
.byte 0x1 # DW_AT_decl_file (gdb.arch/x86_64-vla-pointer.c)
152+
.byte 0x19 # DW_AT_decl_line
153+
.long 0x80 # DW_AT_type
154+
.uleb128 0x2 # DW_AT_location
155+
.byte 0x91 # DW_OP_fbreg
156+
.sleb128 -36
157+
.byte 0 # end of children of DIE 0x2d
158+
.uleb128 0x7 # (DIE (0x80) DW_TAG_base_type)
159+
.byte 0x4 # DW_AT_byte_size
160+
.byte 0x5 # DW_AT_encoding
161+
.ascii "int\0" # DW_AT_name
162+
.uleb128 0x8 # (DIE (0x87) DW_TAG_array_type)
163+
.long 0xa1 # DW_AT_type
164+
.long 0x9a # DW_AT_sibling
165+
.uleb128 0x9 # (DIE (0x90) DW_TAG_subrange_type)
166+
.long 0x9a # DW_AT_type
167+
.uleb128 0x3 # DW_AT_upper_bound
168+
.byte 0x91 # DW_OP_fbreg
169+
.sleb128 -48
170+
.byte 0x6 # DW_OP_deref
171+
.byte 0 # end of children of DIE 0x87
172+
.uleb128 0xa # (DIE (0x9a) DW_TAG_base_type)
173+
.byte 0x8 # DW_AT_byte_size
174+
.byte 0x7 # DW_AT_encoding
175+
.long .LASF1 # DW_AT_name: "sizetype"
176+
.uleb128 0xa # (DIE (0xa1) DW_TAG_base_type)
177+
.byte 0x1 # DW_AT_byte_size
178+
.byte 0x6 # DW_AT_encoding
179+
.long .LASF2 # DW_AT_name: "char"
180+
.byte 0 # end of children of DIE 0xb
181+
.section .debug_abbrev,"",@progbits
182+
.Ldebug_abbrev0:
183+
.uleb128 0x1 # (abbrev code)
184+
.uleb128 0x11 # (TAG: DW_TAG_compile_unit)
185+
.byte 0x1 # DW_children_yes
186+
.uleb128 0x25 # (DW_AT_producer)
187+
.uleb128 0xe # (DW_FORM_strp)
188+
.uleb128 0x13 # (DW_AT_language)
189+
.uleb128 0xb # (DW_FORM_data1)
190+
.uleb128 0x3 # (DW_AT_name)
191+
.uleb128 0xe # (DW_FORM_strp)
192+
.uleb128 0x1b # (DW_AT_comp_dir)
193+
.uleb128 0xe # (DW_FORM_strp)
194+
.uleb128 0x11 # (DW_AT_low_pc)
195+
.uleb128 0x1 # (DW_FORM_addr)
196+
.uleb128 0x12 # (DW_AT_high_pc)
197+
.uleb128 0x7 # (DW_FORM_data8)
198+
.uleb128 0x10 # (DW_AT_stmt_list)
199+
.uleb128 0x17 # (DW_FORM_sec_offset)
200+
.byte 0
201+
.byte 0
202+
.uleb128 0x2 # (abbrev code)
203+
.uleb128 0x2e # (TAG: DW_TAG_subprogram)
204+
.byte 0x1 # DW_children_yes
205+
.uleb128 0x3f # (DW_AT_external)
206+
.uleb128 0x19 # (DW_FORM_flag_present)
207+
.uleb128 0x3 # (DW_AT_name)
208+
.uleb128 0x8 # (DW_FORM_string)
209+
.uleb128 0x3a # (DW_AT_decl_file)
210+
.uleb128 0xb # (DW_FORM_data1)
211+
.uleb128 0x3b # (DW_AT_decl_line)
212+
.uleb128 0xb # (DW_FORM_data1)
213+
.uleb128 0x27 # (DW_AT_prototyped)
214+
.uleb128 0x19 # (DW_FORM_flag_present)
215+
.uleb128 0x11 # (DW_AT_low_pc)
216+
.uleb128 0x1 # (DW_FORM_addr)
217+
.uleb128 0x12 # (DW_AT_high_pc)
218+
.uleb128 0x7 # (DW_FORM_data8)
219+
.uleb128 0x40 # (DW_AT_frame_base)
220+
.uleb128 0x18 # (DW_FORM_exprloc)
221+
.uleb128 0x2117 # (DW_AT_GNU_all_call_sites)
222+
.uleb128 0x19 # (DW_FORM_flag_present)
223+
.uleb128 0x1 # (DW_AT_sibling)
224+
.uleb128 0x13 # (DW_FORM_ref4)
225+
.byte 0
226+
.byte 0
227+
.uleb128 0x3 # (abbrev code)
228+
.uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
229+
.byte 0 # DW_children_no
230+
.uleb128 0x3 # (DW_AT_name)
231+
.uleb128 0xe # (DW_FORM_strp)
232+
.uleb128 0x3a # (DW_AT_decl_file)
233+
.uleb128 0xb # (DW_FORM_data1)
234+
.uleb128 0x3b # (DW_AT_decl_line)
235+
.uleb128 0xb # (DW_FORM_data1)
236+
.uleb128 0x49 # (DW_AT_type)
237+
.uleb128 0x13 # (DW_FORM_ref4)
238+
.uleb128 0x2 # (DW_AT_location)
239+
.uleb128 0x18 # (DW_FORM_exprloc)
240+
.byte 0
241+
.byte 0
242+
.uleb128 0x4 # (abbrev code)
243+
.uleb128 0x16 # (TAG: DW_TAG_typedef)
244+
.byte 0 # DW_children_no
245+
.uleb128 0x3 # (DW_AT_name)
246+
.uleb128 0xe # (DW_FORM_strp)
247+
.uleb128 0x3a # (DW_AT_decl_file)
248+
.uleb128 0xb # (DW_FORM_data1)
249+
.uleb128 0x3b # (DW_AT_decl_line)
250+
.uleb128 0xb # (DW_FORM_data1)
251+
.uleb128 0x49 # (DW_AT_type)
252+
.uleb128 0x13 # (DW_FORM_ref4)
253+
.byte 0
254+
.byte 0
255+
.uleb128 0x5 # (abbrev code)
256+
.uleb128 0x34 # (TAG: DW_TAG_variable)
257+
.byte 0 # DW_children_no
258+
.uleb128 0x3 # (DW_AT_name)
259+
.uleb128 0xe # (DW_FORM_strp)
260+
.uleb128 0x3a # (DW_AT_decl_file)
261+
.uleb128 0xb # (DW_FORM_data1)
262+
.uleb128 0x3b # (DW_AT_decl_line)
263+
.uleb128 0xb # (DW_FORM_data1)
264+
.uleb128 0x49 # (DW_AT_type)
265+
.uleb128 0x13 # (DW_FORM_ref4)
266+
.uleb128 0x2 # (DW_AT_location)
267+
.uleb128 0x18 # (DW_FORM_exprloc)
268+
.byte 0
269+
.byte 0
270+
.uleb128 0x6 # (abbrev code)
271+
.uleb128 0x34 # (TAG: DW_TAG_variable)
272+
.byte 0 # DW_children_no
273+
.uleb128 0x3 # (DW_AT_name)
274+
.uleb128 0x8 # (DW_FORM_string)
275+
.uleb128 0x3a # (DW_AT_decl_file)
276+
.uleb128 0xb # (DW_FORM_data1)
277+
.uleb128 0x3b # (DW_AT_decl_line)
278+
.uleb128 0xb # (DW_FORM_data1)
279+
.uleb128 0x49 # (DW_AT_type)
280+
.uleb128 0x13 # (DW_FORM_ref4)
281+
.uleb128 0x2 # (DW_AT_location)
282+
.uleb128 0x18 # (DW_FORM_exprloc)
283+
.byte 0
284+
.byte 0
285+
.uleb128 0x7 # (abbrev code)
286+
.uleb128 0x24 # (TAG: DW_TAG_base_type)
287+
.byte 0 # DW_children_no
288+
.uleb128 0xb # (DW_AT_byte_size)
289+
.uleb128 0xb # (DW_FORM_data1)
290+
.uleb128 0x3e # (DW_AT_encoding)
291+
.uleb128 0xb # (DW_FORM_data1)
292+
.uleb128 0x3 # (DW_AT_name)
293+
.uleb128 0x8 # (DW_FORM_string)
294+
.byte 0
295+
.byte 0
296+
.uleb128 0x8 # (abbrev code)
297+
.uleb128 0x1 # (TAG: DW_TAG_array_type)
298+
.byte 0x1 # DW_children_yes
299+
.uleb128 0x49 # (DW_AT_type)
300+
.uleb128 0x13 # (DW_FORM_ref4)
301+
.uleb128 0x1 # (DW_AT_sibling)
302+
.uleb128 0x13 # (DW_FORM_ref4)
303+
.byte 0
304+
.byte 0
305+
.uleb128 0x9 # (abbrev code)
306+
.uleb128 0x21 # (TAG: DW_TAG_subrange_type)
307+
.byte 0 # DW_children_no
308+
.uleb128 0x49 # (DW_AT_type)
309+
.uleb128 0x13 # (DW_FORM_ref4)
310+
.uleb128 0x2f # (DW_AT_upper_bound)
311+
.uleb128 0x18 # (DW_FORM_exprloc)
312+
.byte 0
313+
.byte 0
314+
.uleb128 0xa # (abbrev code)
315+
.uleb128 0x24 # (TAG: DW_TAG_base_type)
316+
.byte 0 # DW_children_no
317+
.uleb128 0xb # (DW_AT_byte_size)
318+
.uleb128 0xb # (DW_FORM_data1)
319+
.uleb128 0x3e # (DW_AT_encoding)
320+
.uleb128 0xb # (DW_FORM_data1)
321+
.uleb128 0x3 # (DW_AT_name)
322+
.uleb128 0xe # (DW_FORM_strp)
323+
.byte 0
324+
.byte 0
325+
.byte 0
326+
.section .debug_aranges,"",@progbits
327+
.long 0x2c # Length of Address Ranges Info
328+
.value 0x2 # DWARF Version
329+
.long .Ldebug_info0 # Offset of Compilation Unit Info
330+
.byte 0x8 # Size of Address
331+
.byte 0 # Size of Segment Descriptor
332+
.value 0 # Pad to 16 byte boundary
333+
.value 0
334+
.quad .Ltext0 # Address
335+
.quad .Letext0-.Ltext0 # Length
336+
.quad 0
337+
.quad 0
338+
.section .debug_line,"",@progbits
339+
.Ldebug_line0:
340+
.section .debug_str,"MS",@progbits,1
341+
.LASF4:
342+
.string "gdb.arch/x86_64-vla-pointer.c"
343+
.LASF7:
344+
.string "array_t"
345+
.LASF3:
346+
.string "GNU C11 6.2.1 20160916 (Red Hat 6.2.1-2) -mtune=generic -march=x86-64 -g"
347+
.LASF2:
348+
.string "char"
349+
.LASF1:
350+
.string "sizetype"
351+
.LASF5:
352+
.string "/home/jkratoch/redhat/fedora/gdb/master/gdb-7.12/gdb/testsuite"
353+
.LASF6:
354+
.string "size"
355+
.LASF0:
356+
.string "array"
357+
.ident "GCC: (GNU) 6.2.1 20160916 (Red Hat 6.2.1-2)"
358+
.section .note.GNU-stack,"",@progbits

0 commit comments

Comments
 (0)