aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2015-02-26 17:31:29 -0800
committerDoug Evans <dje@google.com>2015-02-26 17:31:29 -0800
commit0def5aaad6a89e78f09cef2b95635dc3254ce304 (patch)
tree22dd04767ffb22e3eac010b00c86c03c682bdb6d /gdb/gdbtypes.c
parent330b17b30f85b091a214c2987de5dfef1e9733ac (diff)
downloadfsf-binutils-gdb-0def5aaad6a89e78f09cef2b95635dc3254ce304.zip
fsf-binutils-gdb-0def5aaad6a89e78f09cef2b95635dc3254ce304.tar.gz
fsf-binutils-gdb-0def5aaad6a89e78f09cef2b95635dc3254ce304.tar.bz2
Add missing CHECK_TYPEDEF calls to recent vptr_{fieldno,basetype} cleanup.
gdb/ChangeLog: * gdbtypes.c (internal_type_vptr_fieldno): Add missing call to CHECK_TYPEDEF. (set_type_vptr_fieldno): Ditto. (internal_type_vptr_basetype, set_type_vptr_basetype): Ditto. * gnu-v3-abi.c (gnuv3_dynamic_class): Ditto. gdb/testsuite/ChangeLog: * gdb.cp/class2.cc (Dbase, D): New classes. (main): New local delta. * gdb.cp/class2.exp: Test printing delta. * gdb.cp/classes.cc (DynamicBase2, DynamicBar): New classes. (dynbar): New global. * gdb.cp/classes.exp (test_ptype_class_objects): Test ptype DynamicBar.
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r--gdb/gdbtypes.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index a80151c..ebb047f 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -1636,6 +1636,7 @@ get_signed_type_minmax (struct type *type, LONGEST *min, LONGEST *max)
int
internal_type_vptr_fieldno (struct type *type)
{
+ CHECK_TYPEDEF (type);
gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT
|| TYPE_CODE (type) == TYPE_CODE_UNION);
if (!HAVE_CPLUS_STRUCT (type))
@@ -1648,6 +1649,7 @@ internal_type_vptr_fieldno (struct type *type)
void
set_type_vptr_fieldno (struct type *type, int fieldno)
{
+ CHECK_TYPEDEF (type);
gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT
|| TYPE_CODE (type) == TYPE_CODE_UNION);
if (!HAVE_CPLUS_STRUCT (type))
@@ -1661,6 +1663,7 @@ set_type_vptr_fieldno (struct type *type, int fieldno)
struct type *
internal_type_vptr_basetype (struct type *type)
{
+ CHECK_TYPEDEF (type);
gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT
|| TYPE_CODE (type) == TYPE_CODE_UNION);
gdb_assert (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_CPLUS_STUFF);
@@ -1672,6 +1675,7 @@ internal_type_vptr_basetype (struct type *type)
void
set_type_vptr_basetype (struct type *type, struct type *basetype)
{
+ CHECK_TYPEDEF (type);
gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT
|| TYPE_CODE (type) == TYPE_CODE_UNION);
if (!HAVE_CPLUS_STRUCT (type))