diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-08-02 19:21:04 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-08-02 19:21:04 +0000 |
commit | ac88287fa27d888ae298e08d2572bc966887d8e0 (patch) | |
tree | 6a2525faa7856d7d19df2c16d6e48a9f047172c8 /gdb/gdbtypes.c | |
parent | 19d06401a48157fed653b6842b61d2db7060b03e (diff) | |
download | gdb-ac88287fa27d888ae298e08d2572bc966887d8e0.zip gdb-ac88287fa27d888ae298e08d2572bc966887d8e0.tar.gz gdb-ac88287fa27d888ae298e08d2572bc966887d8e0.tar.bz2 |
* gdbtypes.c (fill_in_vptr_fieldno): Call check_stub_type.
* gdbtypes.{c,h}: Improve comments on vptr_fieldno.
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r-- | gdb/gdbtypes.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 3710f39..bc7e257 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -749,13 +749,19 @@ lookup_struct_elt_type (type, name, noerr) return (struct type *)-1; /* For lint */ } -/* This function is really horrible, but to avoid it, there would need - to be more filling in of forward references. */ +/* If possible, make the vptr_fieldno and vptr_basetype fields of TYPE + valid. Callers should be aware that in some cases (for example, + the type or one of its baseclasses is a stub type and we are + debugging a .o file), this function will not be able to find the virtual + function table pointer, and vptr_fieldno will remain -1 and vptr_basetype + will remain NULL. */ void fill_in_vptr_fieldno (type) struct type *type; { + check_stub_type (type); + if (TYPE_VPTR_FIELDNO (type) < 0) { int i; |