aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1991-04-26 23:00:55 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1991-04-26 23:00:55 +0000
commit7cc4387940ab7594e38782cc41a78d9c79496c09 (patch)
tree72ec5300ee2ea1c40a8324190956864d4a1ea507
parent3577f9b46989f9e27093b62beaf4c0511183666d (diff)
downloadgdb-7cc4387940ab7594e38782cc41a78d9c79496c09.zip
gdb-7cc4387940ab7594e38782cc41a78d9c79496c09.tar.gz
gdb-7cc4387940ab7594e38782cc41a78d9c79496c09.tar.bz2
* symfile.c (fill_in_vptr_fieldno): Don't call check_stub_type.
Return void not int. (also declarations in symfile.h and value.h). Deal with multiple inheritance.
-rw-r--r--gdb/symfile.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 5241959..e1345db 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -681,18 +681,28 @@ reread_symbols ()
}
}
-
/* This function is really horrible, but to avoid it, there would need
to be more filling in of forward references. */
-int
+void
fill_in_vptr_fieldno (type)
struct type *type;
{
- check_stub_type (type);
if (TYPE_VPTR_FIELDNO (type) < 0)
- TYPE_VPTR_FIELDNO (type) =
- fill_in_vptr_fieldno (TYPE_BASECLASS (type, 1));
- return TYPE_VPTR_FIELDNO (type);
+ {
+ int i;
+ for (i = 1; i < TYPE_N_BASECLASSES (type); i++)
+ {
+ fill_in_vptr_fieldno (TYPE_BASECLASS (type, i));
+ if (TYPE_VPTR_FIELDNO (TYPE_BASECLASS (type, i)) >= 0)
+ {
+ TYPE_VPTR_FIELDNO (type)
+ = TYPE_VPTR_FIELDNO (TYPE_BASECLASS (type, i));
+ TYPE_VPTR_BASETYPE (type)
+ = TYPE_VPTR_BASETYPE (TYPE_BASECLASS (type, i));
+ break;
+ }
+ }
+ }
}
/* Functions to handle complaints during symbol reading. */