2003-12-31 Michael Chastain <mec.gnu@mindspring.com>
[external/binutils.git] / gdb / testsuite / gdb.cp / virtfunc.exp
1 # Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003
2 # Free Software Foundation, Inc.
3
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.
8
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.
13
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.  
17
18 # Please email any bugs, comments, and/or additions to this file to:
19 # bug-gdb@prep.ai.mit.edu
20
21 # This file was written by Fred Fish. (fnf@cygnus.com)
22 # And rewritten by Michael Chastain <mec.gnu@mindspring.com>.
23
24 set ws "\[\r\n\t \]+"
25 set nl "\[\r\n\]+"
26
27 if $tracelevel then {
28     strace $tracelevel
29 }
30
31 if { [skip_cplus_tests] } { continue }
32
33 set testfile "virtfunc"
34 set srcfile ${testfile}.cc
35 set binfile ${objdir}/${subdir}/${testfile}
36
37 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {c++ debug}] != "" } {
38      gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
39 }
40
41 # Test ptype of class objects.
42 #
43 # Different C++ compilers produce different output.  I build up regular
44 # expressions piece by piece to accommodate all the compilers that I
45 # have seen: gcc 2.95.3, gcc 3.3.2 (ABI 1), gcc 3.4 prerelease (ABI 2);
46 # and all the debug formats I have seen: dwarf-2 and stabs+.
47 #
48 # A complicated class declaration looks like this:
49 #
50 #   class A : public virtual V {        // re_class
51 #     private:
52 #       V * _vb$V;                      // re_vbptr
53 #       int a;                          // re_fields
54 #
55 #     public:
56 #       A & operator=(A const &);       // re_synth_gcc_2
57 #       A(int, A const &);              // ...
58 #       A(int);                         // ...
59 #       virtual int f(void);            // re_methods
60 #   }
61 #
62 # RE_CLASS matches the class declaration.  C++ allows multiple ways of
63 # expressing this.
64 #
65 #   struct ... { private: ... };
66 #   class ... { private: ... };
67 #   class ... { ... };
68 #
69 # RE_VBPTR matches the virtual base declarations.  gcc 2.95.3 emits
70 # these, but gcc 3.X.Y does not.  The name depends on the debug format.
71 #
72 # RE_FIELDS matches the data fields of the class.
73 # RE_METHODS matches the methods explicitly declared for the class.
74 #
75 # RE_SYNTH_GCC_2 and RE_SYNTH_GCC_3 match the optional synthetic methods
76 # of the class.  gcc -gstabs+ emits these methods, and gcc -gdwarf-2
77 # does not.
78 #
79 # RE_ALL_METHODS combines RE_METHODS and the optional synthetic methods.
80 # Up to gcc 3.3.X, gcc defaults to gcc ABI 1, with synthetic methods at
81 # the beginning.  Starting with gcc 3.4.X, gcc defaults to gcc ABI 2,
82 # with synthetic methods at the end.
83 #
84 # So the possible choices for RE_ALL_METHODS are:
85 #
86 #   RE_METHODS                  // any gcc with dwarf-2
87 #   RE_SYNTH_GCC_2|RE_METHODS   // gcc 2.95.3, stabs+
88 #   RE_SYNTH_GCC_3|RE_METHODS   // gcc 3.3.2, stabs+
89 #   RE_METHODS|RE_SYNTH_GCC_3   // gcc 3.4.0, stabs+
90 #
91 # When I get HP-UX aCC, I hope that I can just add RE_SYNTH_ACC_FOO
92 # and enlarge RE_ALL_METHODS.
93 #
94 # Yet another twist: with gcc v2, ctor and dtor methods have a hidden
95 # argument in front, the "in-charge" flag.  With gcc v3, there is no
96 # hidden argument; instead, there are multiple object functions for
97 # each ctor and dtor.
98 #
99 # I use gdb_test_multiple with only one arm.  I could use gdb_test,
100 # but gdb_test_multiple makes it easier to add KFAIL arms as needed.
101 #
102 # -- chastain 2003-12-31
103
104 proc test_ptype_of_classes {} {
105     global gdb_prompt
106     global ws
107     global nl
108
109     # class VA
110
111     set re_class        "((struct|class) VA \{${ws}public:|struct VA \{)"
112     set re_fields       "int va;"
113     set re_synth_gcc_23 "VA & operator=\\(VA const ?&\\);${ws}VA\\(VA const ?&\\);${ws}VA\\((void|)\\);"
114     set re_all_methods  "(|$re_synth_gcc_23)"
115
116     gdb_test_multiple "ptype VA" "ptype VA" {
117         -re "type = $re_class${ws}$re_fields${ws}(public:${ws}|)$re_all_methods$nl\}$nl$gdb_prompt $" {
118             pass "ptype VA"
119         }
120     }
121
122     # class VB
123
124     set re_class        "((struct|class) VB \{${ws}public:|struct VB \{)"
125     set re_fields       "int vb;"
126     set re_methods      "int fvb\\((void|)\\);${ws}virtual int vvb\\((void|)\\);"
127     set re_synth_gcc_23 "VB & operator=\\(VB const ?&\\);${ws}VB\\(VB const ?&\\);${ws}VB\\((void|)\\);"
128     set re_all_methods  "($re_methods|$re_methods${ws}$re_synth_gcc_23|$re_synth_gcc_23${ws}$re_methods)"
129
130     gdb_test_multiple "ptype VB" "ptype VB" {
131         -re "type = $re_class${ws}$re_fields${ws}(public:${ws}|)$re_all_methods$nl\}$nl$gdb_prompt $" {
132             pass "ptype VB"
133         }
134     }
135
136     # An instance of VB
137
138     gdb_test_multiple "ptype vb" "ptype vb" {
139         -re "type = $re_class${ws}$re_fields${ws}(public:${ws}|)$re_all_methods$nl\}$nl$gdb_prompt $" {
140             pass "ptype vb"
141         }
142     }
143
144     # An instance of VB *
145
146     gdb_test_multiple "ptype pVB" "ptype pVB" {
147         -re "type = $re_class${ws}$re_fields${ws}(public:${ws}|)$re_all_methods$nl\} \\*$nl$gdb_prompt $" {
148             pass "ptype pVB"
149         }
150     }
151
152     # class V
153
154     set re_class        "class V : public VA, public VB \{${ws}public:"
155     set re_fields       "int w;"
156     set re_methods      "int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);"
157     set re_synth_gcc_23 "V & operator=\\(V const ?&\\);${ws}V\\(V const ?&\\);${ws}V\\((void|)\\);"
158     set re_all_methods  "($re_methods|$re_methods${ws}$re_synth_gcc_23|$re_synth_gcc_23${ws}$re_methods)"
159
160     gdb_test_multiple "ptype V" "ptype V" {
161         -re "type = $re_class${ws}$re_fields${ws}(public:${ws}|)$re_all_methods$nl\}$nl$gdb_prompt $" {
162             pass "ptype V"
163         }
164     }
165
166     # An instance of V
167
168     gdb_test_multiple "ptype v" "ptype v" {
169         -re "type = $re_class${ws}$re_fields${ws}(public:${ws}|)$re_all_methods$nl\}$nl$gdb_prompt $" {
170             pass "ptype v"
171         }
172     }
173
174     # An instance of V *
175
176     gdb_test_multiple "ptype pVa" "ptype pVa" {
177         -re "type = $re_class${ws}$re_fields${ws}(public:${ws}|)$re_all_methods$nl\} \\*$nl$gdb_prompt $" {
178             pass "ptype pVa"
179         }
180     }
181
182     # An instance of V *
183
184     gdb_test_multiple "ptype pVv" "ptype pVv" {
185         -re "type = $re_class${ws}$re_fields${ws}(public:${ws}|)$re_all_methods$nl\} \\*$nl$gdb_prompt $" {
186             pass "ptype pVv"
187         }
188     }
189
190     # An instance of V *
191
192     gdb_test_multiple "ptype pVe" "ptype pVe" {
193         -re "type = $re_class${ws}$re_fields${ws}(public:${ws}|)$re_all_methods$nl\} \\*$nl$gdb_prompt $" {
194             pass "ptype pVe"
195         }
196     }
197
198     # An instance of V *
199
200     gdb_test_multiple "ptype pVd" "ptype pVd" {
201         -re "type = $re_class${ws}$re_fields${ws}(public:${ws}|)$re_all_methods$nl\} \\*$nl$gdb_prompt $" {
202             pass "ptype pVd"
203         }
204     }
205
206     # class A
207
208     set re_class        "class A : public virtual V \{(${ws}private:|)"
209     set re_vbptr        "V \\*(_vb.1V|_vb.V);"
210     set re_fields       "int a;"
211     set re_methods      "virtual int f\\((void|)\\);"
212     # gcc 2 adds an "in-charge" arg to the ctor.
213     set re_synth_gcc_2  "A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);"
214     set re_synth_gcc_3  "A & operator=\\(A const ?&\\);${ws}A\\(A const ?&\\);${ws}A\\(\\);"
215     set re_all_methods  "($re_methods|$re_synth_gcc_2${ws}$re_methods|$re_synth_gcc_3${ws}$re_methods|$re_methods${ws}$re_synth_gcc_3)"
216
217     gdb_test_multiple "ptype A" "ptype A" {
218         -re "type = ${re_class}${ws}(${re_vbptr}${ws}|)${re_fields}${ws}public:${ws}${re_all_methods}$nl\}$nl$gdb_prompt $" {
219             pass "ptype A"
220         }
221     }
222
223     # An instance of A
224
225     gdb_test_multiple "ptype a" "ptype a" {
226         -re "type = ${re_class}${ws}(${re_vbptr}${ws}|)${re_fields}${ws}public:${ws}${re_all_methods}$nl\}$nl$gdb_prompt $" {
227             pass "ptype a"
228         }
229     }
230
231     # An instance of A *
232
233     gdb_test_multiple "ptype pAa" "ptype pAa" {
234         -re "type = ${re_class}${ws}(${re_vbptr}${ws}|)${re_fields}${ws}public:${ws}${re_all_methods}$nl\} \\*$nl$gdb_prompt $" {
235             pass "ptype pAa"
236         }
237     }
238
239     # An instance of A *
240
241     gdb_test_multiple "ptype pAe" "ptype pAe" {
242         -re "type = ${re_class}${ws}(${re_vbptr}${ws}|)${re_fields}${ws}public:${ws}${re_all_methods}$nl\} \\*$nl$gdb_prompt $" {
243             pass "ptype pAe"
244         }
245     }
246
247     # class B
248
249     set re_class        "class B : public A \{(${ws}private:|)"
250     set re_vbptr        "V \\*(_vb.1V|_vb.V);"
251     set re_fields       "int b;"
252     set re_methods      "virtual int f\\((void|)\\);"
253     set re_synth_gcc_2  "B & operator=\\(B const ?&\\);${ws}B\\(int, B const ?&\\);${ws}B\\(int\\);"
254     set re_synth_gcc_3  "B & operator=\\(B const ?&\\);${ws}B\\(B const ?&\\);${ws}B\\(\\);"
255     set re_all_methods  "($re_methods|$re_synth_gcc_2${ws}$re_methods|$re_synth_gcc_3${ws}$re_methods|$re_methods${ws}$re_synth_gcc_3)"
256
257     gdb_test_multiple "ptype B" "ptype B" {
258         -re "type = ${re_class}${ws}(${re_vbptr}${ws}|)${re_fields}${ws}public:${ws}${re_all_methods}$nl\}$nl$gdb_prompt $" {
259             pass "ptype B"
260         }
261     }
262
263     # An instance of B
264
265     gdb_test_multiple "ptype b" "ptype b" {
266         -re "type = ${re_class}${ws}(${re_vbptr}${ws}|)${re_fields}${ws}public:${ws}${re_all_methods}$nl\}$nl$gdb_prompt $" {
267             pass "ptype b"
268         }
269     }
270
271     # An instance of B *
272
273     gdb_test_multiple "ptype pBe" "ptype pBe" {
274         -re "type = ${re_class}${ws}(${re_vbptr}${ws}|)${re_fields}${ws}public:${ws}${re_all_methods}$nl\} \\*$nl$gdb_prompt $" {
275             pass "ptype pBe"
276         }
277     }
278
279     # class C
280
281     set re_class        "class C : public virtual V \{(${ws}private:|)"
282     set re_vbptr        "V \\*(_vb.1V|_vb.V);"
283     set re_fields       "int c;"
284     set re_synth_gcc_2  "C & operator=\\(C const ?&\\);${ws}C\\(int, C const ?&\\);${ws}C\\(int\\);"
285     set re_synth_gcc_3  "C & operator=\\(C const ?&\\);${ws}C\\(C const ?&\\);${ws}C\\(\\);"
286     set re_all_methods  "(|$re_synth_gcc_2|$re_synth_gcc_3)"
287
288     gdb_test_multiple "ptype C" "ptype C" {
289         -re "type = ${re_class}${ws}(${re_vbptr}${ws}|)public:${ws}${re_fields}${ws}(public:${ws}|)${re_all_methods}$nl\}$nl$gdb_prompt $" {
290             pass "ptype C"
291         }
292     }
293
294     # An instance of C
295
296     gdb_test_multiple "ptype c" "ptype c" {
297         -re "type = ${re_class}${ws}(${re_vbptr}${ws}|)public:${ws}${re_fields}${ws}(public:${ws}|)${re_all_methods}$nl\}$nl$gdb_prompt $" {
298             pass "ptype c"
299         }
300     }
301
302     # class AD
303
304     set re_class        "((struct|class) AD \{${ws}public:|struct AD \{)"
305     set re_methods      "virtual int vg\\((void|)\\);"
306     set re_synth_gcc_23 "AD & operator=\\(AD const ?&\\);${ws}AD\\(AD const ?&\\);${ws}AD\\((void|)\\);"
307     set re_all_methods  "($re_methods|$re_methods${ws}$re_synth_gcc_23|$re_synth_gcc_23${ws}$re_methods)"
308
309     gdb_test_multiple "ptype AD" "ptype AD" {
310         -re "type = $re_class${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
311             pass "ptype AD"
312         }
313     }
314
315     # An instance of AD *
316     # TODO: this should be named pADd, not pAd.
317
318     gdb_test_multiple "ptype pAd" "ptype pAd" {
319         -re "type = $re_class${ws}$re_all_methods$nl\} \\*$nl$gdb_prompt $" {
320             pass "ptype pAd"
321         }
322     }
323
324     # An instance of a AD *
325
326     gdb_test_multiple "ptype pADe" "ptype pADe" {
327         -re "type = $re_class${ws}$re_all_methods$nl\} \\*$nl$gdb_prompt $" {
328             pass "ptype pADe"
329         }
330     }
331
332     # class D
333
334     set re_class        "class D : public AD, public virtual V \{(${ws}private:|)"
335     set re_vbptr        "V \\*(_vb.1V|_vb.V);"
336     set re_fields       "int d;"
337     set re_methods      "static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);"
338     set re_synth_gcc_2  "D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);"
339     set re_synth_gcc_3  "D & operator=\\(D const ?&\\);${ws}D\\(D const ?&\\);${ws}D\\(\\);"
340     set re_all_methods  "($re_methods|$re_synth_gcc_2${ws}$re_methods|$re_synth_gcc_3${ws}$re_methods|$re_methods${ws}$re_synth_gcc_3)"
341
342     gdb_test_multiple "ptype D" "ptype D" {
343         -re "type = ${re_class}${ws}(${re_vbptr}${ws}|)public:${ws}${re_fields}${ws}${re_all_methods}$nl\}$nl$gdb_prompt $" {
344             pass "ptype D"
345         }
346     }
347
348     # An instance of D
349
350     gdb_test_multiple "ptype d" "ptype d" {
351         -re "type = ${re_class}${ws}(${re_vbptr}${ws}|)public:${ws}${re_fields}${ws}${re_all_methods}$nl\}$nl$gdb_prompt $" {
352             pass "ptype d"
353         }
354     }
355
356     # An instance of D
357
358     gdb_test_multiple "ptype dd" "ptype dd" {
359         -re "type = ${re_class}${ws}(${re_vbptr}${ws}|)public:${ws}${re_fields}${ws}${re_all_methods}$nl\}$nl$gdb_prompt $" {
360             pass "ptype dd"
361         }
362     }
363
364     # An instance of D *
365
366     gdb_test_multiple "ptype ppd" "ptype ppd" {
367         -re "type = ${re_class}${ws}(${re_vbptr}${ws}|)public:${ws}${re_fields}${ws}${re_all_methods}$nl\} \\*$nl$gdb_prompt $" {
368             pass "ptype ppd"
369         }
370     }
371
372     # An instance of D *
373
374     gdb_test_multiple "ptype pDd" "ptype pDd" {
375         -re "type = ${re_class}${ws}(${re_vbptr}${ws}|)public:${ws}${re_fields}${ws}${re_all_methods}$nl\} \\*$nl$gdb_prompt $" {
376             pass "ptype pDd"
377         }
378     }
379
380     # An instance of D *
381
382     gdb_test_multiple "ptype pDe" "ptype pDe" {
383         -re "type = ${re_class}${ws}(${re_vbptr}${ws}|)public:${ws}${re_fields}${ws}${re_all_methods}$nl\} \\*$nl$gdb_prompt $" {
384             pass "ptype pDe"
385         }
386     }
387
388     # class E
389     # TODO: E does not show a vbptr for V.  That seems strange.
390
391     set re_class        "class E : public B, public virtual V, public D, public C \{(${ws}private:|)"
392     set re_fields       "int e;"
393     set re_methods      "virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);"
394     set re_synth_gcc_2  "E & operator=\\(E const ?&\\);${ws}E\\(int, E const ?&\\);${ws}E\\(int\\);"
395     set re_synth_gcc_3  "E & operator=\\(E const ?&\\);${ws}E\\(E const ?&\\);${ws}E\\(\\);"
396     set re_all_methods  "($re_methods|$re_synth_gcc_2${ws}$re_methods|$re_synth_gcc_3${ws}$re_methods|$re_methods${ws}$re_synth_gcc_3)"
397
398     gdb_test_multiple "ptype E" "ptype E" {
399         -re "type = ${re_class}${ws}public:${ws}${re_fields}${ws}${re_all_methods}$nl\}$nl$gdb_prompt $" {
400             pass "ptype E"
401         }
402     }
403
404     # An instance of E
405
406     gdb_test_multiple "ptype e" "ptype e" {
407         -re "type = ${re_class}${ws}public:${ws}${re_fields}${ws}${re_all_methods}$nl\}$nl$gdb_prompt $" {
408             pass "ptype e"
409         }
410     }
411
412     # An instance of E *
413
414     gdb_test_multiple "ptype pEe" "ptype pEe" {
415         -re "type = ${re_class}${ws}public:${ws}${re_fields}${ws}${re_all_methods}$nl\} \\*$nl$gdb_prompt $" {
416             pass "ptype pEe"
417         }
418     }
419 }
420
421 # Call virtual functions.
422
423 proc test_virtual_calls {} {
424     global gdb_prompt
425     global nl
426
427     if [target_info exists gdb,cannot_call_functions] {
428         setup_xfail "*-*-*" 2416
429         fail "This target can not call functions"
430         return 0
431     }
432
433     gdb_test "print pAe->f()"   "\\$\[0-9\]+ = 20"
434     gdb_test "print pAa->f()"   "\\$\[0-9\]+ = 1"
435     gdb_test "print pDe->vg()"  "\\$\[0-9\]+ = 202"
436     gdb_test "print pADe->vg()" "\\$\[0-9\]+ = 202"
437     gdb_test "print pDd->vg()"  "\\$\[0-9\]+ = 101"
438     gdb_test "print pEe->vvb()" "\\$\[0-9\]+ = 411"
439     gdb_test "print pVB->vvb()" "\\$\[0-9\]+ = 407"
440     gdb_test "print pBe->vvb()" "\\$\[0-9\]+ = 411"
441     gdb_test "print pDe->vvb()" "\\$\[0-9\]+ = 411"
442     gdb_test "print pEe->vd()"  "\\$\[0-9\]+ = 282"
443     gdb_test "print pEe->fvb()" "\\$\[0-9\]+ = 311"
444
445     # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
446     # gdb=HEAD%2002-02-16, gcc=2.95.3, goption=-gdwarf-2.
447     #
448     # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
449     # gdb=HEAD%2002-02-16, gcc=2.95.3, goption=-gstabs+.
450     #
451     # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
452     # gdb=HEAD%2002-02-16, gcc=3.0.3, goption=-gdwarf-2.
453     #
454     # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
455     # gdb=HEAD%2002-02-16, gcc=3.0.3, goption=-gstabs+.
456     #
457     # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
458     # gdb=HEAD%2002-02-16, gcc=3.0.4-20020215, goption=-gdwarf-2.
459     #
460     # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
461     # gdb=HEAD%2002-02-16, gcc=3.0.4-20020215, goption=-gstabs+.
462     #
463     # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
464     # gdb=HEAD%2002-02-16, gcc=gcc-3_0-branch%2002-02-16, goption=-gdwarf-2.
465     #
466     # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
467     # gdb=HEAD%2002-02-16, gcc=gcc-3_0-branch%2002-02-16, goption=-gstabs+.
468     #
469     # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
470     # gdb=HEAD%2002-02-16, gcc=HEAD%2002-02-16, goption=-gdwarf-2.
471     #
472     # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
473     # gdb=HEAD%2002-02-16, gcc=HEAD%2002-02-16, goption=-gstabs+.
474     #
475     # -- chastain 2002-02-20
476
477     # more recent results:
478     # wrong value "202"
479     #   gcc 2.95.3 -gdwarf-2
480     #   gcc 2.95.3 -gstabs+
481     # attempt to take addres of value not located in memory
482     #   gcc 3.3.2 -gdwarf-2
483     #   gcc 3.3.2 -gstabs+
484     #
485     # -- chastain 2003-12-31
486
487     gdb_test_multiple "print pEe->D::vg()" "print pEe->D::vg()" {
488         -re "\\$\[0-9]+ = 102$nl$gdb_prompt $" {
489             pass "print pEe->D::vg()"
490         }
491         -re "Attempt to take address of value not located in memory.$nl$gdb_prompt $" {
492             kfail "gdb/1064" "print pEe->D::vg()"
493         }
494     }
495 }
496
497 proc do_tests {} {
498     global prms_id
499     global bug_id
500     global srcdir subdir binfile
501     global gdb_prompt
502
503     set prms_id 0
504     set bug_id 0
505
506     gdb_exit
507     gdb_start
508     gdb_reinitialize_dir $srcdir/$subdir
509     gdb_load $binfile
510
511     gdb_test "set language c++" "" ""
512     gdb_test "set width 0" "" ""
513
514     runto_main
515     test_ptype_of_classes
516
517     gdb_breakpoint test_calls
518     gdb_test "continue" ".*Breakpoint .* test_calls.*" ""
519     test_virtual_calls
520 }
521
522 do_tests