1 /* Support for printing C++ values for GDB, the GNU debugger.
2 Copyright 1986, 1988, 1989, 1991, 1994, 1995, 1996
3 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
25 #include "expression.h"
31 #include "gdb_string.h"
35 /* Indication of presence of HP-compiled object files */
36 extern int hp_som_som_object_present
; /* defined in symtab.c */
39 int vtblprint
; /* Controls printing of vtbl's */
40 int objectprint
; /* Controls looking up an object's derived type
41 using what we find in its vtables. */
42 int static_field_print
; /* Controls printing of static fields. */
44 static struct obstack dont_print_vb_obstack
;
45 static struct obstack dont_print_statmem_obstack
;
47 extern void _initialize_cp_valprint
PARAMS ((void));
50 cp_print_static_field
PARAMS ((struct type
*, value_ptr
, GDB_FILE
*, int, int,
51 enum val_prettyprint
));
54 cp_print_value
PARAMS ((struct type
*, struct type
*, char *, int, CORE_ADDR
, GDB_FILE
*,
55 int, int, enum val_prettyprint
, struct type
**));
58 cp_print_hpacc_virtual_table_entries
PARAMS ((struct type
*, int *, value_ptr
, GDB_FILE
*,
59 int, int, enum val_prettyprint
));
63 cp_print_class_method (valaddr
, type
, stream
)
69 struct fn_field
*f
= NULL
;
78 struct type
*target_type
= check_typedef (TYPE_TARGET_TYPE (type
));
80 domain
= TYPE_DOMAIN_TYPE (target_type
);
81 if (domain
== (struct type
*)NULL
)
83 fprintf_filtered (stream
, "<unknown>");
86 addr
= unpack_pointer (lookup_pointer_type (builtin_type_void
), valaddr
);
87 if (METHOD_PTR_IS_VIRTUAL (addr
))
89 offset
= METHOD_PTR_TO_VOFFSET (addr
);
90 len
= TYPE_NFN_FIELDS (domain
);
91 for (i
= 0; i
< len
; i
++)
93 f
= TYPE_FN_FIELDLIST1 (domain
, i
);
94 len2
= TYPE_FN_FIELDLIST_LENGTH (domain
, i
);
96 for (j
= 0; j
< len2
; j
++)
99 if (TYPE_FN_FIELD_VOFFSET (f
, j
) == offset
)
101 if (TYPE_FN_FIELD_STUB (f
, j
))
102 check_stub_method (domain
, i
, j
);
111 sym
= find_pc_function (addr
);
114 /* 1997-08-01 Currently unsupported with HP aCC */
115 if (hp_som_som_object_present
)
117 fputs_filtered ("?? <not supported with HP aCC>", stream
);
120 error ("invalid pointer to member function");
122 len
= TYPE_NFN_FIELDS (domain
);
123 for (i
= 0; i
< len
; i
++)
125 f
= TYPE_FN_FIELDLIST1 (domain
, i
);
126 len2
= TYPE_FN_FIELDLIST_LENGTH (domain
, i
);
128 for (j
= 0; j
< len2
; j
++)
131 if (TYPE_FN_FIELD_STUB (f
, j
))
132 check_stub_method (domain
, i
, j
);
133 if (STREQ (SYMBOL_NAME (sym
), TYPE_FN_FIELD_PHYSNAME (f
, j
)))
143 char *demangled_name
;
145 fprintf_filtered (stream
, "&");
146 fprintf_filtered (stream
, kind
);
147 demangled_name
= cplus_demangle (TYPE_FN_FIELD_PHYSNAME (f
, j
),
148 DMGL_ANSI
| DMGL_PARAMS
);
149 if (demangled_name
== NULL
)
150 fprintf_filtered (stream
, "<badly mangled name %s>",
151 TYPE_FN_FIELD_PHYSNAME (f
, j
));
154 fputs_filtered (demangled_name
, stream
);
155 free (demangled_name
);
160 fprintf_filtered (stream
, "(");
161 type_print (type
, "", stream
, -1);
162 fprintf_filtered (stream
, ") %d", (int) addr
>> 3);
166 /* This was what it was for gcc 2.4.5 and earlier. */
167 static const char vtbl_ptr_name_old
[] =
168 { CPLUS_MARKER
,'v','t','b','l','_','p','t','r','_','t','y','p','e', 0 };
169 /* It was changed to this after 2.4.5. */
170 const char vtbl_ptr_name
[] =
171 { '_','_','v','t','b','l','_','p','t','r','_','t','y','p','e', 0 };
173 /* HP aCC uses different names */
174 const char hpacc_vtbl_ptr_name
[] =
175 { '_', '_', 'v', 'f', 'p', 0 };
176 const char hpacc_vtbl_ptr_type_name
[] =
177 { '_', '_', 'v', 'f', 't', 'y', 'p', 0 };
180 /* Return truth value for assertion that TYPE is of the type
181 "pointer to virtual function". */
184 cp_is_vtbl_ptr_type(type
)
187 char *typename
= type_name_no_tag (type
);
189 return (typename
!= NULL
190 && (STREQ (typename
, vtbl_ptr_name
)
191 || STREQ (typename
, vtbl_ptr_name_old
)));
194 /* Return truth value for the assertion that TYPE is of the type
195 "pointer to virtual function table". */
198 cp_is_vtbl_member(type
)
201 if (TYPE_CODE (type
) == TYPE_CODE_PTR
)
203 type
= TYPE_TARGET_TYPE (type
);
204 if (TYPE_CODE (type
) == TYPE_CODE_ARRAY
)
206 type
= TYPE_TARGET_TYPE (type
);
207 if (TYPE_CODE (type
) == TYPE_CODE_STRUCT
/* if not using thunks */
208 || TYPE_CODE (type
) == TYPE_CODE_PTR
) /* if using thunks */
210 /* Virtual functions tables are full of pointers
211 to virtual functions. */
212 return cp_is_vtbl_ptr_type (type
);
219 /* Mutually recursive subroutines of cp_print_value and c_val_print to
220 print out a structure's fields: cp_print_value_fields and cp_print_value.
222 TYPE, VALADDR, ADDRESS, STREAM, RECURSE, and PRETTY have the
223 same meanings as in cp_print_value and c_val_print.
225 2nd argument REAL_TYPE is used to carry over the type of the derived
226 class across the recursion to base classes.
228 DONT_PRINT is an array of baseclass types that we
229 should not print, or zero if called from top level. */
232 cp_print_value_fields (type
, real_type
, valaddr
, offset
, address
, stream
, format
, recurse
, pretty
,
233 dont_print_vb
, dont_print_statmem
)
235 struct type
*real_type
;
242 enum val_prettyprint pretty
;
243 struct type
**dont_print_vb
;
244 int dont_print_statmem
;
246 int i
, len
, n_baseclasses
;
247 struct obstack tmp_obstack
;
248 char *last_dont_print
= obstack_next_free (&dont_print_statmem_obstack
);
251 CHECK_TYPEDEF (type
);
253 fprintf_filtered (stream
, "{");
254 len
= TYPE_NFIELDS (type
);
255 n_baseclasses
= TYPE_N_BASECLASSES (type
);
257 /* First, print out baseclasses such that we don't print
258 duplicates of virtual baseclasses. */
260 if (n_baseclasses
> 0)
261 cp_print_value (type
, real_type
, valaddr
, offset
, address
, stream
,
262 format
, recurse
+1, pretty
, dont_print_vb
);
264 /* Second, print out data fields */
266 /* If there are no data fields, or if the only field is the
267 * vtbl pointer, skip this part */
268 if ((len
== n_baseclasses
) ||
269 ((len
- n_baseclasses
== 1) &&
270 TYPE_HAS_VTABLE(type
) &&
271 STREQN(TYPE_FIELD_NAME (type
, n_baseclasses
), hpacc_vtbl_ptr_name
, 5)) ||
273 fprintf_filtered (stream
, "<No data fields>");
276 extern int inspect_it
;
278 if (dont_print_statmem
== 0)
280 /* If we're at top level, carve out a completely fresh
281 chunk of the obstack and use that until this particular
282 invocation returns. */
283 tmp_obstack
= dont_print_statmem_obstack
;
284 obstack_finish (&dont_print_statmem_obstack
);
287 for (i
= n_baseclasses
; i
< len
; i
++)
289 /* If requested, skip printing of static fields. */
290 if (!static_field_print
&& TYPE_FIELD_STATIC (type
, i
))
293 /* If a vtable pointer appears, we'll print it out later */
294 if (TYPE_HAS_VTABLE(type
) && STREQN(TYPE_FIELD_NAME (type
, i
), hpacc_vtbl_ptr_name
, 5))
298 fprintf_filtered (stream
, ", ");
299 else if (n_baseclasses
> 0)
303 fprintf_filtered (stream
, "\n");
304 print_spaces_filtered (2 + 2 * recurse
, stream
);
305 fputs_filtered ("members of ", stream
);
306 fputs_filtered (type_name_no_tag (type
), stream
);
307 fputs_filtered (": ", stream
);
314 fprintf_filtered (stream
, "\n");
315 print_spaces_filtered (2 + 2 * recurse
, stream
);
319 wrap_here (n_spaces (2 + 2 * recurse
));
323 if (TYPE_CODE (TYPE_FIELD_TYPE (type
, i
)) == TYPE_CODE_PTR
)
324 fputs_filtered ("\"( ptr \"", stream
);
326 fputs_filtered ("\"( nodef \"", stream
);
327 if (TYPE_FIELD_STATIC (type
, i
))
328 fputs_filtered ("static ", stream
);
329 fprintf_symbol_filtered (stream
, TYPE_FIELD_NAME (type
, i
),
331 DMGL_PARAMS
| DMGL_ANSI
);
332 fputs_filtered ("\" \"", stream
);
333 fprintf_symbol_filtered (stream
, TYPE_FIELD_NAME (type
, i
),
335 DMGL_PARAMS
| DMGL_ANSI
);
336 fputs_filtered ("\") \"", stream
);
340 annotate_field_begin (TYPE_FIELD_TYPE (type
, i
));
342 if (TYPE_FIELD_STATIC (type
, i
))
343 fputs_filtered ("static ", stream
);
344 fprintf_symbol_filtered (stream
, TYPE_FIELD_NAME (type
, i
),
346 DMGL_PARAMS
| DMGL_ANSI
);
347 annotate_field_name_end ();
348 /* do not print leading '=' in case of anonymous unions */
349 if (strcmp (TYPE_FIELD_NAME (type
, i
), ""))
350 fputs_filtered (" = ", stream
);
351 annotate_field_value ();
354 if (!TYPE_FIELD_STATIC (type
, i
) && TYPE_FIELD_PACKED (type
, i
))
358 /* Bitfields require special handling, especially due to byte
360 if (TYPE_FIELD_IGNORE (type
, i
))
362 fputs_filtered ("<optimized out or zero length>", stream
);
366 v
= value_from_longest (TYPE_FIELD_TYPE (type
, i
),
367 unpack_field_as_long (type
, valaddr
+ offset
, i
));
369 val_print (TYPE_FIELD_TYPE(type
, i
), VALUE_CONTENTS (v
), 0, 0,
370 stream
, format
, 0, recurse
+ 1, pretty
);
375 if (TYPE_FIELD_IGNORE (type
, i
))
377 fputs_filtered ("<optimized out or zero length>", stream
);
379 else if (TYPE_FIELD_STATIC (type
, i
))
381 value_ptr v
= value_static_field (type
, i
);
383 fputs_filtered ("<optimized out>", stream
);
385 cp_print_static_field (TYPE_FIELD_TYPE (type
, i
), v
,
386 stream
, format
, recurse
+ 1,
391 val_print (TYPE_FIELD_TYPE (type
, i
),
392 valaddr
, offset
+ TYPE_FIELD_BITPOS (type
, i
) / 8,
393 address
+ TYPE_FIELD_BITPOS (type
, i
) / 8,
394 stream
, format
, 0, recurse
+ 1, pretty
);
397 annotate_field_end ();
400 if (dont_print_statmem
== 0)
402 /* Free the space used to deal with the printing
403 of the members from top level. */
404 obstack_free (&dont_print_statmem_obstack
, last_dont_print
);
405 dont_print_statmem_obstack
= tmp_obstack
;
410 fprintf_filtered (stream
, "\n");
411 print_spaces_filtered (2 * recurse
, stream
);
413 } /* if there are data fields */
414 /* Now print out the virtual table pointer if there is one */
415 if (TYPE_HAS_VTABLE(type
) && STREQN(TYPE_FIELD_NAME (type
, n_baseclasses
), hpacc_vtbl_ptr_name
, 5))
418 /* First get the virtual table pointer and print it out*/
421 fputs_filtered ("__vfp = ", stream
);
424 fputs_filtered (", Virtual table at ", stream
);
426 /* pai: FIXME 32x64 problem? */
427 /* Not sure what the best notation is in the case where there is no
429 v
= value_from_longest (lookup_pointer_type (builtin_type_unsigned_long
),
430 * (unsigned long *) (valaddr
+ offset
));
432 val_print (VALUE_TYPE (v
), VALUE_CONTENTS (v
), 0, 0,
433 stream
, format
, 0, recurse
+ 1, pretty
);
438 /* Print out function pointers in vtable. */
440 /* FIXME: then-clause is for non-RRBC layout of virtual
441 * table. The RRBC case in the else-clause is yet to be
442 * implemented. The if (1) below should be changed to a
443 * test for whether the executable we have was compiled
444 * with a version of HP aCC that doesn't have RRBC
449 /* no RRBC support; function pointers embedded directly in vtable */
451 int vfuncs
= count_virtual_fns (real_type
);
453 fputs_filtered (" {", stream
);
455 /* FIXME : doesn't work at present */
457 fprintf_filtered (stream
, "%d entr%s: ", vfuncs
, vfuncs
== 1 ? "y" : "ies");
459 fputs_filtered ("not implemented", stream
);
464 /* recursive function that prints all virtual function entries */
466 cp_print_hpacc_virtual_table_entries (real_type
, &vfuncs
, v
, stream
, format
, recurse
, pretty
);
468 fputs_filtered ("}", stream
);
469 } /* non-RRBC case */
472 /* FIXME -- seem comments above */
473 /* RRBC support present; function pointers are found
474 * by indirection through the class segment entries. */
482 fprintf_filtered (stream
, "\n");
483 print_spaces_filtered (2 * recurse
, stream
);
486 } /* if vtable exists */
488 fprintf_filtered (stream
, "}");
491 /* Special val_print routine to avoid printing multiple copies of virtual
495 cp_print_value (type
, real_type
, valaddr
, offset
, address
, stream
, format
, recurse
, pretty
,
498 struct type
*real_type
;
505 enum val_prettyprint pretty
;
506 struct type
**dont_print_vb
;
508 struct obstack tmp_obstack
;
509 struct type
**last_dont_print
510 = (struct type
**)obstack_next_free (&dont_print_vb_obstack
);
511 int i
, n_baseclasses
= TYPE_N_BASECLASSES (type
);
513 if (dont_print_vb
== 0)
515 /* If we're at top level, carve out a completely fresh
516 chunk of the obstack and use that until this particular
517 invocation returns. */
518 tmp_obstack
= dont_print_vb_obstack
;
519 /* Bump up the high-water mark. Now alpha is omega. */
520 obstack_finish (&dont_print_vb_obstack
);
523 for (i
= 0; i
< n_baseclasses
; i
++)
527 struct type
*baseclass
= check_typedef (TYPE_BASECLASS (type
, i
));
528 char *basename
= TYPE_NAME (baseclass
);
531 if (BASETYPE_VIA_VIRTUAL (type
, i
))
533 struct type
**first_dont_print
534 = (struct type
**)obstack_base (&dont_print_vb_obstack
);
536 int j
= (struct type
**)obstack_next_free (&dont_print_vb_obstack
)
540 if (baseclass
== first_dont_print
[j
])
543 obstack_ptr_grow (&dont_print_vb_obstack
, baseclass
);
546 if (TYPE_HAS_VTABLE (type
) && BASETYPE_VIA_VIRTUAL (type
, i
))
548 /* Assume HP/Taligent runtime convention */
549 find_rt_vbase_offset (type
, TYPE_BASECLASS (type
, i
),
550 valaddr
, offset
, &boffset
, &skip
);
552 error ("Virtual base class offset not found from vtable while printing");
553 base_valaddr
= valaddr
;
557 boffset
= baseclass_offset (type
, i
, valaddr
+ offset
, address
+ offset
);
558 skip
= ((boffset
== -1) || (boffset
+offset
) < 0 ) ? 1 : -1;
560 if (BASETYPE_VIA_VIRTUAL (type
, i
))
562 /* The virtual base class pointer might have been clobbered by the
563 user program. Make sure that it still points to a valid memory
566 if (boffset
!= -1 && ((boffset
+offset
) < 0 || (boffset
+offset
) >= TYPE_LENGTH (type
)))
568 base_valaddr
= (char *) alloca (TYPE_LENGTH (baseclass
));
569 if (target_read_memory (address
+ boffset
, base_valaddr
,
570 TYPE_LENGTH (baseclass
)) != 0)
574 base_valaddr
= valaddr
;
577 base_valaddr
= valaddr
;
580 /* now do the printing */
583 fprintf_filtered (stream
, "\n");
584 print_spaces_filtered (2 * recurse
, stream
);
586 fputs_filtered ("<", stream
);
587 /* Not sure what the best notation is in the case where there is no
589 fputs_filtered (basename
? basename
: "", stream
);
590 fputs_filtered ("> = ", stream
);
594 fprintf_filtered (stream
, "<invalid address>");
596 cp_print_value_fields (baseclass
, real_type
, base_valaddr
, offset
+ boffset
, address
,
597 stream
, format
, recurse
, pretty
,
598 (struct type
**) obstack_base (&dont_print_vb_obstack
),
600 fputs_filtered (", ", stream
);
606 if (dont_print_vb
== 0)
608 /* Free the space used to deal with the printing
609 of this type from top level. */
610 obstack_free (&dont_print_vb_obstack
, last_dont_print
);
611 /* Reset watermark so that we can continue protecting
612 ourselves from whatever we were protecting ourselves. */
613 dont_print_vb_obstack
= tmp_obstack
;
617 /* Print value of a static member.
618 To avoid infinite recursion when printing a class that contains
619 a static instance of the class, we keep the addresses of all printed
620 static member classes in an obstack and refuse to print them more
623 VAL contains the value to print, TYPE, STREAM, RECURSE, and PRETTY
624 have the same meanings as in c_val_print. */
627 cp_print_static_field (type
, val
, stream
, format
, recurse
, pretty
)
633 enum val_prettyprint pretty
;
635 if (TYPE_CODE (type
) == TYPE_CODE_STRUCT
)
637 CORE_ADDR
*first_dont_print
;
641 = (CORE_ADDR
*)obstack_base (&dont_print_statmem_obstack
);
642 i
= (CORE_ADDR
*)obstack_next_free (&dont_print_statmem_obstack
)
647 if (VALUE_ADDRESS (val
) == first_dont_print
[i
])
649 fputs_filtered ("<same as static member of an already seen type>",
655 obstack_grow (&dont_print_statmem_obstack
, (char *) &VALUE_ADDRESS (val
),
658 CHECK_TYPEDEF (type
);
659 cp_print_value_fields (type
, type
, VALUE_CONTENTS_ALL (val
), VALUE_EMBEDDED_OFFSET (val
), VALUE_ADDRESS (val
),
660 stream
, format
, recurse
, pretty
, NULL
, 1);
663 val_print (type
, VALUE_CONTENTS_ALL (val
), VALUE_EMBEDDED_OFFSET (val
), VALUE_ADDRESS (val
),
664 stream
, format
, 0, recurse
, pretty
);
668 cp_print_class_member (valaddr
, domain
, stream
, prefix
)
675 /* VAL is a byte offset into the structure type DOMAIN.
676 Find the name of the field for that offset and
680 register unsigned int i
;
681 unsigned len
= TYPE_NFIELDS (domain
);
683 /* @@ Make VAL into bit offset */
685 /* Note: HP aCC generates offsets that are the real byte offsets added
686 to a constant bias 0x20000000 (1 << 29). This constant bias gets
687 shifted out in the code below -- joyous happenstance! */
689 /* Note: HP cfront uses a constant bias of 1; if we support this
690 compiler ever, we will have to adjust the computation below */
692 LONGEST val
= unpack_long (builtin_type_int
, valaddr
) << 3;
693 for (i
= TYPE_N_BASECLASSES (domain
); i
< len
; i
++)
695 int bitpos
= TYPE_FIELD_BITPOS (domain
, i
);
699 if (val
< bitpos
&& i
!= 0)
701 /* Somehow pointing into a field. */
703 extra
= (val
- TYPE_FIELD_BITPOS (domain
, i
));
714 fprintf_filtered (stream
, prefix
);
715 name
= type_name_no_tag (domain
);
717 fputs_filtered (name
, stream
);
719 c_type_print_base (domain
, stream
, 0, 0);
720 fprintf_filtered (stream
, "::");
721 fputs_filtered (TYPE_FIELD_NAME (domain
, i
), stream
);
723 fprintf_filtered (stream
, " + %d bytes", extra
);
725 fprintf_filtered (stream
, " (offset in bits)");
728 fprintf_filtered (stream
, "%d", val
>> 3);
732 /* This function prints out virtual table entries for a class; it
733 * recurses on the base classes to find all virtual functions
734 * available in a class.
736 * pai/1997-05-21 Note: As the name suggests, it's currently
737 * implemented for HP aCC runtime only. g++ objects are handled
738 * differently and I have made no attempt to fold that logic in
739 * here. The runtime layout is different for the two cases. Also,
740 * this currently has only the code for non-RRBC layouts generated by
741 * the HP aCC compiler; RRBC code is stubbed out and will have to be
746 cp_print_hpacc_virtual_table_entries (type
, vfuncs
, v
, stream
, format
, recurse
, pretty
)
753 enum val_prettyprint pretty
;
757 /* pai: FIXME this function doesn't work. It should handle a given
758 * virtual function only once (latest redefinition in class hierarchy)
761 /* Recursion on other classes that can share the same vtable */
762 struct type
* pbc
= primary_base_class (type
);
764 cp_print_hpacc_virtual_table_entries (pbc
, vfuncs
, v
, stream
, format
, recurse
, pretty
);
766 /* Now deal with vfuncs declared in this class */
767 for (fn
= 0; fn
< TYPE_NFN_FIELDS (type
); fn
++)
768 for (oi
= 0; oi
< TYPE_FN_FIELDLIST_LENGTH (type
, fn
); oi
++)
769 if (TYPE_FN_FIELD_VIRTUAL_P (TYPE_FN_FIELDLIST1 (type
, fn
), oi
))
773 /* virtual function offset */
774 int vx
= TYPE_FN_FIELD_VOFFSET (TYPE_FN_FIELDLIST1 (type
, fn
), oi
) - 1;
776 /* Get the address of the vfunction entry */
777 value_ptr vf
= value_copy (v
);
779 (void) value_fetch_lazy (vf
);
780 vf
->aligner
.contents
[0] += 4 * (HP_ACC_VFUNC_START
+ vx
); /* adjust by offset */
781 vf
= value_ind (vf
); /* get the entry */
782 VALUE_TYPE (vf
) = VALUE_TYPE (v
); /* make it a pointer */
784 /* print out the entry */
785 val_print (VALUE_TYPE (vf
), VALUE_CONTENTS (vf
), 0, 0,
786 stream
, format
, 0, recurse
+ 1, pretty
);
787 vf_name
= cplus_demangle (TYPE_FN_FIELD_PHYSNAME (TYPE_FN_FIELDLIST1 (type
, fn
), oi
),
788 DMGL_ARM
); /* pai: (temp) FIXME Maybe this should be DMGL_ANSI */
789 fprintf_filtered (stream
, " %s", vf_name
);
791 fputs_filtered (", ", stream
);
798 _initialize_cp_valprint ()
801 (add_set_cmd ("static-members", class_support
, var_boolean
,
802 (char *)&static_field_print
,
803 "Set printing of C++ static members.",
806 /* Turn on printing of static fields. */
807 static_field_print
= 1;
810 (add_set_cmd ("vtbl", class_support
, var_boolean
, (char *)&vtblprint
,
811 "Set printing of C++ virtual function tables.",
816 (add_set_cmd ("object", class_support
, var_boolean
, (char *)&objectprint
,
817 "Set printing of object's derived type based on vtable info.",
821 /* Give people the defaults which they are used to. */
824 obstack_begin (&dont_print_vb_obstack
, 32 * sizeof (struct type
*));
825 obstack_specify_allocation (&dont_print_statmem_obstack
,
826 32 * sizeof (CORE_ADDR
), sizeof (CORE_ADDR
),