1 # Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2001
2 # Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 # Please email any bugs, comments, and/or additions to this file to:
19 # bug-gdb@prep.ai.mit.edu
21 # This file was written by Fred Fish. (fnf@cygnus.com)
30 if { [skip_cplus_tests] } { continue }
32 set testfile "virtfunc"
33 set srcfile ${testfile}.cc
34 set binfile ${objdir}/${subdir}/${testfile}
36 if [get_compiler_info ${binfile} "c++"] {
42 set src "${srcdir}/${subdir}/${srcfile}"
43 if { [gdb_compile "${src}" "${binfile}" executable {c++ debug}] != "" } {
44 gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
47 proc gdb_virtfunc_init {} {
48 global srcdir subdir binfile
51 gdb_reinitialize_dir $srcdir/$subdir
54 send_gdb "set language c++\n"
55 gdb_expect -re "$gdb_prompt $"
56 send_gdb "set width 0\n"
57 gdb_expect -re "$gdb_prompt $"
60 proc gdb_virtfunc_restart {} {
68 # Test printing of the types of various classes.
71 proc test_ptype_of_classes {} {
76 # This used to be a fail if it printed "struct" not "class". But
77 # since this struct doesn't use any special C++ features, it is
78 # considered right for GDB to print it as "struct".
81 -re "type = (struct|class) VA \{(${ws}public:|)${ws}int va;${ws}VA & operator=\\(VA const ?&\\);${ws}VA\\(VA const ?&\\);${ws}VA\\((void|)\\);${ws}\}.*$gdb_prompt $" {
84 -re "type = (struct|class) VA \{(${ws}public:|)${ws}int va;((${ws}VA & operator=\\(VA const ?&\\);)|(${ws}VA\\(VA const ?&\\);)|(${ws}VA\\((void|)\\);))*${ws}\}.*$gdb_prompt $" {
85 pass "ptype VA (obsolescent gcc or gdb)"
87 -re ".*$gdb_prompt $" {
91 fail "ptype VA (timeout)"
97 -re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const ?&\\);${ws}VB\\(VB const ?&\\);${ws}VB\\((void|)\\);${ws}int fvb\\((void|)\\);${ws}virtual int vvb\\((void|)\\);${ws}\}.*$gdb_prompt $" {
100 -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\((void|)\\);${ws}virtual int vvb \\((void|)\\);${ws}\}.*$gdb_prompt $" {
101 pass "ptype VB (aCC)"
103 -re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const ?&\\);)|(${ws}VB\\(VB const ?&\\);)|(${ws}VB\\((void|)\\);)|(${ws}int fvb\\((void|)\\);)|(${ws}virtual int vvb\\((void|)\\);))*${ws}\}.*$gdb_prompt $" {
104 pass "ptype VB (obsolescent gcc or gdb)"
106 -re ".*$gdb_prompt $" {
110 fail "ptype VB (timeout)"
116 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
119 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
122 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
123 pass "ptype V (obsolescent gcc or gdb)"
125 -re ".*$gdb_prompt $" {
129 fail "ptype V (timeout)"
133 # The format of a g++ virtual base pointer.
134 set vbptr "(_vb\[$.\]|__vb_)\[0-9\]?"
138 -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
141 -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);${ws}A\\(\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
144 -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
147 -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const ?&\\);)|(${ws}A\\(int, A const ?&\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
148 pass "ptype A (obsolescent gcc or gdb)"
150 -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}FOO;${ws}int a;${ws}public:${ws}virtual int f.void.;${ws}\}$nl$gdb_prompt $" {
151 # This happens because the type is defined only after it is
153 fail "ptype A (known failure with gcc cygnus-2.4.5-930417)"
154 # Many of the rest of these tests have the same problem.
157 -re ".*$gdb_prompt $" {
161 fail "ptype A (timeout)"
167 -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\(int, B const ?&\\);${ws}B\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
170 -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\(B const ?&\\);${ws}B\\(\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
173 -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
176 -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const ?&\\);)|(${ws}B\\(int, B const ?&\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
177 pass "ptype B (obsolescent gcc or gdb)"
179 -re ".*$gdb_prompt $" {
183 fail "ptype B (timeout)"
189 -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;${ws}C & operator=\\(C const ?&\\);${ws}C\\(int, C const ?&\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
192 -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}C & operator=\\(C const ?&\\);${ws}C\\(C const ?&\\);${ws}C\\(\\);${ws}\}$nl$gdb_prompt $" {
195 -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
198 -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const ?&\\);)|(${ws}C\\(int, C const ?&\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
199 pass "ptype C (obsolescent gcc or gdb)"
201 -re ".*$gdb_prompt $" {
205 fail "ptype C (timeout)"
209 send_gdb "ptype AD\n"
211 -re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const ?&\\);${ws}AD\\(AD const ?&\\);${ws}AD\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
214 -re "type = class AD \{${ws}public:${ws}virtual int vg \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
215 pass "ptype AD (aCC)"
217 -re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const ?&\\);)|(${ws}AD\\(AD const ?&\\);)|(${ws}AD\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
218 pass "ptype AD (obsolescent gcc or gdb)"
220 -re ".*$gdb_prompt $" {
224 fail "ptype AD (timeout)"
230 -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
233 -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\(\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
236 -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
239 -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
240 pass "ptype D (obsolescent gcc or gdb)"
242 -re ".*$gdb_prompt $" {
246 fail "ptype D (timeout)"
252 -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\(int, E const ?&\\);${ws}E\\(int\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
255 -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\(E const ?&\\);${ws}E\\(\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
258 -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\((void|)\\);${ws}virtual int vg \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
261 -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const ?&\\);)|(${ws}E\\(int, E const ?&\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
262 pass "ptype E (obsolescent gcc or gdb)"
264 -re ".*$gdb_prompt $" {
268 fail "ptype E (timeout)"
272 send_gdb "ptype dd\n"
274 -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
277 -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\(\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
280 -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
281 pass "ptype dd (aCC)"
283 -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
284 pass "ptype dd (obsolescent gcc or gdb)"
286 -re ".*$gdb_prompt $" {
290 fail "ptype dd (timeout)"
294 send_gdb "ptype ppd\n"
296 -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
299 -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\(\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
302 -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
303 pass "ptype ppd (aCC)"
305 -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
306 pass "ptype ppd (obsolescent gcc or gdb)"
308 -re ".*$gdb_prompt $" {
312 fail "ptype ppd (timeout)"
316 send_gdb "ptype pAd\n"
318 -re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const ?&\\);${ws}AD\\(AD const ?&\\);${ws}AD\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
321 -re "type = class AD \{${ws}public:${ws}virtual int vg \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
322 pass "ptype pAd (aCC)"
324 -re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const ?&\\);)|(${ws}AD\\(AD const ?&\\);)|(${ws}AD\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
325 pass "ptype pAd (obsolescent gcc or gdb)"
327 -re ".*$gdb_prompt $" {
331 fail "ptype pAd (timeout)"
337 -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
340 -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);${ws}A\\(\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
343 -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
346 -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const ?&\\);)|(${ws}A\\(int, A const ?&\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
347 pass "ptype a (obsolescent gcc or gdb)"
349 -re ".*$gdb_prompt $" {
353 fail "ptype a (timeout)"
359 -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\(int, B const ?&\\);${ws}B\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
362 -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\(B const ?&\\);${ws}B\\(\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
365 -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
368 -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const ?&\\);)|(${ws}B\\(int, B const ?&\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
369 pass "ptype b (obsolescent gcc or gdb)"
371 -re ".*$gdb_prompt $" {
375 fail "ptype b (timeout)"
381 -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;${ws}C & operator=\\(C const ?&\\);${ws}C\\(int, C const ?&\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
384 -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}C & operator=\\(C const ?&\\);${ws}C\\(C const ?&\\);${ws}C\\(\\);${ws}\}$nl$gdb_prompt $" {
387 -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
390 -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const ?&\\);)|(${ws}C\\(int, C const ?&\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
391 pass "ptype c (obsolescent gcc or gdb)"
393 -re ".*$gdb_prompt $" {
397 fail "ptype c (timeout)"
403 -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
406 -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\(\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
409 -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
412 -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
413 pass "ptype d (obsolescent gcc or gdb)"
415 -re ".*$gdb_prompt $" {
419 fail "ptype d (timeout)"
425 -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\(int, E const ?&\\);${ws}E\\(int\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
428 -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\(E const ?&\\);${ws}E\\(\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
431 -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\((void|)\\);${ws}virtual int vg \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
434 -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const ?&\\);)|(${ws}E\\(int, E const ?&\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
435 pass "ptype e (obsolescent gcc or gdb)"
437 -re ".*$gdb_prompt $" {
441 fail "ptype e (timeout)"
447 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
450 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
453 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
454 pass "ptype v (obsolescent gcc or gdb)"
456 -re ".*$gdb_prompt $" {
460 fail "ptype v (timeout)"
464 send_gdb "ptype vb\n"
466 -re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const ?&\\);${ws}VB\\(VB const ?&\\);${ws}VB\\((void|)\\);${ws}int fvb\\((void|)\\);${ws}virtual int vvb\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
469 -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\((void|)\\);${ws}virtual int vvb \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
470 pass "ptype vb (aCC)"
472 -re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const ?&\\);)|(${ws}VB\\(VB const ?&\\);)|(${ws}VB\\((void|)\\);)|(${ws}int fvb\\((void|)\\);)|(${ws}virtual int vvb\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
473 pass "ptype vb (obsolescent gcc or gdb)"
475 -re ".*$gdb_prompt $" {
479 fail "ptype vb (timeout)"
483 send_gdb "ptype pAa\n"
485 -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
488 -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);${ws}A\\(\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
491 -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
492 pass "ptype pAa (aCC)"
494 -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const ?&\\);)|(${ws}A\\(int, A const ?&\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
495 pass "ptype pAa (obsolescent gcc or gdb)"
497 -re ".*$gdb_prompt $" {
501 fail "ptype pAa (timeout)"
505 send_gdb "ptype pAe\n"
507 -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
510 -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);${ws}A\\(\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
513 -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
514 pass "ptype pAe (aCC)"
516 -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const ?&\\);)|(${ws}A\\(int, A const ?&\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
517 pass "ptype pAe (obsolescent gcc or gdb)"
519 -re ".*$gdb_prompt $" {
523 fail "ptype pAe (timeout)"
527 send_gdb "ptype pBe\n"
529 -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\(int, B const ?&\\);${ws}B\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
532 -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\(B const ?&\\);${ws}B\\(\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
535 -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
536 pass "ptype pBe (aCC)"
538 -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const ?&\\);)|(${ws}B\\(int, B const ?&\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
539 pass "ptype pBe (obsolescent gcc or gdb)"
541 -re ".*$gdb_prompt $" {
545 fail "ptype pBe (timeout)"
549 send_gdb "ptype pDd\n"
551 -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
554 -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\(\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
557 -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
558 pass "ptype pDd (aCC)"
560 -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
561 pass "ptype pDd (obsolescent gcc or gdb)"
563 -re ".*$gdb_prompt $" {
567 fail "ptype pDd (timeout)"
571 send_gdb "ptype pDe\n"
573 -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
576 -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\(\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
579 -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
580 pass "ptype pDe (aCC)"
582 -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
583 pass "ptype pDe (obsolescent gcc or gdb)"
585 -re ".*$gdb_prompt $" {
589 fail "ptype pDe (timeout)"
593 send_gdb "ptype pVa\n"
595 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
598 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
599 pass "ptype pVa (aCC)"
601 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
602 pass "ptype pVa (obsolescent gcc or gdb)"
604 -re ".*$gdb_prompt $" {
608 fail "ptype pVa (timeout)"
612 send_gdb "ptype pVv\n"
614 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
617 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
618 pass "ptype pVv (aCC)"
620 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
621 pass "ptype pVv (obsolescent gcc or gdb)"
623 -re ".*$gdb_prompt $" {
627 fail "ptype pVv (timeout)"
631 send_gdb "ptype pVe\n"
633 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
636 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
637 pass "ptype pVe (aCC)"
639 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
640 pass "ptype pVe (obsolescent gcc or gdb)"
642 -re ".*$gdb_prompt $" {
646 fail "ptype pVe (timeout)"
650 send_gdb "ptype pVd\n"
652 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
655 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
656 pass "ptype pVd (aCC)"
658 -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
659 pass "ptype pVd (obsolescent gcc or gdb)"
661 -re ".*$gdb_prompt $" {
665 fail "ptype pVd (timeout)"
669 send_gdb "ptype pADe\n"
671 -re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const ?&\\);${ws}AD\\(AD const ?&\\);${ws}AD\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
674 -re "type = class AD \{${ws}public:${ws}virtual int vg \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
675 pass "ptype pADe (aCC)"
677 -re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const ?&\\);)|(${ws}AD\\(AD const ?&\\);)|(${ws}AD\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
678 pass "ptype pADe (obsolescent gcc or gdb)"
680 -re ".*$gdb_prompt $" {
684 fail "ptype pADe (timeout)"
688 send_gdb "ptype pEe\n"
690 -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\(int, E const ?&\\);${ws}E\\(int\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
693 -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\(E const ?&\\);${ws}E\\(\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
696 -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\((void|)\\);${ws}virtual int vg \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
697 pass "ptype pEe (aCC)"
699 -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const ?&\\);)|(${ws}E\\(int, E const ?&\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
700 pass "ptype pEe (obsolescent gcc or gdb)"
702 -re ".*$gdb_prompt $" {
706 fail "ptype pEe (timeout)"
710 send_gdb "ptype pVB\n"
712 -re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const ?&\\);${ws}VB\\(VB const ?&\\);${ws}VB\\((void|)\\);${ws}int fvb\\((void|)\\);${ws}virtual int vvb\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
715 -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\((void|)\\);${ws}virtual int vvb \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
716 pass "ptype pVB (aCC)"
718 -re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const ?&\\);)|(${ws}VB\\(VB const ?&\\);)|(${ws}VB\\((void|)\\);)|(${ws}int fvb\\((void|)\\);)|(${ws}virtual int vvb\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
719 pass "ptype pVB (obsolescent gcc or gdb)"
721 -re ".*$gdb_prompt $" {
725 fail "ptype pVB (timeout)"
731 # Test calling of virtual functions.
734 proc test_virtual_calls {} {
740 if [target_info exists gdb,cannot_call_functions] {
741 setup_xfail "*-*-*" 2416
742 fail "This target can not call functions"
746 # FIXME: In fall 1998, GCC's virtual function type info was changed,
747 # which causes GDB to be unable to resolve these calls. Until the
748 # problem is fixed, XFAIL these tests. -sts 1999-08-02
750 if {$gcc_compiled} then { setup_xfail "*-*-*" }
752 send_gdb "print pAe->f()\n"
754 -re ".* = 20$nl$gdb_prompt $" { pass "print pAe->f()" }
755 -re "Cannot invoke functions on this machine.*$gdb_prompt $" {
756 fail "print pAe->f() (cannot invoke functions, skipping virtual calls)"
759 -re ".*Cannot access memory at address 0x8.*$gdb_prompt $" {
760 fail "print pAe->f() \
761 (known failure with gcc cygnus-2.4.5-930417, skipping virtual calls)"
764 -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
765 setup_xfail hppa*-*-* CLLbs16899
766 fail "print pAe->f()"
768 -re ".*$gdb_prompt $" { fail "print pAe->f()" }
769 timeout { fail "print pAe->f() (timeout)" }
770 eof { fail "print pAe->f() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
773 if {$gcc_compiled} then { setup_xfail "*-*-*" }
775 send_gdb "print pAa->f()\n"
777 -re ".* = 1$nl$gdb_prompt $" { pass "print pAa->f()" }
778 -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
779 setup_xfail hppa*-*-* CLLbs16899
780 fail "print pAa->f()"
782 -re ".*$gdb_prompt $" { fail "print pAa->f()" }
783 timeout { fail "print pAa->f() (timeout)" }
784 eof { fail "print pAa->f() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
787 if {$gcc_compiled} then { setup_xfail "*-*-*" }
789 send_gdb "print pDe->vg()\n"
791 -re ".* = 202$nl$gdb_prompt $" { pass "print pDe->vg()" }
792 -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
793 setup_xfail hppa*-*-* CLLbs16899
794 fail "print pDe->vg()"
796 -re ".*$gdb_prompt $" { fail "print pDe->vg()" }
797 timeout { fail "print pDe->vg() (timeout)" }
798 eof { fail "print pDe->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
801 if {$gcc_compiled} then { setup_xfail "*-*-*" }
803 send_gdb "print pADe->vg()\n"
805 -re ".* = 202$nl$gdb_prompt $" { pass "print pADe->vg()" }
806 -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
807 setup_xfail hppa*-*-* CLLbs16899
808 fail "print pADe->vg()"
810 -re ".*$gdb_prompt $" { fail "print pADe->vg()" }
811 timeout { fail "print pADe->vg() (timeout)" }
812 eof { fail "print pADe->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
815 if {$gcc_compiled} then { setup_xfail "*-*-*" }
817 send_gdb "print pDd->vg()\n"
819 -re ".* = 101$nl$gdb_prompt $" { pass "print pDd->vg()" }
820 -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
821 setup_xfail hppa*-*-* CLLbs16899
822 fail "print pDd->vg()"
824 -re ".*$gdb_prompt $" { fail "print pDd->vg()" }
825 timeout { fail "print pDd->vg() (timeout)" }
826 eof { fail "print pDd->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
829 if {$gcc_compiled} then { setup_xfail "*-*-*" }
831 send_gdb "print pEe->vvb()\n"
833 -re ".* = 411$nl$gdb_prompt $" { pass "print pEe->vvb()" }
834 -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
835 setup_xfail hppa*-*-* CLLbs16899
836 fail "print pEe->vvb()"
838 -re ".*$gdb_prompt $" { fail "print pEe->vvb()" }
839 timeout { fail "print pEe->vvb() (timeout)" }
840 eof { fail "print pEe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
843 if {$gcc_compiled} then { setup_xfail "*-*-*" }
845 send_gdb "print pVB->vvb()\n"
847 -re ".* = 407$nl$gdb_prompt $" { pass "print pVB->vvb()" }
848 -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
849 setup_xfail hppa*-*-* CLLbs16899
850 fail "print pVB->vvb()"
852 -re ".*$gdb_prompt $" { fail "print pVB->vvb()" }
853 timeout { fail "print pVB->vvb() (timeout)" }
854 eof { fail "print pVB->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
857 if {$gcc_compiled} then { setup_xfail "*-*-*" }
859 send_gdb "print pBe->vvb()\n"
861 -re ".* = 411$nl$gdb_prompt $" { pass "print pBe->vvb()" }
862 -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
863 setup_xfail hppa*-*-* CLLbs16899
864 fail "print pBe->vvb()"
866 -re ".*$gdb_prompt $" { fail "print pBe->vvb()" }
867 timeout { fail "print pBe->vvb() (timeout)" }
868 eof { fail "print pBe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
871 if {$gcc_compiled} then { setup_xfail "*-*-*" }
873 send_gdb "print pDe->vvb()\n"
875 -re ".* = 411$nl$gdb_prompt $" { pass "print pDe->vvb()" }
876 -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
877 setup_xfail hppa*-*-* CLLbs16899
878 fail "print pDe->vvb()"
880 -re ".*$gdb_prompt $" { fail "print pDe->vvb()" }
881 timeout { fail "print pDe->vvb() (timeout)" }
882 eof { fail "print pDe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
885 if {$gcc_compiled} then { setup_xfail "*-*-*" }
887 send_gdb "print pEe->vd()\n"
889 -re ".* = 282$nl$gdb_prompt $" { pass "print pEe->vd()" }
890 -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
891 setup_xfail hppa*-*-* CLLbs16899
892 fail "print pEe->vd()"
894 -re ".*$gdb_prompt $" { fail "print pEe->vd()" }
895 timeout { fail "print pEe->vd() (timeout)" }
896 eof { fail "print pEe->vd() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
899 if {$gcc_compiled} then { setup_xfail "*-*-*" }
901 send_gdb "print pEe->fvb()\n"
903 -re ".* = 311$nl$gdb_prompt $" { pass "print pEe->fvb()" }
904 -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
905 setup_xfail hppa*-*-* CLLbs16899
906 fail "print pEe->fvb()"
908 -re ".*$gdb_prompt $" { fail "print pEe->fvb()" }
909 timeout { fail "print pEe->fvb() (timeout)" }
910 eof { fail "print pEe->fvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
913 if {$gcc_compiled} then { setup_xfail "*-*-*" }
915 send_gdb "print pEe->D::vg()\n"
918 -re ".* = 102$nl$gdb_prompt $" { pass "print pEe->D::vg()" }
919 -re ".*$gdb_prompt $" { fail "print pEe->D::vg()" }
920 timeout { fail "print pEe->D::vg() (timeout)" }
921 eof { fail "print pEe->D::vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
935 # Get the debug format for the compiled test case. If that
936 # format is DWARF 1 then just skip all the tests since none of
939 if [ runto_main ] then {
941 if [ setup_xfail_format "DWARF 1" ] then {
942 fail "C++ tests skipped due to limited C++ support in DWARF 1 debug format"
948 test_ptype_of_classes
950 if [ runto 'test_calls' ] then {