46 Printing of C++ virtual function tables is %s.\n"),
58 Printing of object's derived type based on vtable info is %s.\n"),
68 _(
"Printing of C++ static members is %s.\n"),
100 return (type_name != NULL && !strcmp (type_name,
vtbl_ptr_name));
158 int recurse,
struct value *val,
160 struct type **dont_print_vb,
161 int dont_print_statmem)
163 int i, len, n_baseclasses;
165 static int last_set_recurse = -1;
184 32 *
sizeof (
struct type *));
195 if (n_baseclasses > 0)
198 recurse + 1, val, options,
204 if (len == n_baseclasses || !len)
208 size_t statmem_obstack_initial_size = 0;
209 size_t stat_array_obstack_initial_size = 0;
210 struct type *vptr_basetype = NULL;
213 if (dont_print_statmem == 0)
215 statmem_obstack_initial_size =
218 if (last_set_recurse != recurse)
220 stat_array_obstack_initial_size =
223 last_set_recurse = recurse;
228 for (i = n_baseclasses; i < len; i++)
239 else if (n_baseclasses > 0)
269 DMGL_PARAMS | DMGL_ANSI);
317 struct value *v = NULL;
327 _(
"<error reading variable: %s>"),
333 v, stream, recurse + 1,
336 else if (i == vptr_fieldno &&
type == vptr_basetype)
359 stream, recurse + 1, val, &opts,
366 if (dont_print_statmem == 0)
368 size_t obstack_final_size =
371 if (obstack_final_size > statmem_obstack_initial_size)
375 = statmem_obstack_initial_size - obstack_final_size;
379 if (last_set_recurse != recurse)
381 size_t obstack_final_size =
384 if (obstack_final_size > stat_array_obstack_initial_size)
388 - (obstack_final_size
389 - stat_array_obstack_initial_size);
394 last_set_recurse = -1;
418 struct ui_file *stream,
int recurse,
421 struct type **dont_print_vb,
422 int dont_print_statmem)
424 struct type *real_type = NULL;
450 address, stream, recurse, val, options,
451 dont_print_vb, dont_print_statmem);
461 int recurse,
struct value *val,
463 struct type **dont_print_vb)
465 struct type **last_dont_print
470 struct type *thistype;
473 if (dont_print_vb == 0)
482 for (i = 0; i < n_baseclasses; i++)
487 const char *basename =
TYPE_NAME (baseclass);
488 struct value *base_val = NULL;
492 struct type **first_dont_print
495 int j = (
struct type **)
499 if (baseclass == first_dont_print[j])
506 thistype = real_type;
529 if ((boffset +
offset) < 0
543 thistype = baseclass;
581 thisoffset + boffset,
589 thisoffset + boffset,
591 stream, recurse, base_val, options,
602 if (dont_print_vb == 0)
664 stream, recurse, val,
671 struct type **first_dont_print;
678 /
sizeof (
struct type *);
682 if (target_type == first_dont_print[i])
692 (
char *) &target_type,
693 sizeof (
struct type *));
701 stream, recurse, val,
752 struct ui_file *stream,
const char *prefix)
785 if (self_type != NULL)
808 Set printing of C++ static members."),
_(
"\ 809 Show printing of C++ static members."), NULL,
816 Set printing of C++ virtual function tables."),
_(
"\ 817 Show printing of C++ virtual function tables."), NULL,
824 Set printing of object's derived type based on vtable info."),
_(
"\ 825 Show printing of object's derived type based on vtable info."), NULL,
831 32 *
sizeof (
struct type *));
835 32 *
sizeof (
struct type *));
static void show_objectprint(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
struct type * value_rtti_type(struct value *v, int *full, LONGEST *top, int *using_enc)
void annotate_field_value(void)
static void cp_print_value(struct type *, struct type *, LONGEST, CORE_ADDR, struct ui_file *, int, struct value *, const struct value_print_options *, struct type **)
CORE_ADDR extract_typed_address(const gdb_byte *buf, struct type *type)
void fprintf_symbol_filtered(struct ui_file *stream, const char *name, enum language lang, int arg_mode)
const char vtbl_ptr_name[]
static void cp_find_class_member(struct type **self_p, int *fieldno, LONGEST offset)
void c_type_print_base(struct type *, struct ui_file *, int, int, const struct type_print_options *)
struct value * value_from_contents_and_address(struct type *type, const gdb_byte *valaddr, CORE_ADDR address)
int get_vptr_fieldno(struct type *type, struct type **basetypep)
static void show_vtblprint(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
#define TYPE_FIELD_NAME(thistype, n)
#define TYPE_N_BASECLASSES(thistype)
int value_entirely_optimized_out(struct value *value)
void cp_print_value_fields_rtti(struct type *type, const gdb_byte *valaddr, LONGEST offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *val, const struct value_print_options *options, struct type **dont_print_vb, int dont_print_statmem)
LONGEST value_embedded_offset(const struct value *value)
#define TYPE_NAME(thistype)
struct type * value_enclosing_type(const struct value *value)
void val_print_unavailable(struct ui_file *stream)
const struct type_print_options type_print_raw_options
void common_val_print(struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options, const struct language_defn *language)
#define BASETYPE_VIA_VIRTUAL(thistype, index)
int baseclass_offset(struct type *type, int index, const gdb_byte *valaddr, LONGEST embedded_offset, CORE_ADDR address, const struct value *val)
enum language la_language
void annotate_field_name_end(void)
static void show_static_field_print(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void val_print_invalid_address(struct ui_file *stream)
const gdb_byte * value_contents_for_printing(struct value *value)
static struct obstack dont_print_stat_array_obstack
#define TYPE_FIELD(thistype, n)
int value_bits_any_optimized_out(const struct value *value, int bit_offset, int bit_length)
struct value_print_options user_print_options
#define TYPE_FIELD_TYPE(thistype, n)
enum val_prettyformat prettyformat
void cp_print_value_fields(struct type *type, struct type *real_type, LONGEST offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *val, const struct value_print_options *options, struct type **dont_print_vb, int dont_print_statmem)
void val_print_optimized_out(const struct value *val, struct ui_file *stream)
struct type * check_typedef(struct type *type)
#define CATCH(EXCEPTION, MASK)
int field_is_static(struct field *f)
struct value * value_static_field(struct type *type, int fieldno)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
void fputs_filtered(const char *linebuffer, struct ui_file *stream)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
#define TYPE_FIELD_IGNORE(thistype, n)
struct gdbarch * get_type_arch(const struct type *type)
struct cmd_list_element * setprintlist
#define TYPE_BASECLASS(thistype, index)
#define TYPE_FIELD_PACKED(thistype, n)
int valprint_check_validity(struct ui_file *stream, struct type *type, LONGEST embedded_offset, const struct value *val)
#define TYPE_FIELD_BITSIZE(thistype, n)
static void cp_print_static_field(struct type *, struct value *, struct ui_file *, int, const struct value_print_options *)
#define TYPE_FIELD_BITPOS(thistype, n)
void wrap_here(const char *indent)
int value_bits_synthetic_pointer(const struct value *value, LONGEST offset, LONGEST length)
void print_spaces_filtered(int n, struct ui_file *stream)
const struct language_defn * current_language
int cp_is_vtbl_member(struct type *type)
#define TYPE_TARGET_TYPE(thistype)
static struct obstack dont_print_statmem_obstack
#define TYPE_CODE(thistype)
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void _initialize_cp_valprint(void)
#define TYPE_NFIELDS(thistype)
int cp_is_vtbl_ptr_type(struct type *type)
static LONGEST extract_signed_integer(const gdb_byte *addr, int len, enum bfd_endian byte_order)
void cp_print_class_member(const gdb_byte *valaddr, struct type *type, struct ui_file *stream, const char *prefix)
struct cmd_list_element * showprintlist
gdb::def_vector< gdb_byte > byte_vector
void val_print(struct type *type, LONGEST embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *val, const struct value_print_options *options, const struct language_defn *language)
void annotate_field_end(void)
struct value * value_field_bitfield(struct type *type, int fieldno, const gdb_byte *valaddr, LONGEST embedded_offset, const struct value *val)
struct type * value_type(const struct value *value)
const char * type_name_no_tag(const struct type *type)
#define TYPE_LENGTH(thistype)
void print_function_pointer_address(const struct value_print_options *options, struct gdbarch *gdbarch, CORE_ADDR address, struct ui_file *stream)
CORE_ADDR value_address(const struct value *value)
#define TYPE_SELF_TYPE(thistype)
static struct obstack dont_print_vb_obstack
void annotate_field_begin(struct type *type)
int apply_ext_lang_val_pretty_printer(struct type *type, LONGEST embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *val, const struct value_print_options *options, const struct language_defn *language)