1 # Copyright 1998, 1999, 2003, 2004, 2006, 2007, 2008, 2009, 2010
2 # Free Software Foundation, Inc.
4 # This file is part of the gdb testsuite
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
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
29 if { [skip_cplus_tests] } { continue }
32 set testfile "member-ptr"
33 set srcfile ${testfile}.cc
34 set binfile ${objdir}/${subdir}/${testfile}
36 if [get_compiler_info ${binfile} "c++"] {
40 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
41 untested member-ptr.exp
47 gdb_reinitialize_dir $srcdir/$subdir
50 if ![runto_main] then {
51 perror "couldn't run to breakpoint"
55 gdb_breakpoint [gdb_get_line_number "Breakpoint 1 here"]
56 gdb_continue_to_breakpoint "continue to pmi = NULL"
58 # ======================
59 # pointer to member data
60 # ======================
62 # ptype on pointer to data member
64 set name "ptype pmi (A::j)"
65 gdb_test_multiple "ptype pmi" $name {
66 -re "type = int A::\\*\r\n$gdb_prompt $" {
71 # print pointer to data member
73 set name "print pmi (A::j) "
74 gdb_test_multiple "print pmi" $name {
75 -re "$vhn = &A::j\r\n$gdb_prompt $" {
78 -re "$vhn = \\(int ?\\( ?A::\\*\\)\\) &A::j\r\n$gdb_prompt $" {
81 -re "$vhn = \\(int ?\\( ?A::\\*\\)\\) ?&A::j ?\\+ ?1 bytes\r\n$gdb_prompt $" {
82 # gcc 2.95.3 -gdwarf-2
83 kfail "gdb/NNNN" $name
85 -re "$vhn = &A::j ?\\+ ?1 bytes\r\n$gdb_prompt $" {
87 kfail "gdb/NNNN" $name
89 -re "$vhn = not implemented: member type in c_val_print\r\n$gdb_prompt $" {
90 # gcc HEAD 2004-01-11 05:33:21 -gdwarf-2
91 # gcc HEAD 2004-01-11 05:33:21 -gstabs+
92 kfail "gdb/NNNN" $name
94 -re "$vhn = \\(int ?\\( A::\\*\\)\\) 536870920\r\n$gdb_prompt $" {
95 # the value is 0x20000008 hex. 0x20000000 is an internal flag.
96 # Use '|' to add in more values as needed.
98 kfail "gdb/NNNN" $name
102 # print dereferenced pointer to data member
104 set name "print a.*pmi (A::j)"
105 gdb_test_multiple "print a.*pmi" $name {
106 -re "$vhn = 121\r\n$gdb_prompt $" {
109 -re "$vhn = 855638016\r\n$gdb_prompt $" {
110 # gcc 2.95.3 -gdwarf-2
111 # gcc 2.95.3 -gstabs+
112 kfail "gdb/NNNN" $name
114 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
115 # gcc HEAD 2004-01-10 -gdwarf-2
116 # gcc HEAD 2004-01-10 -gstabs+
117 kfail "gdb/NNNN" $name
121 # print dereferenced pointer to data member
122 # this time, dereferenced through a pointer
124 set name "print a_p->*pmi (A::j)"
125 gdb_test_multiple "print a_p->*pmi" $name {
126 -re "$vhn = 121\r\n$gdb_prompt $" {
129 -re "$vhn = 855638016\r\n$gdb_prompt $" {
130 # gcc 2.95.3 -gdwarf-2
131 # gcc 2.95.3 -gstabs+
132 kfail "gdb/NNNN" $name
134 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
135 # gcc HEAD 2004-01-10 -gdwarf-2
136 # gcc HEAD 2004-01-10 -gstabs+
137 kfail "gdb/NNNN" $name
141 # set the pointer to a different data member
143 set name "set var pmi = &A::jj"
144 gdb_test_multiple "set var pmi = &A::jj" $name {
145 -re "Invalid cast.\r\n$gdb_prompt $" {
146 # gcc HEAD 2004-01-10 -gdwarf-2
147 # gcc HEAD 2004-01-10 -gstabs+
148 kfail "gdb/NNNN" $name
150 -re "set var pmi = &A::jj\r\n$gdb_prompt $" {
151 # I have to match the echo'ed input explicitly here.
152 # If I leave it out, the pattern becomes too general
153 # and matches anything that ends in "$gdb_prompt $".
158 # print the pointer again
160 set name "print pmi (A::jj)"
161 gdb_test_multiple "print pmi" $name {
162 -re "$vhn = &A::jj\r\n$gdb_prompt $" {
165 -re "$vhn = \\(int ?\\( ?A::\\*\\)\\) &A::jj\r\n$gdb_prompt $" {
168 -re "$vhn = not implemented: member type in c_val_print\r\n$gdb_prompt $" {
169 # gcc HEAD 2004-01-11 05:33:21 -gdwarf-2
170 # gcc HEAD 2004-01-11 05:33:21 -gstabs+
171 kfail "gdb/NNNN" $name
173 -re "$vhn = \\(int ?\\( A::\\*\\)\\) 536870924\r\n$gdb_prompt $" {
174 # the value is 0x20000008 hex. 0x20000000 is an internal flag.
175 # Use '|' to add in more values as needed.
177 kfail "gdb/NNNN" $name
181 # print dereferenced pointer to data member again
183 set name "print a.*pmi (A::jj)"
184 gdb_test_multiple "print a.*pmi" $name {
185 -re "$vhn = 1331\r\n$gdb_prompt $" {
188 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
189 # gcc HEAD 2004-01-10 -gdwarf-2
190 # gcc HEAD 2004-01-10 -gstabs+
191 kfail "gdb/NNNN" $name
195 # set the pointer to data member back to A::j
197 set name "set var pmi = &A::j"
198 gdb_test_multiple "set var pmi = &A::j" $name {
199 -re "Invalid cast.\r\n$gdb_prompt $" {
200 # gcc HEAD 2004-01-10 -gdwarf-2
201 # gcc HEAD 2004-01-10 -gstabs+
202 kfail "gdb/NNNN" $name
204 -re "set var pmi = &A::j\r\n$gdb_prompt $" {
205 # I have to match the echo'ed input explicitly here.
206 # If I leave it out, the pattern becomes too general
207 # and matches anything that ends in "$gdb_prompt $".
212 # print dereferenced pointer to data member yet again (extra check, why not)
214 set name "print a.*pmi (A::j) (again)"
215 gdb_test_multiple "print a.*pmi" $name {
216 -re "$vhn = 121\r\n$gdb_prompt $" {
219 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
220 # gcc HEAD 2004-01-10 -gdwarf-2
221 # gcc HEAD 2004-01-10 -gstabs+
222 kfail "gdb/NNNN" $name
226 # Set the data member pointed to.
228 set name "print a.*pmi = 33"
229 gdb_test_multiple "print a.*pmi = 33" $name {
230 -re "$vhn = 33\r\n$gdb_prompt $" {
233 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
234 # gcc HEAD 2004-01-10 -gdwarf-2
235 # gcc HEAD 2004-01-10 -gstabs+
236 kfail "gdb/NNNN" $name
240 # Now check that the data really was changed
242 set name "print a.*pmi (A::j) (33)"
243 gdb_test_multiple "print a.*pmi" $name {
244 -re "$vhn = 33\r\n$gdb_prompt $" {
247 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
248 # gcc HEAD 2004-01-10 -gdwarf-2
249 # gcc HEAD 2004-01-10 -gstabs+
250 kfail "gdb/NNNN" $name
254 # Double-check by printing a.
256 set name "print a (j = 33)"
257 gdb_test_multiple "print a" $name {
258 -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 $" {
261 -re "$vhn = \{c = 120 'x', j = 33, jj = 1331, (static|static int) s = 10, Virtual table at $hex\}\r\n$gdb_prompt $" {
264 -re "$vhn = \{(_vptr.A|_vptr\\$) = $hex, c = 120 'x', j = 33, jj = 1331, (static|static int) s = 10\}\r\n$gdb_prompt $" {
267 -re "$vhn = \{(_vptr.A|_vptr\\$) = $hex, c = 120 'x', j = 121, jj = 1331, (static|static int) s = 10\}\r\n$gdb_prompt $" {
268 # gcc HEAD 2004-01-10 -gdwarf-2
269 # gcc HEAD 2004-01-10 -gstabs+
270 kfail "gdb/NNNN" $name
274 # Set the data member pointed to, using ->*
276 set name "print a_p->*pmi = 44"
277 gdb_test_multiple "print a_p->*pmi = 44" $name {
278 -re "$vhn = 44\r\n$gdb_prompt $" {
281 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
282 # gcc HEAD 2004-01-10 -gdwarf-2
283 # gcc HEAD 2004-01-10 -gstabs+
284 kfail "gdb/NNNN" $name
288 # Check that the data really was changed
290 set name "print a_p->*pmi (44)"
291 gdb_test_multiple "print a_p->*pmi" $name {
292 -re "$vhn = 44\r\n$gdb_prompt $" {
295 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
296 # gcc HEAD 2004-01-10 -gdwarf-2
297 # gcc HEAD 2004-01-10 -gstabs+
298 kfail "gdb/NNNN" $name
302 # Double-check by printing a.
304 set name "print a (j = 44)"
305 gdb_test_multiple "print a" $name {
306 -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 $" {
309 -re "$vhn = \{c = 120 'x', j = 44, jj = 1331, (static|static int) s = 10, Virtual table at $hex\}\r\n$gdb_prompt $" {
312 -re "$vhn = \{(_vptr.A|_vptr\\$) = $hex, c = 120 'x', j = 44, jj = 1331, (static|static int) s = 10\}\r\n$gdb_prompt $" {
315 -re "$vhn = \{(_vptr.A|_vptr\\$) = $hex, c = 120 'x', j = 121, jj = 1331, (static|static int) s = 10\}\r\n$gdb_prompt $" {
316 # gcc HEAD 2004-01-10 -gdwarf-2
317 # gcc HEAD 2004-01-10 -gstabs+
318 kfail "gdb/NNNN" $name
322 # ptype the dereferenced pointer to member.
324 set name "ptype a.*pmi"
325 gdb_test_multiple "ptype a.*pmi" $name {
326 -re "type = int\r\n$gdb_prompt" {
329 -re "not implemented: member types in unpack_long\r\n$gdb_prompt $" {
330 # gcc HEAD 2004-01-10 -gdwarf-2
331 # gcc HEAD 2004-01-10 -gstabs+
332 kfail "gdb/NNNN" $name
336 # dereference the pointer to data member without any object
337 # this is not allowed: a pmi must be bound to an object to dereference
339 set name "print *pmi"
340 gdb_test_multiple "print *pmi" $name {
341 -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
344 -re "Cannot access memory at address 0x4\r\n$gdb_prompt $" {
345 # gcc 2.95.3 -gstabs+
346 kfail "gdb/NNNN" $name
348 -re "Cannot access memory at address 0x8\r\n$gdb_prompt $" {
349 # gcc 3.3.2 -gdwarf-2
351 kfail "gdb/NNNN" $name
355 # dereference the pointer to data member without any object
356 # this is not allowed: a pmi must be bound to an object to dereference
358 set name "ptype *pmi"
359 gdb_test_multiple "ptype *pmi" $name {
360 -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
363 -re "type = int A::\r\n$gdb_prompt $" {
364 # gcc 2.95.3 -gstabs+
365 # gcc HEAD 2004-01-10 -gdwarf-2
366 # gcc HEAD 2004-01-10 -gstabs+
367 kfail "gdb/NNNN" $name
371 # Check cast of pointer to member to integer.
372 # This is similar to "offset-of".
373 # such as "A a; print (size_t) &A.j - (size_t) &A".
375 set name "print (int) pmi"
376 gdb_test_multiple "print (int) pmi" $name {
377 -re "$vhn = (4|8|12)\r\n$gdb_prompt" {
382 # Check "(int) pmi" explicitly for equality.
384 set name "print ((int) pmi) == ((char *) &a.j - (char *) &a)"
385 gdb_test_multiple "print ((int) pmi) == ((char *) &a.j - (char *) & a)" $name {
386 -re "$vhn = true\r\n$gdb_prompt" {
391 # ==========================
392 # pointer to member function
393 # ==========================
395 # ptype a pointer to a method
398 gdb_test_multiple "ptype pmf" $name {
399 -re "type = int \\( ?A::\\*\\)\\(A \\*, int\\)\r\n$gdb_prompt $" {
402 -re "type = int \\( ?A::\\*\\)\\(void\\)\r\n$gdb_prompt $" {
404 kfail "gdb/NNNN" $name
406 -re "type = struct \{.*\}\r\n$gdb_prompt $" {
407 # gcc 2.95.3 -gdwarf-2
408 # gcc 2.95.3 -gstabs+
409 # gcc 3.2.2 -gdwarf-2
411 # gcc HEAD 2004-01-10 -gdwarf-2
412 # gcc HEAD 2004-01-10 -gstabs+
413 kfail "gdb/NNNN" $name
417 # print a pointer to a method
420 gdb_test_multiple "print pmf" $name {
421 -re "$vhn = \\(int \\(A::\\*\\)\\(A \\*, int\\)\\) $hex <A::bar\\(int\\)>\r\n$gdb_prompt $" {
424 -re "$vhn = .*not supported with HP aCC.*\r\n$gdb_prompt $" {
426 kfail "gdb/NNNN" $name
428 -re "$vhn = \{.*\}\r\n$gdb_prompt $" {
429 # gcc 2.95.3 -gdwarf-2
430 # gcc 2.95.3 -gstabs+
431 # gcc 3.2.2 -gdwarf-2
433 # gcc HEAD 2004-01-10 -gdwarf-2
434 # gcc HEAD 2004-01-10 -gstabs+
435 kfail "gdb/NNNN" $name
439 # ptype a pointer to a pointer to a method
441 set name "ptype pmf_p"
442 gdb_test_multiple "ptype pmf_p" $name {
443 -re "type = int \\( ?A::\\*\\*\\)\\(A \\*, int\\)\r\n$gdb_prompt $" {
446 -re "type = int \\( ?A::\\*\\*\\)\\(void\\)\r\n$gdb_prompt $" {
448 kfail "gdb/NNNN" $name
450 -re "type = struct \{.*\} \\*\r\n$gdb_prompt $" {
451 # gcc 2.95.3 -gdwarf-2
452 # gcc 2.95.3 -gstabs+
453 # gcc 3.2.2 -gdwarf-2
455 # gcc HEAD 2004-01-10 -gdwarf-2
456 # gcc HEAD 2004-01-10 -gstabs+
457 kfail "gdb/NNNN" $name
461 # print a pointer to a pointer to a method
463 set name "print pmf_p"
464 gdb_test_multiple "print pmf_p" $name {
465 -re "$vhn = \\(int \\( ?A::\\*\\*\\)\\)\\(int\\)\\) $hex\r\n$gdb_prompt $" {
468 -re "$vhn = \\(PMF \\*\\) $hex\r\n$gdb_prompt $" {
471 -re "$vhn = \\(int \\( ?A::\\*\\*\\)\\(void\\)\\) $hex\r\n$gdb_prompt $" {
473 kfail "gdb/NNNN" $name
475 -re "$vhn = \\(struct \{.*\} \\*\\) $hex\r\n$gdb_prompt $" {
476 # gcc 2.95.3 -gdwarf-2
477 kfail "gdb/NNNN" $name
481 # print dereferenced pointer to method
483 set name "print a.*pmf"
484 gdb_test_multiple "print a.*pmf" $name {
485 -re "$vhn = {int \\(A \\*, int\\)} $hex <A::bar\\(int\\)>\r\n$gdb_prompt $" {
488 -re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
490 kfail "gdb/NNNN" $name
492 -re "Value can't be converted to integer.\r\n$gdb_prompt $" {
493 # gcc 2.95.3 -gdwarf-2
494 # gcc 2.95.3 -gstabs+
495 # gcc 3.2.2 -gdwarf-2
497 # gcc HEAD 2004-01-10 -gdwarf-2
498 # gcc HEAD 2004-01-10 -gstabs+
499 kfail "gdb/NNNN" $name
503 # print dereferenced pointer to method, using ->*
505 set name "print a_p->*pmf"
506 gdb_test_multiple "print a_p->*pmf" $name {
507 -re "$vhn = {int \\(A \\*, int\\)} $hex <A::bar\\(int\\)>\r\n$gdb_prompt $" {
510 -re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
512 kfail "gdb/NNNN" $name
514 -re "Value can't be converted to integer.\r\n$gdb_prompt $" {
515 # gcc 2.95.3 -gdwarf-2
516 # gcc 2.95.3 -gstabs+
517 # gcc 3.2.2 -gdwarf-2
519 # gcc HEAD 2004-01-10 -gdwarf-2
520 # gcc HEAD 2004-01-10 -gstabs+
521 kfail "gdb/NNNN" $name
525 # set the pointer to data member
527 set name "set var pmf = &A::foo"
528 gdb_test_multiple "set var pmf = &A::foo" $name {
529 -re "set var pmf = &A::foo\r\n$gdb_prompt $" {
530 # I have to match the echo'ed input explicitly here.
531 # If I leave it out, the pattern becomes too general
532 # and matches anything that ends in "$gdb_prompt $".
535 -re "Invalid cast.\r\n$gdb_prompt $" {
536 # gcc 2.95.3 -gdwarf-2
537 # gcc 2.95.3 -gstabs+
538 # gcc 3.2.2 -gdwarf-2
540 # gcc HEAD 2004-01-10 -gdwarf-2
541 # gcc HEAD 2004-01-10 -gstabs+
542 kfail "gdb/NNNN" $name
544 -re "Assignment to pointers to methods not implemented with HP aCC\r\n$gdb_prompt $" {
545 kfail "gdb/NNNN" $name
549 # dereference the pointer to data member without any object
550 # this is not allowed: a pmf must be bound to an object to dereference
552 set name "print *pmf"
553 gdb_test_multiple "print *pmf" $name {
554 -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
557 -re "Structure has no component named operator\\*.\r\n$gdb_prompt $" {
558 # gcc 2.95.3 -gdwarf-2
559 # gcc 2.95.3 -gstabs+
560 # gcc 3.3.2 -gdwarf-2
562 # gcc HEAD 2004-01-10 -gdwarf-2
563 # gcc HEAD 2004-01-10 -gstabs+
564 kfail "gdb/NNNN" $name
568 # dereference the pointer to data member without any object
569 # this is not allowed: a pmf must be bound to an object to dereference
571 set name "ptype *pmf"
572 gdb_test_multiple "ptype *pmf" $name {
573 -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
576 -re "Structure has no component named operator\\*.\r\n$gdb_prompt $" {
577 # gcc 2.95.3 -gdwarf-2
578 # gcc 2.95.3 -gstabs+
579 # gcc 3.3.2 -gdwarf-2
581 # gcc HEAD 2004-01-10 -gdwarf-2
582 # gcc HEAD 2004-01-10 -gstabs+
583 kfail "gdb/NNNN" $name
587 # Call a function through a pmf.
589 set name "print (a.*pmf)(3)"
590 gdb_test_multiple "print (a.*pmf)(3)" $name {
591 -re "$vhn = 50\r\n$gdb_prompt $" {
594 -re "Not implemented: function invocation through pointer to method with HP aCC\r\n$gdb_prompt $" {
596 kfail "gdb/NNNN" $name
598 -re "Value can't be converted to integer.\r\n$gdb_prompt $" {
599 # gcc 2.95.3 -gdwarf-2
600 # gcc 2.95.3 -gstabs+
601 # gcc 3.3.2 -gdwarf-2
603 # gcc HEAD 2004-01-10 -gdwarf-2
604 # gcc HEAD 2004-01-10 -gstabs+
605 kfail "gdb/NNNN" $name
609 gdb_test "ptype a.*pmf" "type = int \\(A \\*, int\\)"
611 # Print out a pointer to data member which requires looking into
613 gdb_test "print diamond_pmi" "$vhn = &Base::x"
614 gdb_test "print diamond.*diamond_pmi" "$vhn = 77"
616 # Examine some more complicated pmfs, which require adjusting "this"
617 # and looking through virtual tables.
619 # These two have a different object adjustment, but call the same method.
620 gdb_test "print diamond.*left_pmf" \
621 "$vhn = {int \\(Diamond \\*\\)} $hex <Base::get_x\\((void|)\\)>"
622 gdb_test "print diamond.*right_pmf" \
623 "$vhn = {int \\(Diamond \\*\\)} $hex <Base::get_x\\((void|)\\)>"
625 gdb_test "print (diamond.*left_pmf) ()" "$vhn = 77"
626 gdb_test "print (diamond.*right_pmf) ()" "$vhn = 88"
628 # These two point to different methods, although they have the same
629 # virtual table offsets.
630 gdb_test "print diamond.*left_vpmf" \
631 "$vhn = {int \\(Diamond \\*\\)} $hex <Left::vget\\((void|)\\)>"
632 gdb_test "print diamond.*right_vpmf" \
633 "$vhn = {int \\(Diamond \\*\\)} $hex <Right::vget\\((void|)\\)>"
635 gdb_test "print (diamond.*left_vpmf) ()" "$vhn = 177"
636 gdb_test "print (diamond.*left_base_vpmf) ()" "$vhn = 2077"
637 gdb_test "print (diamond.*right_vpmf) ()" "$vhn = 288"
639 # We should be able to figure out left_vpmf even without an object,
640 # because it comes from a non-virtual base. The same for right_vpmf.
641 gdb_test "print left_vpmf" "$vhn = &virtual Left::vget\\(\\)"
642 gdb_test "print right_vpmf" "$vhn = &virtual Right::vget\\(\\)"
644 # But we should gracefully fail to figure out base_vpmf, because
645 # its runtime type is more derived than its static type. This
646 # is a valid but unspecified cast (it is value preserving, i.e.
647 # can be casted back to the correct type and used).
648 gdb_test "print base_vpmf" \
649 "$vhn = &virtual table offset \[0-9\]*, this adjustment -\[0-9\]*"
651 # Make sure we parse this correctly; it's invalid.
652 gdb_test "print diamond.*left_vpmf ()" \
653 "Invalid data type for function to be called\\."
655 # NULL pointer to member tests.
656 gdb_test "print null_pmi" "$vhn = NULL"
657 gdb_test "print null_pmi = &A::j" "$vhn = &A::j"
658 gdb_test "print null_pmi = 0" "$vhn = NULL"
660 gdb_test "print null_pmf" "$vhn = NULL"
661 gdb_test "print null_pmf = &A::foo" "$vhn = \\(int \\(A::\\*\\)\\(A \\*, int\\)\\) $hex <A::foo ?\\(int\\)>"
662 gdb_test "print null_pmf = 0" "$vhn = NULL"