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"));
69 LONGEST embedded_offset, CORE_ADDR address,
70 const struct value *val)
82 catch (
const gdb_exception_error &ex)
84 if (ex.error != NOT_AVAILABLE_ERROR)
87 throw_error (NOT_AVAILABLE_ERROR,
88 _(
"Cannot determine virtual baseclass offset "
89 "of incomplete object"));
108 LONGEST *top,
int *using_enc)
110 struct type *ret = NULL;
119 catch (
const gdb_exception_error &e)
133 error (_(
"GDB does not support pointers to methods on this target"));
141 error (_(
"GDB does not support pointers to methods on this target"));
147 CORE_ADDR
value,
int is_virtual)
150 error (_(
"GDB does not support pointers to methods on this target"));
165 struct value *method_ptr)
168 error (_(
"GDB does not support pointers to methods on this target"));
178 error (_(
"GDB cannot print the vtable on this target"));
188 error (_(
"GDB cannot find the typeid on this target"));
198 error (_(
"GDB cannot find the type for 'typeid' on this target"));
208 error (_(
"GDB cannot find the type from a std::type_info on this target"));
218 error (_(
"GDB cannot find the type name "
219 "from a std::type_info on this target"));
254 internal_error (_(
"Too many C++ ABIs, please increase "
255 "CP_ABI_MAX in cp-abi.c"));
270 internal_error (_(
"Cannot find C++ ABI \"%s\" to set it as auto default."),
281 auto_cp_abi.
doc = xstrprintf (
"Automatically selected; currently \"%s\"",
313 uiout->
text (
"The available C++ ABIs are:\n");
323 padcount = 16 - 2 - strlen (
cp_abis[i]->shortname);
326 pad[--padcount] =
' ';
347 error (_(
"Could not find \"%s\" in ABI list"), args);
355 const char *
text,
const char *word)
357 static const char **cp_abi_names;
359 if (cp_abi_names == NULL)
363 cp_abi_names = XNEWVEC (
const char *,
num_cp_abis + 1);
365 cp_abi_names[i] =
cp_abis[i]->shortname;
366 cp_abi_names[i] = NULL;
379 uiout->
text (
"The currently selected C++ ABI is \"");
382 uiout->
text (
"\" (");
384 uiout->
text (
").\n");
397Set the ABI used for inspecting C++ objects.\n\
398\"set cp-abi\" with no arguments will list the available ABIs."),
403 _(
"Show the ABI used for inspecting C++ objects."),
void field_string(const char *fldname, const char *string, const ui_file_style &style=ui_file_style())
void text(const char *string)
struct cmd_list_element * showlist
struct cmd_list_element * setlist
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **list)
void set_cmd_completer(struct cmd_list_element *cmd, completer_ftype *completer)
void complete_on_enum(completion_tracker &tracker, const char *const *enumlist, const char *text, const char *word)
static struct cp_abi_ops auto_cp_abi
std::string cplus_typename_from_type_info(struct value *value)
static void cp_abi_completer(struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
int is_operator_name(const char *name)
struct value * value_virtual_fn_field(struct value **arg1p, struct fn_field *f, int j, struct type *type, int offset)
void cplus_print_vtable(struct value *value)
void _initialize_cp_abi()
struct value * cplus_method_ptr_to_value(struct value **this_p, struct value *method_ptr)
static void set_cp_abi_cmd(const char *args, int from_tty)
static void show_cp_abi_cmd(const char *args, int from_tty)
int register_cp_abi(struct cp_abi_ops *abi)
struct type * cplus_typeid_type(struct gdbarch *gdbarch)
int cplus_method_ptr_size(struct type *to_type)
struct language_pass_by_ref_info cp_pass_by_reference(struct type *type)
enum dtor_kinds is_destructor_name(const char *name)
static struct cp_abi_ops current_cp_abi
void cplus_print_method_ptr(const gdb_byte *contents, struct type *type, struct ui_file *stream)
static int switch_to_cp_abi(const char *short_name)
enum ctor_kinds is_constructor_name(const char *name)
void cplus_make_method_ptr(struct type *type, gdb_byte *contents, CORE_ADDR value, int is_virtual)
int baseclass_offset(struct type *type, int index, const gdb_byte *valaddr, LONGEST embedded_offset, CORE_ADDR address, const struct value *val)
void set_cp_abi_as_auto_default(const char *short_name)
struct type * value_rtti_type(struct value *v, int *full, LONGEST *top, int *using_enc)
struct type * cplus_type_from_type_info(struct value *value)
static void list_cp_abis(int from_tty)
int is_vtable_name(const char *name)
CORE_ADDR cplus_skip_trampoline(frame_info_ptr frame, CORE_ADDR stop_pc)
static struct cp_abi_ops * find_cp_abi(const char *short_name)
struct value * cplus_typeid(struct value *value)
static struct cp_abi_ops * cp_abis[CP_ABI_MAX]
struct type * check_typedef(struct type *type)
#define HAVE_CPLUS_STRUCT(type)
int(* method_ptr_size)(struct type *)
CORE_ADDR(* skip_trampoline)(frame_info_ptr, CORE_ADDR)
struct type *(* get_typeid_type)(struct gdbarch *gdbarch)
struct type *(* get_type_from_type_info)(struct value *value)
void(* make_method_ptr)(struct type *, gdb_byte *, CORE_ADDR, int)
int(* baseclass_offset)(struct type *type, int index, const bfd_byte *valaddr, LONGEST embedded_offset, CORE_ADDR address, const struct value *val)
struct value *(* method_ptr_to_value)(struct value **, struct value *)
int(* is_vtable_name)(const char *name)
enum ctor_kinds(* is_constructor_name)(const char *name)
struct value *(* virtual_fn_field)(struct value **arg1p, struct fn_field *f, int j, struct type *type, int offset)
enum dtor_kinds(* is_destructor_name)(const char *name)
void(* print_vtable)(struct value *)
int(* is_operator_name)(const char *name)
struct language_pass_by_ref_info(* pass_by_reference)(struct type *type)
std::string(* get_typename_from_type_info)(struct value *value)
struct value *(* get_typeid)(struct value *value)
void(* print_method_ptr)(const gdb_byte *contents, struct type *type, struct ui_file *stream)
struct type *(* rtti_type)(struct value *v, int *full, LONGEST *top, int *using_enc)
struct type * value_type(const struct value *value)