45 Printing of C++ virtual function tables is %s.\n"),
57 Printing of object's derived type based on vtable info is %s.\n"),
67 _(
"Printing of C++ static members is %s.\n"),
85 int,
const struct value *,
101 return (type_name != NULL && !strcmp (type_name,
vtbl_ptr_name));
159 int recurse,
const struct value *val,
161 struct type **dont_print_vb,
162 int dont_print_statmem)
164 int i,
len, n_baseclasses;
166 static int last_set_recurse = -1;
185 32 *
sizeof (
struct type *));
196 if (n_baseclasses > 0)
198 offset, address, stream,
199 recurse + 1, val, options,
205 if (len == n_baseclasses || !len)
209 size_t statmem_obstack_initial_size = 0;
210 size_t stat_array_obstack_initial_size = 0;
211 struct type *vptr_basetype = NULL;
214 if (dont_print_statmem == 0)
216 statmem_obstack_initial_size =
219 if (last_set_recurse != recurse)
221 stat_array_obstack_initial_size =
224 last_set_recurse = recurse;
229 for (i = n_baseclasses; i <
len; i++)
238 else if (n_baseclasses > 0)
268 DMGL_PARAMS | DMGL_ANSI);
316 struct value *v = NULL;
326 _(
"<error reading variable: %s>"),
332 v, stream, recurse + 1,
335 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)
377 (obstack_final_size - statmem_obstack_initial_size);
383 if (last_set_recurse != recurse)
385 size_t obstack_final_size =
388 if (obstack_final_size > stat_array_obstack_initial_size)
392 - (obstack_final_size
393 - stat_array_obstack_initial_size);
398 last_set_recurse = -1;
422 struct ui_file *stream,
int recurse,
423 const struct value *val,
425 struct type **dont_print_vb,
426 int dont_print_statmem)
428 struct type *real_type = NULL;
437 int full, top, using_enc;
453 address, stream, recurse, val, options,
454 dont_print_vb, dont_print_statmem);
464 int recurse,
const struct value *val,
466 struct type **dont_print_vb)
468 struct type **last_dont_print
473 struct type *thistype;
475 if (dont_print_vb == 0)
484 for (i = 0; i < n_baseclasses; i++)
489 const char *basename =
TYPE_NAME (baseclass);
490 const gdb_byte *base_valaddr = NULL;
491 const struct value *base_val = NULL;
495 struct type **first_dont_print
498 int j = (
struct type **)
502 if (baseclass == first_dont_print[j])
509 thistype = real_type;
532 if ((boffset + offset) < 0
550 thistype = baseclass;
556 base_valaddr = valaddr;
562 base_valaddr = valaddr;
592 thisoffset + boffset,
600 thisoffset + boffset,
602 stream, recurse, base_val, options,
613 if (dont_print_vb == 0)
676 stream, recurse, val,
683 struct type **first_dont_print;
690 /
sizeof (
struct type *);
694 if (target_type == first_dont_print[i])
704 (
char *) &target_type,
705 sizeof (
struct type *));
713 stream, recurse, val,
739 if (offset == bitpos)
751 if (offset >= bitpos && offset < bitpos + bitsize)
764 struct ui_file *stream,
char *prefix)
797 if (self_type != NULL)
820 Set printing of C++ static members."),
_(
"\
821 Show printing of C++ static members."), NULL,
828 Set printing of C++ virtual function tables."),
_(
"\
829 Show printing of C++ virtual function tables."), NULL,
836 Set printing of object's derived type based on vtable info."),
_(
"\
837 Show printing of object's derived type based on vtable info."), NULL,
843 32 *
sizeof (
struct type *));
847 32 *
sizeof (
struct type *));
static void show_objectprint(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
int valprint_check_validity(struct ui_file *stream, struct type *type, int embedded_offset, const struct value *val)
void annotate_field_value(void)
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)
struct value * value_field_bitfield(struct type *type, int fieldno, const gdb_byte *valaddr, int embedded_offset, const struct value *val)
void cp_print_class_member(const gdb_byte *valaddr, struct type *type, struct ui_file *stream, char *prefix)
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)
#define TYPE_NAME(thistype)
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)
EXPORTED_CONST char vtbl_ptr_name[]
#define BASETYPE_VIA_VIRTUAL(thistype, index)
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 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)
struct type * value_enclosing_type(struct value *value)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
int apply_ext_lang_val_pretty_printer(struct type *type, const gdb_byte *valaddr, int embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, const struct language_defn *language)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
#define TYPE_FIELD_IGNORE(thistype, n)
static void cp_print_value(struct type *, struct type *, const gdb_byte *, int, CORE_ADDR, struct ui_file *, int, const struct value *, const struct value_print_options *, struct type **)
struct gdbarch * get_type_arch(const struct type *type)
const gdb_byte * value_contents_for_printing_const(const struct value *value)
struct cmd_list_element * setprintlist
#define TYPE_BASECLASS(thistype, index)
void wrap_here(char *indent)
#define TYPE_FIELD_PACKED(thistype, n)
int baseclass_offset(struct type *type, int index, const gdb_byte *valaddr, int embedded_offset, CORE_ADDR address, 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)
int value_bits_synthetic_pointer(const struct value *value, int offset, int 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 cp_print_value_fields(struct type *type, struct type *real_type, const gdb_byte *valaddr, int offset, CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, struct type **dont_print_vb, int dont_print_statmem)
void _initialize_cp_valprint(void)
#define TYPE_NFIELDS(thistype)
int cp_is_vtbl_ptr_type(struct type *type)
struct type * value_rtti_type(struct value *v, int *full, int *top, int *using_enc)
#define CHECK_TYPEDEF(TYPE)
struct cmd_list_element * showprintlist
void annotate_field_end(void)
int value_embedded_offset(struct value *value)
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)
LONGEST extract_signed_integer(const gdb_byte *, int, enum bfd_endian)
void cp_print_value_fields_rtti(struct type *type, const gdb_byte *valaddr, int offset, CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, struct type **dont_print_vb, int dont_print_statmem)
CORE_ADDR value_address(const struct value *value)
#define TYPE_SELF_TYPE(thistype)
void val_print(struct type *type, const gdb_byte *valaddr, int embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, const struct language_defn *language)
static struct obstack dont_print_vb_obstack
void annotate_field_begin(struct type *type)
void do_cleanups(struct cleanup *old_chain)
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_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
const ULONGEST const LONGEST len