diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2009-06-29 13:24:41 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2009-06-29 13:24:41 +0000 |
commit | 2497b4984582be980b40913ef1bf561ccad2f265 (patch) | |
tree | 3c63910f2617b06eb5f73bc95326f6eb7b73720a /gdb/gnu-v3-abi.c | |
parent | 0c8b41f1c6ca809238df5662ea5f45e5f7a29121 (diff) | |
download | gdb-2497b4984582be980b40913ef1bf561ccad2f265.zip gdb-2497b4984582be980b40913ef1bf561ccad2f265.tar.gz gdb-2497b4984582be980b40913ef1bf561ccad2f265.tar.bz2 |
* value.h (value_subscript, value_subscripted_rvalue,
value_bitstring_subscript, value_ptradd): Use LONGEST instead
of value as type of the index argument.
(value_ptrsub): Remove.
* valarith.c (value_subscript, value_subscripted_rvalue,
value_bitstring_subscript, value_ptradd): Use LONGEST instead
of value as type of the index argument.
(value_ptrsub): Remove.
* wrapper.h (gdb_value_subscript): Use LONGEST instead of
value as type of the index argument.
* wrapper.c (gdb_value_subscript): Likewise.
Update calls to gdb_value_subscript, value_subscript,
value_subscripted_rvalue, value_bitstring_subscript and
value_ptradd to use LONGEST instead of value as index
argument type. Use value_ptradd instead of value_ptrsub.
* ada-lang.c (ada_value_subscript, ada_value_ptr_subscript,
ada_tag_name_2): Update.
* ada-tasks.c (read_atcb): Update.
* eval.c (evaluate_subexp_standard): Update.
* valarith.c (value_subscript): Update.
* gnu-v2-abi.c (gnuv2_virtual_fn_field): Update.
* gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
gnuv3_method_ptr_to_value): Update.
* jv-lang.c (evaluate_subexp_java): Update.
* m2-lang.c (evaluate_subexp_modula2): Update.
* python/python-value.c (valpy_getitem, valpy_binop): Update.
* wrapper.c (gdb_value_subscript): Update.
* varobj.c (c_describe_child): Update.
Diffstat (limited to 'gdb/gnu-v3-abi.c')
-rw-r--r-- | gdb/gnu-v3-abi.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index ece910b..6613e75 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -359,7 +359,7 @@ gnuv3_get_virtual_fn (struct gdbarch *gdbarch, struct value *container, /* Fetch the appropriate function pointer from the vtable. */ vfn = value_subscript (value_field (vtable, vtable_field_virtual_functions), - value_from_longest (builtin_type_int32, vtable_index)); + vtable_index); /* If this architecture uses function descriptors directly in the vtable, then the address of the vtable entry is actually a "function pointer" @@ -419,7 +419,7 @@ gnuv3_baseclass_offset (struct type *type, int index, const bfd_byte *valaddr, struct type *ptr_type; struct value *vtable; struct type *vbasetype; - struct value *offset_val, *vbase_array; + struct value *vbase_array; CORE_ADDR vtable_address; long int cur_base_offset, base_offset; int vbasetype_vptr_fieldno; @@ -471,9 +471,8 @@ gnuv3_baseclass_offset (struct type *type, int index, const bfd_byte *valaddr, vtable = value_at_lazy (vtable_type, vtable_address - vtable_address_point_offset (gdbarch)); - offset_val = value_from_longest (builtin_type_int32, cur_base_offset); vbase_array = value_field (vtable, vtable_field_vcall_and_vbase_offsets); - base_offset = value_as_long (value_subscript (vbase_array, offset_val)); + base_offset = value_as_long (value_subscript (vbase_array, cur_base_offset)); return base_offset; } @@ -691,7 +690,6 @@ gnuv3_method_ptr_to_value (struct value **this_p, struct value *method_ptr) CORE_ADDR ptr_value; struct type *domain_type, *final_type, *method_type; LONGEST adjustment; - struct value *adjval; int vbit; domain_type = TYPE_DOMAIN_TYPE (check_typedef (value_type (method_ptr))); @@ -723,9 +721,7 @@ gnuv3_method_ptr_to_value (struct value **this_p, struct value *method_ptr) You can provoke this case by casting a Base::* to a Derived::*, for instance. */ *this_p = value_cast (builtin_type (gdbarch)->builtin_data_ptr, *this_p); - adjval = value_from_longest (builtin_type (gdbarch)->builtin_long, - adjustment); - *this_p = value_ptradd (*this_p, adjval); + *this_p = value_ptradd (*this_p, adjustment); *this_p = value_cast (final_type, *this_p); if (vbit) |