39 error (
_(
"ABI doesn't define required function is_constructor_name"));
47 error (
_(
"ABI doesn't define required function is_destructor_name"));
55 error (
_(
"ABI doesn't define required function is_vtable_name"));
63 error (
_(
"ABI doesn't define required function is_operator_name"));
70 const struct value *val)
88 _(
"Cannot determine virtual baseclass offset "
89 "of incomplete object"));
109 int *top,
int *using_enc)
111 struct type *ret = NULL;
117 ret = (*current_cp_abi.
rtti_type) (v, full, top, using_enc);
134 error (
_(
"GDB does not support pointers to methods on this target"));
142 error (
_(
"GDB does not support pointers to methods on this target"));
151 error (
_(
"GDB does not support pointers to methods on this target"));
166 struct value *method_ptr)
169 error (
_(
"GDB does not support pointers to methods on this target"));
179 error (
_(
"GDB cannot print the vtable on this target"));
189 error (
_(
"GDB cannot find the typeid on this target"));
199 error (
_(
"GDB cannot find the type for 'typeid' on this target"));
209 error (
_(
"GDB cannot find the type from a std::type_info on this target"));
219 error (
_(
"GDB cannot find the type name "
220 "from a std::type_info on this target"));
243 current_cp_abi = *abi;
254 _(
"Too many C++ ABIs, please increase "
255 "CP_ABI_MAX in cp-abi.c"));
267 char *new_longname, *new_doc;
272 _(
"Cannot find C++ ABI \"%s\" to set it as auto default."),
277 if (auto_cp_abi.
doc != NULL)
284 auto_cp_abi.
longname = new_longname;
286 new_doc =
xstrprintf (
"Automatically selected; currently \"%s\"",
288 auto_cp_abi.
doc = new_doc;
293 if (strcmp (current_cp_abi.
shortname,
"auto") == 0)
305 if (strcmp (cp_abis[i]->
shortname, short_name) == 0)
320 ui_out_text (uiout,
"The available C++ ABIs are:\n");
331 padcount = 16 - 2 - strlen (cp_abis[i]->shortname);
334 pad[--padcount] =
' ';
356 error (
_(
"Could not find \"%s\" in ABI list"), args);
363 const char *text,
const char *
word)
365 static const char **cp_abi_names;
367 if (cp_abi_names == NULL)
371 cp_abi_names = XNEWVEC (
const char *,
num_cp_abis + 1);
373 cp_abi_names[i] = cp_abis[i]->shortname;
374 cp_abi_names[i] = NULL;
377 return complete_on_enum (cp_abi_names, text, word);
387 ui_out_text (uiout,
"The currently selected C++ ABI is \"");
406 Set the ABI used for inspecting C++ objects.\n\
407 \"set cp-abi\" with no arguments will list the available ABIs."),
412 _(
"Show the ABI used for inspecting C++ objects."),
struct value * value_virtual_fn_field(struct value **arg1p, struct fn_field *f, int j, struct type *type, int offset)
int(* is_vtable_name)(const char *name)
static void show_cp_abi_cmd(char *args, int from_tty)
static struct cleanup * cleanup_chain
int cp_pass_by_reference(struct type *type)
static int switch_to_cp_abi(const char *short_name)
void internal_error(const char *file, int line, const char *fmt,...)
void set_cp_abi_as_auto_default(const char *short_name)
struct type * cplus_type_from_type_info(struct value *value)
int cplus_method_ptr_size(struct type *to_type)
int(* method_ptr_size)(struct type *)
enum ctor_kinds(* is_constructor_name)(const char *name)
void(* print_vtable)(struct value *)
initialize_file_ftype _initialize_cp_abi
char * cplus_typename_from_type_info(struct value *value)
void ui_out_text(struct ui_out *uiout, const char *string)
enum dtor_kinds(* is_destructor_name)(const char *name)
struct cmd_list_element * setlist
struct value *(* method_ptr_to_value)(struct value **, struct value *)
#define CATCH(EXCEPTION, MASK)
void initialize_file_ftype(void)
struct cleanup * make_cleanup_ui_out_tuple_begin_end(struct ui_out *uiout, const char *id)
int register_cp_abi(struct cp_abi_ops *abi)
void cplus_make_method_ptr(struct type *type, gdb_byte *contents, CORE_ADDR value, int is_virtual)
enum ctor_kinds is_constructor_name(const char *name)
struct type *(* get_type_from_type_info)(struct value *value)
struct value *(* get_typeid)(struct value *value)
void set_cmd_completer(struct cmd_list_element *cmd, completer_ftype *completer)
struct cmd_list_element * showlist
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **list)
struct type * cplus_typeid_type(struct gdbarch *gdbarch)
int is_vtable_name(const char *name)
static void set_cp_abi_cmd(char *args, int from_tty)
enum dtor_kinds is_destructor_name(const char *name)
int(* baseclass_offset)(struct type *type, int index, const bfd_byte *valaddr, int embedded_offset, CORE_ADDR address, const struct value *val)
int is_operator_name(const char *name)
char * xstrprintf(const char *format,...)
int baseclass_offset(struct type *type, int index, const gdb_byte *valaddr, int embedded_offset, CORE_ADDR address, const struct value *val)
static struct cp_abi_ops * find_cp_abi(const char *short_name)
void(* print_method_ptr)(const gdb_byte *contents, struct type *type, struct ui_file *stream)
void throw_exception(struct gdb_exception exception)
int(* is_operator_name)(const char *name)
void cplus_print_method_ptr(const gdb_byte *contents, struct type *type, struct ui_file *stream)
struct type * value_rtti_type(struct value *v, int *full, int *top, int *using_enc)
struct value * cplus_method_ptr_to_value(struct value **this_p, struct value *method_ptr)
static void list_cp_abis(int from_tty)
int(* pass_by_reference)(struct type *type)
static int ignore(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
char *(* get_typename_from_type_info)(struct value *value)
void(* make_method_ptr)(struct type *, gdb_byte *, CORE_ADDR, int)
void ui_out_field_string(struct ui_out *uiout, const char *fldname, const char *string)
void cplus_print_vtable(struct value *value)
struct type *(* rtti_type)(struct value *v, int *full, int *top, int *using_enc)
struct ui_out * current_uiout
void error(const char *fmt,...)
void throw_error(enum errors error, const char *fmt,...)
void do_cleanups(struct cleanup *old_chain)
struct value *(* virtual_fn_field)(struct value **arg1p, struct fn_field *f, int j, struct type *type, int offset)
CORE_ADDR(* skip_trampoline)(struct frame_info *, CORE_ADDR)
struct type *(* get_typeid_type)(struct gdbarch *gdbarch)
struct value * cplus_typeid(struct value *value)
CORE_ADDR cplus_skip_trampoline(struct frame_info *frame, CORE_ADDR stop_pc)