mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 18:10:46 +00:00
PR c++/9065:
* NEWS: Update. * breakpoint.c (watchpoint_exp_is_const): Add OP_TYPEID. * c-exp.y (TYPEID): New token. (exp): Add new TYPEID productions. (ident_tokens): Add "typeid". * cp-abi.c (cplus_typeid, cplus_typeid_type): New functions. * cp-abi.h (cplus_typeid, cplus_typeid_type): Declare. (struct cp_abi_ops) <get_typeid, get_typeid_type>: New fields. * eval.c (evaluate_subexp_standard) <OP_TYPEID>: New case. * expprint.c (dump_subexp_body_standard) <OP_TYPEID>: New case. * gnu-v3-abi.c (std_type_info_gdbarch_data): New global. (build_std_type_info_type, gnuv3_get_typeid_type) (gnuv3_get_typeid): New functions. (init_gnuv3_ops): Initialize std_type_info_gdbarch_data. Set new fields on ABI object. * parse.c (operator_length_standard) <OP_TYPEID>: New case. * std-operator.def (OP_TYPEID): New. gdb/testsuite * gdb.cp/typeid.cc: New file. * gdb.cp/typeid.exp: New file.
This commit is contained in:
12
gdb/cp-abi.h
12
gdb/cp-abi.h
@@ -178,6 +178,16 @@ void cplus_make_method_ptr (struct type *type, gdb_byte *CONTENTS,
|
||||
|
||||
void cplus_print_vtable (struct value *value);
|
||||
|
||||
/* Implement 'typeid': find the type info for VALUE, if possible. If
|
||||
the type info cannot be found, throw an exception. */
|
||||
|
||||
extern struct value *cplus_typeid (struct value *value);
|
||||
|
||||
/* Return the type of 'typeid' for the current C++ ABI on the given
|
||||
architecture. */
|
||||
|
||||
extern struct type *cplus_typeid_type (struct gdbarch *gdbarch);
|
||||
|
||||
/* Determine if we are currently in a C++ thunk. If so, get the
|
||||
address of the routine we are thunking to and continue to there
|
||||
instead. */
|
||||
@@ -219,6 +229,8 @@ struct cp_abi_ops
|
||||
struct value * (*method_ptr_to_value) (struct value **,
|
||||
struct value *);
|
||||
void (*print_vtable) (struct value *);
|
||||
struct value *(*get_typeid) (struct value *value);
|
||||
struct type *(*get_typeid_type) (struct gdbarch *gdbarch);
|
||||
CORE_ADDR (*skip_trampoline) (struct frame_info *, CORE_ADDR);
|
||||
int (*pass_by_reference) (struct type *type);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user