]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.cp/member-ptr.exp
* gdb.arch/altivec-abi.exp: Replace gdb_suppress_entire_file with
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.cp / member-ptr.exp
1 # Copyright 1998, 1999, 2003, 2004 Free Software Foundation, Inc.
2
3 # This file is part of the gdb testsuite
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 # Tests for pointer-to-member support
20 # Written by Satish Pai <pai@apollo.hp.com> 1997-08-19
21 # Rewritten by Michael Chastain <mec.gnu@mindspring.com> 2004-01-11
22
23 # TODO: copyright notice for member-ptr.cc
24
25 set vhn "\\$\[0-9\]+"
26
27 if $tracelevel then {
28 strace $tracelevel
29 }
30
31 if { [skip_cplus_tests] } { continue }
32
33 set prms_id 0
34 set bug_id 0
35
36 set testfile "member-ptr"
37 set srcfile ${testfile}.cc
38 set binfile ${objdir}/${subdir}/${testfile}
39
40 if [get_compiler_info ${binfile} "c++"] {
41 return -1
42 }
43
44 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
45 untested member-ptr.exp
46 return -1
47 }
48
49 gdb_exit
50 gdb_start
51 gdb_reinitialize_dir $srcdir/$subdir
52 gdb_load ${binfile}
53
54 if ![runto_main] then {
55 perror "couldn't run to breakpoint"
56 continue
57 }
58
59 gdb_breakpoint [gdb_get_line_number "pmi = NULL"]
60 gdb_continue_to_breakpoint "continue to pmi = NULL"
61
62 # gcc is not ready for production
63 # -- chastain 2004-01-12
64
65 if { [test_compiler_info "gcc-*"] } {
66 continue
67 }
68
69 # ======================
70 # pointer to member data
71 # ======================
72
73 # ptype on pointer to data member
74
75 set name "ptype pmi (A::j)"
76 gdb_test_multiple "ptype pmi" $name {
77 -re "type = int *\\( ?A::\\*\\)\r\n$gdb_prompt $" {
78 pass $name
79 }
80 -re "type = int *A::\r\n$gdb_prompt $" {
81 # gcc HEAD 2004-01-10 -gdwarf-2
82 # gcc HEAD 2004-01-10 -gstabs+
83 kfail "gdb/NNNN" $name
84 }
85 }
86
87 # print pointer to data member
88
89 set name "print pmi (A::j) "
90 gdb_test_multiple "print pmi" $name {
91 -re "$vhn = &A::j\r\n$gdb_prompt $" {
92 pass $name
93 }
94 -re "$vhn = \\(int ?\\( ?A::\\*\\)\\) &A::j\r\n$gdb_prompt $" {
95 pass $name
96 }
97 -re "$vhn = \\(int ?\\( ?A::\\*\\)\\) ?&A::j ?\\+ ?1 bytes\r\n$gdb_prompt $" {
98 # gcc 2.95.3 -gdwarf-2
99 kfail "gdb/NNNN" $name
100 }
101 -re "$vhn = &A::j ?\\+ ?1 bytes\r\n$gdb_prompt $" {
102 # gcc 2.95.3 -gstabs+
103 kfail "gdb/NNNN" $name
104 }
105 -re "$vhn = not implemented: member type in c_val_print\r\n$gdb_prompt $" {
106 # gcc HEAD 2004-01-11 05:33:21 -gdwarf-2
107 # gcc HEAD 2004-01-11 05:33:21 -gstabs+
108 kfail "gdb/NNNN" $name
109 }
110 -re "$vhn = \\(int ?\\( A::\\*\\)\\) 536870920\r\n$gdb_prompt $" {
111 # the value is 0x20000008 hex. 0x20000000 is an internal flag.
112 # Use '|' to add in more values as needed.
113 # hpacc A.03.45
114 kfail "gdb/NNNN" $name
115 }
116 }
117
118 # print dereferenced pointer to data member
119
120 set name "print a.*pmi (A::j)"
121 gdb_test_multiple "print a.*pmi" $name {
122 -re "$vhn = 121\r\n$gdb_prompt $" {
123 pass $name
124 }
125 -re "$vhn = 855638016\r\n$gdb_prompt $" {
126 # gcc 2.95.3 -gdwarf-2
127 # gcc 2.95.3 -gstabs+
128 kfail "gdb/NNNN" $name
129 }
130 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
131 # gcc HEAD 2004-01-10 -gdwarf-2
132 # gcc HEAD 2004-01-10 -gstabs+
133 kfail "gdb/NNNN" $name
134 }
135 }
136
137 # print dereferenced pointer to data member
138 # this time, dereferenced through a pointer
139
140 set name "print a_p->*pmi (A::j)"
141 gdb_test_multiple "print a_p->*pmi" $name {
142 -re "$vhn = 121\r\n$gdb_prompt $" {
143 pass $name
144 }
145 -re "$vhn = 855638016\r\n$gdb_prompt $" {
146 # gcc 2.95.3 -gdwarf-2
147 # gcc 2.95.3 -gstabs+
148 kfail "gdb/NNNN" $name
149 }
150 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
151 # gcc HEAD 2004-01-10 -gdwarf-2
152 # gcc HEAD 2004-01-10 -gstabs+
153 kfail "gdb/NNNN" $name
154 }
155 }
156
157 # set the pointer to a different data member
158
159 set name "set var pmi = &A::jj"
160 gdb_test_multiple "set var pmi = &A::jj" $name {
161 -re "Invalid cast.\r\n$gdb_prompt $" {
162 # gcc HEAD 2004-01-10 -gdwarf-2
163 # gcc HEAD 2004-01-10 -gstabs+
164 kfail "gdb/NNNN" $name
165 }
166 -re "set var pmi = &A::jj\r\n$gdb_prompt $" {
167 # I have to match the echo'ed input explicitly here.
168 # If I leave it out, the pattern becomes too general
169 # and matches anything that ends in "$gdb_prompt $".
170 pass $name
171 }
172 }
173
174 # print the pointer again
175
176 set name "print pmi (A::jj)"
177 gdb_test_multiple "print pmi" $name {
178 -re "$vhn = &A::jj\r\n$gdb_prompt $" {
179 pass $name
180 }
181 -re "$vhn = \\(int ?\\( ?A::\\*\\)\\) &A::jj\r\n$gdb_prompt $" {
182 pass $name
183 }
184 -re "$vhn = not implemented: member type in c_val_print\r\n$gdb_prompt $" {
185 # gcc HEAD 2004-01-11 05:33:21 -gdwarf-2
186 # gcc HEAD 2004-01-11 05:33:21 -gstabs+
187 kfail "gdb/NNNN" $name
188 }
189 -re "$vhn = \\(int ?\\( A::\\*\\)\\) 536870924\r\n$gdb_prompt $" {
190 # the value is 0x20000008 hex. 0x20000000 is an internal flag.
191 # Use '|' to add in more values as needed.
192 # hpacc A.03.45
193 kfail "gdb/NNNN" $name
194 }
195 }
196
197 # print dereferenced pointer to data member again
198
199 set name "print a.*pmi (A::jj)"
200 gdb_test_multiple "print a.*pmi" $name {
201 -re "$vhn = 1331\r\n$gdb_prompt $" {
202 pass $name
203 }
204 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
205 # gcc HEAD 2004-01-10 -gdwarf-2
206 # gcc HEAD 2004-01-10 -gstabs+
207 kfail "gdb/NNNN" $name
208 }
209 }
210
211 # set the pointer to data member back to A::j
212
213 set name "set var pmi = &A::j"
214 gdb_test_multiple "set var pmi = &A::j" $name {
215 -re "Invalid cast.\r\n$gdb_prompt $" {
216 # gcc HEAD 2004-01-10 -gdwarf-2
217 # gcc HEAD 2004-01-10 -gstabs+
218 kfail "gdb/NNNN" $name
219 }
220 -re "set var pmi = &A::j\r\n$gdb_prompt $" {
221 # I have to match the echo'ed input explicitly here.
222 # If I leave it out, the pattern becomes too general
223 # and matches anything that ends in "$gdb_prompt $".
224 pass $name
225 }
226 }
227
228 # print dereferenced pointer to data member yet again (extra check, why not)
229
230 set name "print a.*pmi (A::j) (again)"
231 gdb_test_multiple "print a.*pmi" $name {
232 -re "$vhn = 121\r\n$gdb_prompt $" {
233 pass $name
234 }
235 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
236 # gcc HEAD 2004-01-10 -gdwarf-2
237 # gcc HEAD 2004-01-10 -gstabs+
238 kfail "gdb/NNNN" $name
239 }
240 }
241
242 # Set the data member pointed to.
243
244 set name "print a.*pmi = 33"
245 gdb_test_multiple "print a.*pmi = 33" $name {
246 -re "$vhn = 33\r\n$gdb_prompt $" {
247 pass $name
248 }
249 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
250 # gcc HEAD 2004-01-10 -gdwarf-2
251 # gcc HEAD 2004-01-10 -gstabs+
252 kfail "gdb/NNNN" $name
253 }
254 }
255
256 # Now check that the data really was changed
257
258 set name "print a.*pmi (A::j) (33)"
259 gdb_test_multiple "print a.*pmi" $name {
260 -re "$vhn = 33\r\n$gdb_prompt $" {
261 pass $name
262 }
263 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
264 # gcc HEAD 2004-01-10 -gdwarf-2
265 # gcc HEAD 2004-01-10 -gstabs+
266 kfail "gdb/NNNN" $name
267 }
268 }
269
270 # Double-check by printing a.
271
272 set name "print a (j = 33)"
273 gdb_test_multiple "print a" $name {
274 -re "$vhn = \{c = 120 'x', j = 33, jj = 1331, (static|static int) s = 10, (_vptr.A|_vptr\\$) = ($hex|$hex <A virtual table>)\}\r\n$gdb_prompt $" {
275 pass $name
276 }
277 -re "$vhn = \{c = 120 'x', j = 33, jj = 1331, (static|static int) s = 10, Virtual table at $hex\}\r\n$gdb_prompt $" {
278 pass $name
279 }
280 -re "$vhn = \{(_vptr.A|_vptr\\$) = $hex, c = 120 'x', j = 33, jj = 1331, (static|static int) s = 10\}\r\n$gdb_prompt $" {
281 pass $name
282 }
283 -re "$vhn = \{(_vptr.A|_vptr\\$) = $hex, c = 120 'x', j = 121, jj = 1331, (static|static int) s = 10\}\r\n$gdb_prompt $" {
284 # gcc HEAD 2004-01-10 -gdwarf-2
285 # gcc HEAD 2004-01-10 -gstabs+
286 kfail "gdb/NNNN" $name
287 }
288 }
289
290 # Set the data member pointed to, using ->*
291
292 set name "print a_p->*pmi = 44"
293 gdb_test_multiple "print a_p->*pmi = 44" $name {
294 -re "$vhn = 44\r\n$gdb_prompt $" {
295 pass $name
296 }
297 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
298 # gcc HEAD 2004-01-10 -gdwarf-2
299 # gcc HEAD 2004-01-10 -gstabs+
300 kfail "gdb/NNNN" $name
301 }
302 }
303
304 # Check that the data really was changed
305
306 set name "print a_p->*pmi (44)"
307 gdb_test_multiple "print a_p->*pmi" $name {
308 -re "$vhn = 44\r\n$gdb_prompt $" {
309 pass $name
310 }
311 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
312 # gcc HEAD 2004-01-10 -gdwarf-2
313 # gcc HEAD 2004-01-10 -gstabs+
314 kfail "gdb/NNNN" $name
315 }
316 }
317
318 # Double-check by printing a.
319
320 set name "print a (j = 44)"
321 gdb_test_multiple "print a" $name {
322 -re "$vhn = \{c = 120 'x', j = 44, jj = 1331, (static|static int) s = 10, (_vptr.A|_vptr\\$) = ($hex|$hex <A virtual table>)\}\r\n$gdb_prompt $" {
323 pass $name
324 }
325 -re "$vhn = \{c = 120 'x', j = 44, jj = 1331, (static|static int) s = 10, Virtual table at $hex\}\r\n$gdb_prompt $" {
326 pass $name
327 }
328 -re "$vhn = \{(_vptr.A|_vptr\\$) = $hex, c = 120 'x', j = 44, jj = 1331, (static|static int) s = 10\}\r\n$gdb_prompt $" {
329 pass $name
330 }
331 -re "$vhn = \{(_vptr.A|_vptr\\$) = $hex, c = 120 'x', j = 121, jj = 1331, (static|static int) s = 10\}\r\n$gdb_prompt $" {
332 # gcc HEAD 2004-01-10 -gdwarf-2
333 # gcc HEAD 2004-01-10 -gstabs+
334 kfail "gdb/NNNN" $name
335 }
336 }
337
338 # ptype the dereferenced pointer to member.
339
340 set name "ptype a.*pmi"
341 gdb_test_multiple "ptype a.*pmi" $name {
342 -re "type = int\r\n$gdb_prompt" {
343 pass $name
344 }
345 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
346 # gcc HEAD 2004-01-10 -gdwarf-2
347 # gcc HEAD 2004-01-10 -gstabs+
348 kfail "gdb/NNNN" $name
349 }
350 }
351
352 # dereference the pointer to data member without any object
353 # this is not allowed: a pmi must be bound to an object to dereference
354
355 set name "print *pmi"
356 gdb_test_multiple "print *pmi" $name {
357 -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
358 pass $name
359 }
360 -re "Cannot access memory at address 0x4\r\n$gdb_prompt $" {
361 # gcc 2.95.3 -gstabs+
362 kfail "gdb/NNNN" $name
363 }
364 -re "Cannot access memory at address 0x8\r\n$gdb_prompt $" {
365 # gcc 3.3.2 -gdwarf-2
366 # gcc 3.3.2 -gstabs+
367 kfail "gdb/NNNN" $name
368 }
369 }
370
371 # dereference the pointer to data member without any object
372 # this is not allowed: a pmi must be bound to an object to dereference
373
374 set name "ptype *pmi"
375 gdb_test_multiple "ptype *pmi" $name {
376 -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
377 pass $name
378 }
379 -re "type = int A::\r\n$gdb_prompt $" {
380 # gcc 2.95.3 -gstabs+
381 # gcc HEAD 2004-01-10 -gdwarf-2
382 # gcc HEAD 2004-01-10 -gstabs+
383 kfail "gdb/NNNN" $name
384 }
385 }
386
387 # Check cast of pointer to member to integer.
388 # This is similar to "offset-of".
389 # such as "A a; print (size_t) &A.j - (size_t) &A".
390
391 set name "print (int) pmi"
392 gdb_test_multiple "print (int) pmi" $name {
393 -re "$vhn = (4|8)\r\n$gdb_prompt" {
394 pass $name
395 }
396 }
397
398 # Check "(int) pmi" explicitly for equality.
399
400 set name "print ((int) pmi) == ((char *) &a.j - (char *) &a)"
401 gdb_test_multiple "print ((int) pmi) == ((char *) &a.j - (char *) & a)" $name {
402 -re "$vhn = true\r\n$gdb_prompt" {
403 pass $name
404 }
405 }
406
407 # ==========================
408 # pointer to member function
409 # ==========================
410
411 # ptype a pointer to a method
412
413 set name "ptype pmf"
414 gdb_test_multiple "ptype pmf" $name {
415 -re "type = int \\( ?A::\\*\\)\\(int\\)\r\n$gdb_prompt $" {
416 pass $name
417 }
418 -re "type = int \\( ?A::\\*\\)\\(void\\)\r\n$gdb_prompt $" {
419 # hpacc A.03.45
420 kfail "gdb/NNNN" $name
421 }
422 -re "type = struct \{.*\}\r\n$gdb_prompt $" {
423 # gcc 2.95.3 -gdwarf-2
424 # gcc 2.95.3 -gstabs+
425 # gcc 3.2.2 -gdwarf-2
426 # gcc 3.2.2 -gstabs+
427 # gcc HEAD 2004-01-10 -gdwarf-2
428 # gcc HEAD 2004-01-10 -gstabs+
429 kfail "gdb/NNNN" $name
430 }
431 }
432
433 # print a pointer to a method
434
435 set name "print pmf"
436 gdb_test_multiple "print pmf" $name {
437 -re "$vhn = &A::bar\r\n$gdb_prompt $" {
438 pass $name
439 }
440 -re "$vhn = .*not supported with HP aCC.*\r\n$gdb_prompt $" {
441 # hpacc A.03.45
442 kfail "gdb/NNNN" $name
443 }
444 -re "$vhn = \{.*\}\r\n$gdb_prompt $" {
445 # gcc 2.95.3 -gdwarf-2
446 # gcc 2.95.3 -gstabs+
447 # gcc 3.2.2 -gdwarf-2
448 # gcc 3.2.2 -gstabs+
449 # gcc HEAD 2004-01-10 -gdwarf-2
450 # gcc HEAD 2004-01-10 -gstabs+
451 kfail "gdb/NNNN" $name
452 }
453 }
454
455 # ptype a pointer to a pointer to a method
456
457 set name "ptype pmf_p"
458 gdb_test_multiple "ptype pmf_p" $name {
459 -re "type = int \\( ?A::\\*\\*\\)\\(int\\)\r\n$gdb_prompt $" {
460 pass $name
461 }
462 -re "type = int \\( ?A::\\*\\*\\)\\(void\\)\r\n$gdb_prompt $" {
463 # hpacc A.03.45
464 kfail "gdb/NNNN" $name
465 }
466 -re "type = struct \{.*\} \\*\r\n$gdb_prompt $" {
467 # gcc 2.95.3 -gdwarf-2
468 # gcc 2.95.3 -gstabs+
469 # gcc 3.2.2 -gdwarf-2
470 # gcc 3.2.2 -gstabs+
471 # gcc HEAD 2004-01-10 -gdwarf-2
472 # gcc HEAD 2004-01-10 -gstabs+
473 kfail "gdb/NNNN" $name
474 }
475 }
476
477 # print a pointer to a pointer to a method
478
479 set name "print pmf_p"
480 gdb_test_multiple "print pmf_p" $name {
481 -re "$vhn = \\(int \\( ?A::\\*\\*\\)\\)\\(int\\)\\) $hex\r\n$gdb_prompt $" {
482 pass $name
483 }
484 -re "$vhn = \\(PMF \\*\\) $hex\r\n$gdb_prompt $" {
485 pass "gdb/NNNN"
486 }
487 -re "$vhn = \\(int \\( ?A::\\*\\*\\)\\(void\\)\\) $hex\r\n$gdb_prompt $" {
488 # hpacc A.03.45
489 kfail "gdb/NNNN" $name
490 }
491 -re "$vhn = \\(struct \{.*\} \\*\\) $hex\r\n$gdb_prompt $" {
492 # gcc 2.95.3 -gdwarf-2
493 kfail "gdb/NNNN" $name
494 }
495 }
496
497 # print dereferenced pointer to method
498
499 set name "print a.*pmf"
500 gdb_test_multiple "print a.*pmf" $name {
501 -re "$vhn = \\(int \\(\\*\\)\\(int\\)\\) $hex <A::bar\\(int\\)>\r\n$gdb_prompt$ " {
502 pass $name
503 }
504 -re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
505 # hpacc A.03.45
506 kfail "gdb/NNNN" $name
507 }
508 -re "Value can't be converted to integer.\r\n$gdb_prompt $" {
509 # gcc 2.95.3 -gdwarf-2
510 # gcc 2.95.3 -gstabs+
511 # gcc 3.2.2 -gdwarf-2
512 # gcc 3.2.2 -gstabs+
513 # gcc HEAD 2004-01-10 -gdwarf-2
514 # gcc HEAD 2004-01-10 -gstabs+
515 kfail "gdb/NNNN" $name
516 }
517 }
518
519 # print dereferenced pointer to method, using ->*
520
521 set name "print a_p->*pmf"
522 gdb_test_multiple "print a_p->*pmf" $name {
523 -re "$vhn = \\(int \\(\\*\\)\\(int\\)\\) $hex <A::bar\\(int\\)>\r\n$gdb_prompt$ " {
524 pass $name
525 }
526 -re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
527 # hpacc A.03.45
528 kfail "gdb/NNNN" $name
529 }
530 -re "Value can't be converted to integer.\r\n$gdb_prompt $" {
531 # gcc 2.95.3 -gdwarf-2
532 # gcc 2.95.3 -gstabs+
533 # gcc 3.2.2 -gdwarf-2
534 # gcc 3.2.2 -gstabs+
535 # gcc HEAD 2004-01-10 -gdwarf-2
536 # gcc HEAD 2004-01-10 -gstabs+
537 kfail "gdb/NNNN" $name
538 }
539 }
540
541 # set the pointer to data member
542
543 set name "set var pmf = &A::foo"
544 gdb_test_multiple "set var pmf = &A::foo" $name {
545 -re "set var pmf = &A::foo\r\n$gdb_prompt $" {
546 # I have to match the echo'ed input explicitly here.
547 # If I leave it out, the pattern becomes too general
548 # and matches anything that ends in "$gdb_prompt $".
549 pass $name
550 }
551 -re "Invalid cast.\r\n$gdb_prompt $" {
552 # gcc 2.95.3 -gdwarf-2
553 # gcc 2.95.3 -gstabs+
554 # gcc 3.2.2 -gdwarf-2
555 # gcc 3.2.2 -gstabs+
556 # gcc HEAD 2004-01-10 -gdwarf-2
557 # gcc HEAD 2004-01-10 -gstabs+
558 kfail "gdb/NNNN" $name
559 }
560 -re "Assignment to pointers to methods not implemented with HP aCC\r\n$gdb_prompt $" {
561 kfail "gdb/NNNN" $name
562 }
563 }
564
565 # dereference the pointer to data member without any object
566 # this is not allowed: a pmf must be bound to an object to dereference
567
568 set name "print *pmf"
569 gdb_test_multiple "print *pmf" $name {
570 -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
571 pass $name
572 }
573 -re "Structure has no component named operator\\*.\r\n$gdb_prompt $" {
574 # gcc 2.95.3 -gdwarf-2
575 # gcc 2.95.3 -gstabs+
576 # gcc 3.3.2 -gdwarf-2
577 # gcc 3.3.2 -gstabs+
578 # gcc HEAD 2004-01-10 -gdwarf-2
579 # gcc HEAD 2004-01-10 -gstabs+
580 kfail "gdb/NNNN" $name
581 }
582 }
583
584 # dereference the pointer to data member without any object
585 # this is not allowed: a pmf must be bound to an object to dereference
586
587 set name "ptype *pmf"
588 gdb_test_multiple "ptype *pmf" $name {
589 -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
590 pass $name
591 }
592 -re "Structure has no component named operator\\*.\r\n$gdb_prompt $" {
593 # gcc 2.95.3 -gdwarf-2
594 # gcc 2.95.3 -gstabs+
595 # gcc 3.3.2 -gdwarf-2
596 # gcc 3.3.2 -gstabs+
597 # gcc HEAD 2004-01-10 -gdwarf-2
598 # gcc HEAD 2004-01-10 -gstabs+
599 kfail "gdb/NNNN" $name
600 }
601 }
602
603 # Call a function through a pmf.
604
605 set name "print (a.*pmf)(3)"
606 gdb_test_multiple "print (a.*pmf)(3)" $name {
607 -re "$vhn = 50\r\n$gdb_prompt $" {
608 pass $name
609 }
610 -re "Not implemented: function invocation through pointer to method with HP aCC\r\n$gdb_prompt $" {
611 # hpacc A.03.45
612 kfail "gdb/NNNN" $name
613 }
614 -re "Value can't be converted to integer.\r\n$gdb_prompt $" {
615 # gcc 2.95.3 -gdwarf-2
616 # gcc 2.95.3 -gstabs+
617 # gcc 3.3.2 -gdwarf-2
618 # gcc 3.3.2 -gstabs+
619 # gcc HEAD 2004-01-10 -gdwarf-2
620 # gcc HEAD 2004-01-10 -gstabs+
621 kfail "gdb/NNNN" $name
622 }
623 }