aboutsummaryrefslogtreecommitdiff
path: root/gdb/gnu-v3-abi.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-11-12 21:45:08 +0000
committerAndrew Cagney <cagney@redhat.com>2004-11-12 21:45:08 +0000
commitdf407dfe2e8452c0a3edfcf50d55942ff0273433 (patch)
tree11b770a7071b50d36d54f0e817d8c8c4f60ce076 /gdb/gnu-v3-abi.c
parent69e5711542042a5b591907f8f96d28fd8d2c3c17 (diff)
downloadgdb-df407dfe2e8452c0a3edfcf50d55942ff0273433.zip
gdb-df407dfe2e8452c0a3edfcf50d55942ff0273433.tar.gz
gdb-df407dfe2e8452c0a3edfcf50d55942ff0273433.tar.bz2
2004-11-12 Andrew Cagney <cagney@gnu.org>
* value.h (VALUE_TYPE, VALUE_NEXT, VALUE_OFFSET, VALUE_BITSIZE) (VALUE_BITPOS): Delete. (value_type, value_offset, value_bitsize, value_bitpos): Declare. * value.c (value_type, value_offset, value_bitpos) (value_bitsize): New functions. Update references. * arm-tdep.c, gnu-v3-abi.c, hpacc-abi.c, gnu-v2-abi.c: Update. * f-valprint.c, cp-valprint.c, c-valprint.c: Update. * ada-valprint.c, typeprint.c, scm-valprint.c, scm-exp.c: Update. * p-valprint.c, jv-valprint.c, jv-lang.c, varobj.c: Update. * objc-lang.c, ada-lang.c, std-regs.c, stack.c: Update. * infcall.c, linespec.c, printcmd.c, valarith.c: Update. * valops.c, eval.c, findvar.c, breakpoint.c: Update. * tracepoint.c, ax-gdb.c, mi/mi-main.c, cli/cli-dump.c: * rs6000-tdep.c, ppc-sysv-tdep.c: Update.
Diffstat (limited to 'gdb/gnu-v3-abi.c')
-rw-r--r--gdb/gnu-v3-abi.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
index bf5218b..3fead2a 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -191,7 +191,7 @@ gnuv3_rtti_type (struct value *value,
{
struct type *vtable_type = gdbarch_data (current_gdbarch,
vtable_type_gdbarch_data);
- struct type *value_type = check_typedef (VALUE_TYPE (value));
+ struct type *values_type = check_typedef (value_type (value));
CORE_ADDR vtable_address;
struct value *vtable;
struct minimal_symbol *vtable_symbol;
@@ -202,13 +202,13 @@ gnuv3_rtti_type (struct value *value,
LONGEST offset_to_top;
/* We only have RTTI for class objects. */
- if (TYPE_CODE (value_type) != TYPE_CODE_CLASS)
+ if (TYPE_CODE (values_type) != TYPE_CODE_CLASS)
return NULL;
- /* If we can't find the virtual table pointer for value_type, we
+ /* If we can't find the virtual table pointer for values_type, we
can't find the RTTI. */
- fill_in_vptr_fieldno (value_type);
- if (TYPE_VPTR_FIELDNO (value_type) == -1)
+ fill_in_vptr_fieldno (values_type);
+ if (TYPE_VPTR_FIELDNO (values_type) == -1)
return NULL;
if (using_enc_p)
@@ -216,22 +216,22 @@ gnuv3_rtti_type (struct value *value,
/* Fetch VALUE's virtual table pointer, and tweak it to point at
an instance of our imaginary gdb_gnu_v3_abi_vtable structure. */
- base_type = check_typedef (TYPE_VPTR_BASETYPE (value_type));
- if (value_type != base_type)
+ base_type = check_typedef (TYPE_VPTR_BASETYPE (values_type));
+ if (values_type != base_type)
{
value = value_cast (base_type, value);
if (using_enc_p)
*using_enc_p = 1;
}
vtable_address
- = value_as_address (value_field (value, TYPE_VPTR_FIELDNO (value_type)));
+ = value_as_address (value_field (value, TYPE_VPTR_FIELDNO (values_type)));
vtable = value_at_lazy (vtable_type,
vtable_address - vtable_address_point_offset ());
/* Find the linker symbol for this vtable. */
vtable_symbol
= lookup_minimal_symbol_by_pc (VALUE_ADDRESS (vtable)
- + VALUE_OFFSET (vtable)
+ + value_offset (vtable)
+ VALUE_EMBEDDED_OFFSET (vtable));
if (! vtable_symbol)
return NULL;
@@ -246,7 +246,7 @@ gnuv3_rtti_type (struct value *value,
|| strncmp (vtable_symbol_name, "vtable for ", 11))
{
warning ("can't find linker symbol for virtual table for `%s' value",
- TYPE_NAME (value_type));
+ TYPE_NAME (values_type));
if (vtable_symbol_name)
warning (" found `%s' instead", vtable_symbol_name);
return NULL;
@@ -283,14 +283,14 @@ gnuv3_virtual_fn_field (struct value **value_p,
struct type *vtable_type = gdbarch_data (current_gdbarch,
vtable_type_gdbarch_data);
struct value *value = *value_p;
- struct type *value_type = check_typedef (VALUE_TYPE (value));
+ struct type *values_type = check_typedef (value_type (value));
struct type *vfn_base;
CORE_ADDR vtable_address;
struct value *vtable;
struct value *vfn;
/* Some simple sanity checks. */
- if (TYPE_CODE (value_type) != TYPE_CODE_CLASS)
+ if (TYPE_CODE (values_type) != TYPE_CODE_CLASS)
error ("Only classes can have virtual functions.");
/* Find the base class that defines this virtual function. */
@@ -314,7 +314,7 @@ gnuv3_virtual_fn_field (struct value **value_p,
/* Now that we know which base class is defining our virtual
function, cast our value to that baseclass. This takes care of
any necessary `this' adjustments. */
- if (vfn_base != value_type)
+ if (vfn_base != values_type)
value = value_cast (vfn_base, value);
/* Now value is an object of the appropriate base type. Fetch its