2002-08-19 David Carlton <carlton@math.stanford.edu>
* gnu-v2-abi.c (gnuv2_value_rtti_type): Eliminate test for being enclosed. Fix PR gdb/574.
This commit is contained in:
parent
fcaffe4c2a
commit
2a73a662d6
2 changed files with 3 additions and 22 deletions
|
@ -1,5 +1,7 @@
|
||||||
2002-08-19 David Carlton <carlton@math.stanford.edu>
|
2002-08-19 David Carlton <carlton@math.stanford.edu>
|
||||||
|
|
||||||
|
* gnu-v2-abi.c (gnuv2_value_rtti_type): Eliminate test for being
|
||||||
|
enclosed. Fix PR gdb/574.
|
||||||
* MAINTAINERS: Add self to Write After Approval list.
|
* MAINTAINERS: Add self to Write After Approval list.
|
||||||
|
|
||||||
2002-08-19 Andrew Cagney <ac131313@redhat.com>
|
2002-08-19 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
|
@ -189,7 +189,6 @@ gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
|
||||||
struct type *rtti_type;
|
struct type *rtti_type;
|
||||||
CORE_ADDR coreptr;
|
CORE_ADDR coreptr;
|
||||||
struct value *vp;
|
struct value *vp;
|
||||||
int using_enclosing = 0;
|
|
||||||
long top_offset = 0;
|
long top_offset = 0;
|
||||||
char rtti_type_name[256];
|
char rtti_type_name[256];
|
||||||
CORE_ADDR vtbl;
|
CORE_ADDR vtbl;
|
||||||
|
@ -244,25 +243,7 @@ gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
|
||||||
if (VALUE_ADDRESS (value_field (v, TYPE_VPTR_FIELDNO (known_type))) == 0)
|
if (VALUE_ADDRESS (value_field (v, TYPE_VPTR_FIELDNO (known_type))) == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/*
|
vtbl=value_as_address(value_field(v,TYPE_VPTR_FIELDNO(known_type)));
|
||||||
If we are enclosed by something that isn't us, adjust the
|
|
||||||
address properly and set using_enclosing.
|
|
||||||
*/
|
|
||||||
if (VALUE_ENCLOSING_TYPE(v) != VALUE_TYPE(v))
|
|
||||||
{
|
|
||||||
struct value *tempval;
|
|
||||||
int bitpos = TYPE_BASECLASS_BITPOS (known_type,
|
|
||||||
TYPE_VPTR_FIELDNO (known_type));
|
|
||||||
tempval=value_field (v, TYPE_VPTR_FIELDNO(known_type));
|
|
||||||
VALUE_ADDRESS(tempval) += bitpos / 8;
|
|
||||||
vtbl=value_as_address (tempval);
|
|
||||||
using_enclosing=1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
vtbl=value_as_address(value_field(v,TYPE_VPTR_FIELDNO(known_type)));
|
|
||||||
using_enclosing=0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Try to find a symbol that is the vtable */
|
/* Try to find a symbol that is the vtable */
|
||||||
minsym=lookup_minimal_symbol_by_pc(vtbl);
|
minsym=lookup_minimal_symbol_by_pc(vtbl);
|
||||||
|
@ -304,8 +285,6 @@ gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
|
||||||
if (full)
|
if (full)
|
||||||
*full=1;
|
*full=1;
|
||||||
}
|
}
|
||||||
if (using_enc)
|
|
||||||
*using_enc=using_enclosing;
|
|
||||||
|
|
||||||
return rtti_type;
|
return rtti_type;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue