* gdbtypes.c (get_vptr_fieldno): Renamed from fill_in_vptr_fieldno.
	Return basetype, fieldno if found.  All callers updated.
	Don't cache TYPE_VPTR_FIELDNO, TYPE_VPTR_BASETYPE if from different
	objfile.
	* gdbtypes.h (get_vptr_fieldno): Renamed from fill_in_vptr_fieldno.
	* symfile.h (fill_in_vptr_fieldno): Delete.

	* gdb.cp/gdb2384.exp: New file.
	* gdb.cp/gdb2384.cc: New file.
	* gdb.cp/gdb2384-base.h: New file.
	* gdb.cp/gdb2384-base.cc: New file.
This commit is contained in:
Doug Evans
2008-02-03 22:13:30 +00:00
parent cda4ce5a10
commit 81fe80802c
11 changed files with 224 additions and 38 deletions

View File

@@ -375,7 +375,9 @@ struct main_type
/* Field number of the virtual function table pointer in
VPTR_BASETYPE. If -1, we were unable to find the virtual
function table pointer in initial symbol reading, and
fill_in_vptr_fieldno should be called to find it if possible.
get_vptr_fieldno should be called to find it if possible.
get_vptr_fieldno will update this field if possible.
Otherwise the value is left at -1.
Unused if this type does not have virtual functions. */
@@ -1274,7 +1276,7 @@ extern struct type *lookup_typename (char *, struct block *, int);
extern struct type *lookup_template_type (char *, struct type *,
struct block *);
extern void fill_in_vptr_fieldno (struct type *);
extern int get_vptr_fieldno (struct type *, struct type **);
extern int get_destructor_fn_field (struct type *, int *, int *);