* ld-elfvers/vers.exp: Add new tests vers17 to vers19.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / ptype.exp
CommitLineData
c906108c
SS
1# Copyright (C) 1988, 1990, 1991, 1992, 1994, 1997 Free Software Foundation, Inc.
2
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 2 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16
17# Please email any bugs, comments, and/or additions to this file to:
18# bug-gdb@prep.ai.mit.edu
19
20# This file was written by Rob Savoye. (rob@cygnus.com)
21
22if $tracelevel then {
23 strace $tracelevel
24 }
25
26#
27# test running programs
28#
29set prms_id 0
30set bug_id 0
31
32set testfile "ptype"
33set srcfile ${testfile}.c
34set binfile ${objdir}/${subdir}/${testfile}
35if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
36 gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
37}
38
39# Create and source the file that provides information about the compiler
40# used to compile the test case.
41if [get_compiler_info ${binfile}] {
42 return -1;
43}
44
45gdb_exit
46gdb_start
47gdb_reinitialize_dir $srcdir/$subdir
48gdb_load ${binfile}
49
50# Test ptype of unnamed enumeration members before any action causes
51# the partial symbol table to be expanded to full symbols. This fails
52# with stabs compilers which fail to use a nameless stab (such as
53# pre-2.4.5 versions of gcc and most non-gcc compilers).
54
55send_gdb "ptype red1\n"
56gdb_expect {
57 -re "type = enum primary1_tag \{red1, green1, blue1\}.*$gdb_prompt $"\
58 {
59 # The workaround is in effect. As this is a compiler, not GDB,
60 # bug, we'll make it a PASS but perhaps it should be an XFAIL.
61 pass "ptype unnamed enumeration member (worked around)"
62 }
63 -re "type = enum \{red1, green1, blue1\}.*$gdb_prompt $"\
64 { pass "ptype unnamed enumeration member" }
65 -re ".*$gdb_prompt $" { fail "ptype unnamed enumeration member" }
66 timeout { fail "(timeout) ptype unnamed enumeration member" }
67}
68
69#
70# test ptype command with structures
71#
72# Here and elsewhere, we accept
73# "long", "long int", or "int" for long variables (whatis.exp already
74# has an XFAIL for "int" (Sun cc bug), so no need to fail it here).
75gdb_test "ptype struct t_struct" "type = struct t_struct \{.*\[\r\n\] (unsigned |)char v_char_member;.*\[\r\n\] (short|short int) v_short_member;.*\[\r\n\] int v_int_member;.*\[\r\n\] (long|long int|int) v_long_member;.*\[\r\n\] float v_float_member;.*\[\r\n\] double v_double_member;.*\[\r\n\]\}.*" "ptype structure"
76
77
78# Test the equivalence between '.' and '->' for struct member references.
79
80if [gdb_test "ptype v_struct1.v_float_member" "type = float"]<0 then {
81 return -1
82}
83if [gdb_test "ptype v_struct1->v_float_member" "type = float"]<0 then {
84 return -1
85}
86if [gdb_test "ptype v_t_struct_p.v_float_member" "type = float"]<0 then {
87 return -1
88}
89if [gdb_test "ptype v_t_struct_p->v_float_member" "type = float"]<0 then {
90 return -1
91}
92
93
94# IBM's xlc puts out bogus stabs--the stuff field is type 42,
95# which isn't defined.
96
085dd6e6 97gdb_test "ptype struct link" "type = struct link \{\[\r\n\]+\[ \t\]+struct link \\*next;\[\r\n\]+\[ \t\]+struct link \\*\\(\\*linkfunc\\)\\((struct link \\*, int|void|)\\);\[\r\n\]+\[ \t\]+struct t_struct stuff.1..2..3.;\[\r\n\]+\}.*" "ptype linked list structure"
c906108c
SS
98
99#
100# test ptype command with unions
101#
102gdb_test "ptype union t_union" "type = union t_union \{.*\[\r\n\] (unsigned |)char v_char_member;.*\[\r\n\] (short|short int) v_short_member;.*\[\r\n\] int v_int_member;.*\[\r\n\] (long|long int|int) v_long_member;.*\[\r\n\] float v_float_member;.*\[\r\n\] double v_double_member;.*\[\r\n\]\}.*" "ptype union"
103
104# IBM's xlc puts out bogus stabs--the stuff field is type 42,
105# which isn't defined.
085dd6e6 106gdb_test "ptype union tu_link" "type = union tu_link \{\[\r\n\]+\[ \t\]+struct link \\*next;\[\r\n\]+\[ \t\]+struct link \\*\\(\\*linkfunc\\)\\((struct link \\*, int|void|)\\);\[\r\n\]+\[ \t\]+struct t_struct stuff.1..2..3.;\[\r\n\]+\}.*" "ptype linked list union"
c906108c
SS
107
108#
109# test ptype command with enums
110#
111
112gdb_test "ptype primary" "type = enum .red, green, blue.*" "ptype unnamed enumeration"
113
114gdb_test "ptype enum colors" "type = enum colors \{yellow, purple, pink\}.*" "ptype named enumeration"
115
116
117#
118# test ptype command with enums as typedef
119#
085dd6e6 120gdb_test "ptype boolean" "type = enum (boolean |)\{FALSE, TRUE\}.*" "ptype unnamed typedef'd enumeration"
c906108c
SS
121
122# And check that whatis shows the name, not "enum {...}".
123# This probably fails for all DWARF 1 cases, so assume so for now. -fnf
124# The problem with xlc is that the stabs look like
125# :t51=eFALSE:0,TRUE:1,;
126# boolean:t55=51
127# v_boolean:G51
128# GDB's behavior is correct; the type which the variable is defined
129# as (51) doesn't have a name. Only 55 has a name.
130
085dd6e6
JM
131if {!$gcc_compiled && !$hp_aCC_compiler} {
132 setup_xfail "rs6000-*-*" "i*86-*-sysv4*" "hppa*-*-*" # CLLbs14773
133}
c906108c 134setup_xfail_format "DWARF 1"
085dd6e6 135gdb_test "whatis v_boolean" "type = (enum |)boolean" \
c906108c
SS
136 "whatis unnamed typedef'd enum (compiler bug in IBM's xlc)"
137
138# Same thing with struct and union.
085dd6e6 139gdb_test "ptype t_struct3" "type = struct (t_struct3 |)\{.*
c906108c
SS
140 *double v_double_member;.*
141 *int v_int_member;.*\}" "printing typedef'd struct"
142
085dd6e6 143gdb_test "ptype t_union3" "type = union (t_union3 |)\{.*
c906108c
SS
144 *double v_double_member;.*
145 *int v_int_member;.*\}" "printing typedef'd union"
146
085dd6e6 147gdb_test "ptype enum bvals" "type = enum bvals \{my_false, my_true\}.*" "ptype named typedef'd enumf'd enum"
c906108c
SS
148
149#
150# test ptype command with out-of-order enum values
151#
152gdb_test "ptype enum misordered" "type = enum misordered \{two = 2, one = 1, zero = 0, three = 3\}.*" "ptype misordered enumeration"
153
154#
155# test ptype command with a named enum's value
156#
157gdb_test "ptype three" "type = enum misordered \{two = 2, one = 1, zero = 0, three = 3\}.*" "ptype named enumeration member"
158
159gdb_test "ptype red" "type = enum \{red, green, blue\}.*" "ptype unnamed enumeration member #2"
160
161#
162# test ptype command with basic C types
163#
164# I've commented most of this out because it duplicates tests in whatis.exp.
165# I've just left in a token test or 2 which is designed to test that ptype
166# acts like whatis for basic types. If it is thought to be necessary to
167# test both whatis and ptype for all the types, the tests should be
168# merged into whatis.exp, or else maintenance will be a royal pain -kingdon
169#setup_xfail "i960-*-*" 1821
170#setup_xfail "mips-idt-*" "mips-sgi-*" "a29k-*-*"
171#send "ptype v_char\n"
172#gdb_expect {
173# -re "type = char.*$gdb_prompt $" { pass "ptype char" }
174# -re ".*$gdb_prompt $" { fail "ptype char" }
175# timeout { fail "(timeout) ptype char" }
176#}
177#
178#
179#setup_xfail "mips-*-*" "a29k-*-*"
180#send "ptype v_signed_char\n"
181#gdb_expect {
182# -re "type = signed char.*$gdb_prompt $" { pass "ptype signed char" }
183# -re ".*$gdb_prompt $" { fail "ptype signed char" }
184# timeout { fail "(timeout) ptype signed char" }
185#}
186#
187#
188#send "ptype v_unsigned_char\n"
189#gdb_expect {
190# -re "type = unsigned char.*$gdb_prompt $" { pass "ptype unsigned char" }
191# -re ".*$gdb_prompt $" { fail "ptype unsigned char" }
192# timeout { fail "(timeout) ptype unsigned char" }
193#}
194
195gdb_test "ptype v_short" "type = short(| int).*" "ptype short"
196
197#send "ptype v_signed_short\n"
198#gdb_expect {
199# -re "type = short.*$gdb_prompt $" { pass "ptype signed short" }
200# -re ".*$gdb_prompt $" { fail "ptype signed short" }
201# timeout { fail "(timeout) ptype signed short" }
202#}
203#
204#
205#send "ptype v_unsigned_short\n"
206#gdb_expect {
207# -re "type = unsigned short.*$gdb_prompt $" { pass "ptype unsigned short" }
208# -re ".*$gdb_prompt $" { fail "ptype unsigned short" }
209# timeout { fail "(timeout) ptype unsigned short" }
210#}
211
212
213gdb_test "ptype v_int" "type = int.*" "ptype int"
214
215#send "ptype v_signed_int\n"
216#gdb_expect {
217# -re "type = int.*$gdb_prompt $" { pass "ptype signed int" }
218# -re ".*$gdb_prompt $" { fail "ptype signed int" }
219# timeout { fail "(timeout) ptype signed int" }
220#}
221#
222#
223#send "ptype v_unsigned_int\n"
224#gdb_expect {
225# -re "type = unsigned int.*$gdb_prompt $" { pass "ptype unsigned int" }
226# -re ".*$gdb_prompt $" { fail "ptype unsigned int" }
227# timeout { fail "(timeout) ptype unsigned int" }
228#}
229#
230#
231#send "ptype v_long\n"
232#gdb_expect {
233# -re "type = long.*$gdb_prompt $" { pass "ptype long" }
234# -re ".*$gdb_prompt $" { fail "ptype long" }
235# timeout { fail "(timeout) ptype long" }
236#}
237#
238#
239#send "ptype v_signed_long\n"
240#gdb_expect {
241# -re "type = long.*$gdb_prompt $" { pass "ptype signed long" }
242# -re ".*$gdb_prompt $" { fail "ptype signed long" }
243# timeout { fail "(timeout) ptype signed long" }
244#}
245#
246#
247#send "ptype v_unsigned_long\n"
248#gdb_expect {
249# -re "type = unsigned long.*$gdb_prompt $" { pass "ptype unsigned long" }
250# -re ".*$gdb_prompt $" { fail "ptype unsigned long" }
251# timeout { fail "(timeout) ptype unsigned long" }
252#}
253#
254#
255#send "ptype v_float\n"
256#gdb_expect {
257# -re "type = float.*$gdb_prompt $" { pass "ptype float" }
258# -re ".*$gdb_prompt $" { fail "ptype float" }
259# timeout { fail "(timeout) ptype float" }
260#}
261#
262#
263#send "ptype v_double\n"
264#gdb_expect {
265# -re "type = double.*$gdb_prompt $" { pass "ptype double" }
266# -re ".*$gdb_prompt $" { fail "ptype double" }
267# timeout { fail "(timeout) ptype double" }
268#}
269
270
271#
272# test ptype command with arrays
273#
274#setup_xfail "i960-*-*" 1821
275#setup_xfail "mips-idt-*" "mips-sgi-*" "a29k-*-*"
276#send "ptype v_char_array\n"
277#gdb_expect {
278# -re "type = char .2..*$gdb_prompt $" { pass "ptype char array" }
279# -re ".*$gdb_prompt $" { fail "ptype char array" }
280# timeout { fail "(timeout) ptype char array" }
281#}
282#
283#
284#setup_xfail "mips-*-*" "a29k-*-*"
285#send "ptype v_signed_char_array\n"
286#gdb_expect {
287# -re "type = (|signed )char .2..*$gdb_prompt $" { pass "ptype signed char array" }
288# -re ".*$gdb_prompt $" { fail "ptype signed char array" }
289# timeout { fail "(timeout) ptype signed char array" }
290#}
291#
292#
293#send "ptype v_unsigned_char_array\n"
294#gdb_expect {
295# -re "type = unsigned char .2..*$gdb_prompt $" { pass "ptype unsigned char array" }
296# -re ".*$gdb_prompt $" { fail "ptype unsigned char array" }
297# timeout { fail "(timeout) ptype unsigned char array" }
298#}
299#
300#
301#
302#send "ptype v_int_array\n"
303#gdb_expect {
304# -re "type = int .2..*$gdb_prompt $" { pass "ptype int array" }
305# -re ".*$gdb_prompt $" { fail "ptype int array" }
306# timeout { fail "(timeout) ptype int array" }
307#}
308#
309#
310#send "ptype v_signed_int_array\n"
311#gdb_expect {
312# -re "type = int .2..*$gdb_prompt $" { pass "ptype signed int array" }
313# -re ".*$gdb_prompt $" { fail "ptype signed int array" }
314# timeout { fail "(timeout) ptype signed int array" }
315#}
316#
317#
318#send "ptype v_unsigned_int_array\n"
319#gdb_expect {
320# -re "type = unsigned int .2..*$gdb_prompt $" { pass "ptype unsigned int array" }
321# -re ".*$gdb_prompt $" { fail "ptype unsigned int array" }
322# timeout { fail "(timeout) ptype unsigned int array" }
323#}
324#
325#
326#send "ptype v_long_array\n"
327#gdb_expect {
328# -re "type = (long|int|long int) .2..*$gdb_prompt $" {
329# pass "ptype long array" }
330# -re ".*$gdb_prompt $" { fail "ptype long array" }
331# timeout { fail "(timeout) ptype long array" }
332#}
333#
334#
335#send "ptype v_signed_long_array\n"
336#gdb_expect {
337# -re "type = (long|int|long int) .2..*$gdb_prompt $" {
338# pass "ptype signed long array" }
339# -re ".*$gdb_prompt $" { fail "ptype signed long array" }
340# timeout { fail "(timeout) ptype signed long array" }
341#}
342#
343#
344#send "ptype v_unsigned_long_array\n"
345#gdb_expect {
346# -re "type = unsigned long .2..*$gdb_prompt $" { pass "ptype unsigned long array" }
347# -re ".*$gdb_prompt $" { fail "ptype unsigned long array" }
348# timeout { fail "(timeout) ptype unsigned long array" }
349#}
350#
351#
352#send "ptype v_float_array\n"
353#gdb_expect {
354# -re "type = float .2..*$gdb_prompt $" { pass "ptype float array" }
355# -re ".*$gdb_prompt $" { fail "ptype float array" }
356# timeout { fail "(timeout) ptype float array" }
357#}
358#
359#
360#send "ptype v_double_array\n"
361#gdb_expect {
362# -re "type = double .2..*$gdb_prompt $" { pass "ptype double array" }
363# -re ".*$gdb_prompt $" { fail "ptype double array" }
364# timeout { fail "(timeout) ptype double array" }
365#}
366#
367
368if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" "i*86-*-sysv4*" }
369setup_xfail_format "DWARF 1"
085dd6e6 370if {$hp_aCC_compiler} {setup_xfail "hppa*-*-*"}
c906108c
SS
371gdb_test "ptype t_char_array" "type = (|unsigned )char \\\[0?\\\]"
372
373#
374##
375## test ptype command with pointers
376##
377#setup_xfail "i960-*-*" 1821
378#setup_xfail "mips-idt-*" "mips-sgi-*" "a29k-*-*"
379#send "ptype v_char_pointer\n"
380#gdb_expect {
381# -re "type = char \*.*$gdb_prompt $" { pass "ptype char pointer" }
382# -re ".*$gdb_prompt $" { fail "ptype char pointer" }
383# timeout { fail "(timeout) ptype char pointer" }
384#}
385#
386#
387#setup_xfail "mips-*-*" "a29k-*-*"
388#send "ptype v_signed_char_pointer\n"
389#gdb_expect {
390# -re "type = (|signed )char \*.*$gdb_prompt $"
391# { pass "ptype signed char pointer" }
392# -re ".*$gdb_prompt $" { fail "ptype signed char pointer" }
393# timeout { fail "(timeout) ptype signed char pointer" }
394#}
395#
396#
397#send "ptype v_unsigned_char_pointer\n"
398#gdb_expect {
399# -re "type = unsigned char \*.*$gdb_prompt $" { pass "ptype unsigned char pointer" }
400# -re ".*$gdb_prompt $" { fail "ptype unsigned char pointer" }
401# timeout { fail "(timeout) ptype unsigned char pointer" }
402#}
403#
404#
405#send "ptype v_short_pointer\n"
406#gdb_expect {
407# -re "type = (short|short int) \*.*$gdb_prompt $" { pass "ptype short pointer" }
408# -re ".*$gdb_prompt $" { fail "ptype short pointer" }
409# timeout { fail "(timeout) ptype short pointer" }
410#}
411#
412#
413#send "ptype v_signed_short_pointer\n"
414#gdb_expect {
415# -re "type = short \*.*$gdb_prompt $" { pass "ptype signed short pointer" }
416# -re ".*$gdb_prompt $" { fail "ptype signed short pointer" }
417# timeout { fail "(timeout) ptype signed short pointer" }
418#}
419#
420#
421#send "ptype v_unsigned_short_pointer\n"
422#gdb_expect {
423# -re "type = unsigned short \*.*$gdb_prompt $" { pass "ptype unsigned short pointer" }
424# -re ".*$gdb_prompt $" { fail "ptype unsigned short pointer" }
425# timeout { fail "(timeout) ptype unsigned short pointer" }
426#}
427#
428#
429#send "ptype v_int_pointer\n"
430#gdb_expect {
431# -re "type = int \*.*$gdb_prompt $" { pass "ptype int pointer" }
432# -re ".*$gdb_prompt $" { fail "ptype int pointer" }
433# timeout { fail "(timeout) ptype int pointer" }
434#}
435#
436#
437#send "ptype v_signed_int_pointer\n"
438#gdb_expect {
439# -re "type = int \*.*$gdb_prompt $" { pass "ptype signed int pointer" }
440# -re ".*$gdb_prompt $" { fail "ptype signed int pointer" }
441# timeout { fail "(timeout) ptype signed int pointer" }
442#}
443#
444#
445#send "ptype v_unsigned_int_pointer\n"
446#gdb_expect {
447# -re "type = unsigned int \*.*$gdb_prompt $" { pass "ptype unsigned int pointer" }
448# -re ".*$gdb_prompt $" { fail "ptype unsigned int pointer" }
449# timeout { fail "(timeout) ptype unsigned int pointer" }
450#}
451#
452#
453#send "ptype v_long_pointer\n"
454#gdb_expect {
455# -re "type = long \*.*$gdb_prompt $" { pass "ptype long pointer" }
456# -re ".*$gdb_prompt $" { fail "ptype long pointer" }
457# timeout { fail "(timeout) ptype long pointer" }
458#}
459#
460#
461#send "ptype v_signed_long_pointer\n"
462#gdb_expect {
463# -re "type = long \*.*$gdb_prompt $" { pass "ptype signed long pointer" }
464# -re ".*$gdb_prompt $" { fail "ptype signed long pointer" }
465# timeout { fail "(timeout) ptype signed long pointer" }
466#}
467#
468#
469#send "ptype v_unsigned_long_pointer\n"
470#gdb_expect {
471# -re "type = unsigned long \*.*$gdb_prompt $" { pass "ptype unsigned long pointer" }
472# -re ".*$gdb_prompt $" { fail "ptype unsigned long pointer" }
473# timeout { fail "(timeout) ptype unsigned long pointer" }
474#}
475#
476#
477#send "ptype v_float_pointer\n"
478#gdb_expect {
479# -re "type = float \*.*$gdb_prompt $" { pass "ptype float pointer" }
480# -re ".*$gdb_prompt $" { fail "ptype float pointer" }
481# timeout { fail "(timeout) ptype float pointer" }
482#}
483#
484#
485#send "ptype v_double_pointer\n"
486#gdb_expect {
487# -re "type = double \*.*$gdb_prompt $" { pass "ptype double pointer" }
488# -re ".*$gdb_prompt $" { fail "ptype double pointer" }
489# timeout { fail "(timeout) ptype double pointer" }
490#}
491
492#
493# test ptype command with nested structure and union
494#
085dd6e6
JM
495if {$hp_aCC_compiler} {
496 set outer "outer_struct::"
497 set struct ""
498 set union ""
499} else {
500 set outer ""
501 set struct "struct"
502 set union "union"
503}
504gdb_test "ptype struct outer_struct" "type = struct outer_struct \{.*\[\r\n\]+\
505.*int outer_int;.*\[\r\n\]+\
506.*(struct|) ${outer}inner_struct inner_struct_instance;.*\[\r\n\]+\
507.*(union|) ${outer}inner_union inner_union_instance;.*\[\r\n\]+\
508.*(long|long int|int) outer_long;.*\[\r\n\]\}.*" "ptype outer structure"
c906108c 509
085dd6e6 510gdb_test "ptype ${struct} ${outer}inner_struct" "type = struct ${outer}inner_struct \{.*\[\r\n\] int inner_int;.*\[\r\n\] (long|long int|int) inner_long;.*\[\r\n\]\}.*" "ptype inner structure"
c906108c 511
085dd6e6 512gdb_test "ptype ${union} ${outer}inner_union" "type = union ${outer}inner_union \{.*\[\r\n\] int inner_union_int;.*\[\r\n\] (long|long int|int) inner_union_long;.*\[\r\n\]\}.*" "ptype inner union"
c906108c 513
085dd6e6 514gdb_test "ptype nested_su" "type = struct outer_struct \{.*\[\r\n\] int outer_int;.*\[\r\n\] (struct |)${outer}inner_struct inner_struct_instance;.*\[\r\n\] (union |)${outer}inner_union inner_union_instance;.*\[\r\n\] (long|long int|int) outer_long;.*\[\r\n\]\}.*" "ptype nested structure"
c906108c
SS
515
516gdb_test "ptype nested_su.outer_int" "type = int.*" "ptype outer int"
517
085dd6e6 518gdb_test "ptype nested_su.inner_struct_instance" "type = struct ${outer}inner_struct \{.*\[\r\n\] int inner_int;.*\[\r\n\] (long|long int|int) inner_long;.*\[\r\n\]\}.*" "ptype nested structure #2"
c906108c
SS
519
520gdb_test "ptype nested_su.inner_struct_instance.inner_int" "type = int.*" "ptype inner int"
521
085dd6e6 522gdb_test "ptype nested_su.inner_union_instance" "type = union ${outer}inner_union \{.*\[\r\n\] int inner_union_int;.*\[\r\n\] (long|long int|int) inner_union_long;.*\[\r\n\]\}.*" "ptype nested union"
c906108c
SS
523
524# Test printing type of string constants and array constants, but
525# requires a running process. These call malloc, and can take a long
526# time to execute over a slow serial link, so increase the timeout.
527
528# UDI can't do this (PR 2416). XFAIL is not suitable, because attempting
529# the operation causes a slow painful death rather than a nice simple failure.
530
531if [runto_main] then {
532
533 get_debug_format
534 if [target_info exists gdb,cannot_call_functions] {
535 setup_xfail "*-*-*" 2416
536 fail "This target can not call functions"
537 continue
538 }
539
540 gdb_test "ptype \"abc\"" "type = char \\\[4\\\]"
541 gdb_test "ptype {'a','b','c'}" "type = char \\\[3\\\]"
542 gdb_test "ptype {0,1,2}" "type = int \\\[3\\\]"
543 gdb_test "ptype {(long)0,(long)1,(long)2}" "type = long \\\[3\\\]"
544 gdb_test "ptype {(float)0,(float)1,(float)2}" "type = float \\\[3\\\]"
545 gdb_test "ptype {{0,1,2},{3,4,5}}" "type = int \\\[2\\\]\\\[3\\\]"
546 gdb_test "ptype {4,5,6}\[2\]" "type = int"
547 gdb_test "ptype *&{4,5,6}\[1\]" "type = int"
548}
This page took 0.048586 seconds and 4 git commands to generate.