40 error (_(
"ABI doesn't define required function is_constructor_name"));
48 error (_(
"ABI doesn't define required function is_destructor_name"));
56 error (_(
"ABI doesn't define required function is_vtable_name"));
64 error (_(
"ABI doesn't define required function is_operator_name"));
70 LONGEST embedded_offset, CORE_ADDR address,
71 const struct value *val)
83 catch (
const gdb_exception_error &ex)
85 if (ex.error != NOT_AVAILABLE_ERROR)
88 throw_error (NOT_AVAILABLE_ERROR,
89 _(
"Cannot determine virtual baseclass offset "
90 "of incomplete object"));
109 LONGEST *top,
int *using_enc)
111 struct type *ret = NULL;
120 catch (
const gdb_exception_error &e)
134 error (_(
"GDB does not support pointers to methods on this target"));
142 error (_(
"GDB does not support pointers to methods on this target"));
148 CORE_ADDR
value,
int is_virtual)
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"));
255 internal_error (_(
"Too many C++ ABIs, please increase "
256 "CP_ABI_MAX in cp-abi.c"));
271 internal_error (_(
"Cannot find C++ ABI \"%s\" to set it as auto default."),
282 auto_cp_abi.
doc = xstrprintf (
"Automatically selected; currently \"%s\"",
314 uiout->
text (
"The available C++ ABIs are:\n");
324 padcount = 16 - 2 - strlen (
cp_abis[i]->shortname);
327 pad[--padcount] =
' ';
348 error (_(
"Could not find \"%s\" in ABI list"), args);
356 const char *
text,
const char *word)
358 static const char **cp_abi_names;
360 if (cp_abi_names == NULL)
364 cp_abi_names = XNEWVEC (
const char *,
num_cp_abis + 1);
366 cp_abi_names[i] =
cp_abis[i]->shortname;
367 cp_abi_names[i] = NULL;
380 uiout->
text (
"The currently selected C++ ABI is \"");
383 uiout->
text (
"\" (");
385 uiout->
text (
").\n");
398Set the ABI used for inspecting C++ objects.\n\
399\"set cp-abi\" with no arguments will list the available ABIs."),
404 _(
"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 * type() const