This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Bug Fix: make_cv_type
- From: Jim Ingham <jingham at apple dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 12 May 2004 15:24:16 -0700
- Subject: Bug Fix: make_cv_type
make_cv_type actually gets called in two ways that require it to fix up
an unresolved type which could potentially get its complete type from
another objfile. One is then the input type is a stub. The other is
when the input type is an opaque type (TYPE_IS_OPAQUE). For an
instance of the latter, see check_typedef where is calls
lookup_transparent_type when it sees an opaque type.
But the second case in not accounted for in the gdb_assert in
make_cv_type. It should read:
Index: gdbtypes.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.c,v
retrieving revision 1.82
diff -p -p -r1.82 gdbtypes.c
*** gdbtypes.c 9 Mar 2004 17:08:25 -0000 1.82
--- gdbtypes.c 12 May 2004 22:18:34 -0000
*************** make_cv_type (int cnst, int voltl, struc
*** 525,531 ****
to do is to copy the core type into the new objfile. */
gdb_assert (TYPE_OBJFILE (*typeptr) == TYPE_OBJFILE (type)
! || TYPE_STUB (*typeptr));
if (TYPE_OBJFILE (*typeptr) != TYPE_OBJFILE (type))
{
TYPE_MAIN_TYPE (*typeptr)
--- 525,531 ----
to do is to copy the core type into the new objfile. */
gdb_assert (TYPE_OBJFILE (*typeptr) == TYPE_OBJFILE (type)
! || (TYPE_STUB (*typeptr) || TYPE_IS_OPAQUE
(*typeptr)));
if (TYPE_OBJFILE (*typeptr) != TYPE_OBJFILE (type))
{
TYPE_MAIN_TYPE (*typeptr)
Jim
--
Jim Ingham jingham@apple.com
Developer Tools
Apple Computer