diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-11 14:24:28 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-11 14:24:28 +0000 |
commit | ad4820ab42603b59ee496405ce0baa7276a0f537 (patch) | |
tree | c1f541d5b64e7c4e33f4ee3f61385f6a1e60e440 /gdb/cp-valprint.c | |
parent | 5ed92fa89a78886c28ecf48a5debdd6a1513bdbf (diff) | |
download | gdb-ad4820ab42603b59ee496405ce0baa7276a0f537.zip gdb-ad4820ab42603b59ee496405ce0baa7276a0f537.tar.gz gdb-ad4820ab42603b59ee496405ce0baa7276a0f537.tar.bz2 |
* cp-abi.h (cplus_method_ptr_size): Add TO_TYPE parameter.
(cplus_make_method_ptr): Add TYPE parameter.
* cp-abi.c (cplus_method_ptr_size): Add TO_TYPE parameter. Pass it
on to current_cp_abi.method_ptr_size callback.
(cplus_make_method_ptr): Add TYPE parameter. Pass it on to
current_cp_abi.make_method_ptr callback.
* gdbtypes.c (lookup_methodptr_type): Pass target type
argument to cplus_method_ptr_size.
* valops.c (value_cast): Pass type argument to cplus_make_method_ptr.
(value_struct_elt_for_reference): Likewise.
* gnu-v3-abi.c (get_class_arch): New function.
(vtable_address_point_offset): Add GDBARCH parameter. Use it
instead of current_gdbarch. Update all callers.
(gnuv3_get_vtable): Likewise.
(gnuv3_get_virtual_fn): Likewise.
(gnuv3_decode_method_ptr): Likewise.
(gnuv3_rtti_type): Call get_class_arch to determine architecture.
Use it instead of current_gdbarch.
(gnuv3_virtual_fn_field): Likewise.
(gnuv3_baseclass_offset): Likewise.
(gnuv3_print_method_ptr): Likewise.
(gnuv3_method_ptr_to_value): Likewise.
(gnuv3_method_ptr_size): Add TYPE parameter. Use it to determine
class architecture. Use architecture types instead of builtin types.
(gnuv3_make_method_ptr): Likewise.
* cp-valprint.c (cp_print_class_member): Expect pointer type
instead of class type. Use its length when extracting value.
* c-valprint.c (c_val_print): Update call to cp_print_class_member.
Diffstat (limited to 'gdb/cp-valprint.c')
-rw-r--r-- | gdb/cp-valprint.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index 85f673d..4d91319 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -538,16 +538,16 @@ cp_find_class_member (struct type **domain_p, int *fieldno, } void -cp_print_class_member (const gdb_byte *valaddr, struct type *domain, +cp_print_class_member (const gdb_byte *valaddr, struct type *type, struct ui_file *stream, char *prefix) { /* VAL is a byte offset into the structure type DOMAIN. Find the name of the field for that offset and print it. */ + struct type *domain = TYPE_DOMAIN_TYPE (type); + LONGEST val = extract_signed_integer (valaddr, TYPE_LENGTH (type)); unsigned int fieldno; - LONGEST val = unpack_long (builtin_type_long, valaddr); - /* Pointers to data members are usually byte offsets into an object. Because a data member can have offset zero, and a NULL pointer to member must be distinct from any valid non-NULL pointer to |