Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] locate members in multiple-inheritance hierarchy
@ 2006-02-26 22:48 Thomas Richter
  2006-03-01 19:35 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Richter @ 2006-02-26 22:48 UTC (permalink / raw)
  To: gdb-patches

Hi folks,

sorry to say that gdb-6.4 has (just another) bug in locating class members in multiple-inheritance class
hierarchies. The bug seems to be in lookup_struct_elt_type(), gdbtypes.c, lines 1234ff.

Specifically, this code *aborts* the scan by means of "noerr" when detecting a subclass that
does not contain the member being searched for. However, it should instead continue to search
subclasses.

To fix this problem, replace the for-loop over base classes in gdbtypes.c, lines 1234 by
the following:

  for (i = TYPE_N_BASECLASSES (type) - 1; i1 >= 0; i--)
    {
      struct type *t = check_typedef (TYPE_BASECLASS (type, i)); 
      /* FIX: THOR (25.2.2006):
      ** must check for typedefs, must not error on first tried subclass.
      */
      
      t = lookup_struct_elt_type (t , name, 1 /*noerr*/);
      if (t != NULL)
	{
	  return t;
	}
    }

So long,
	Thomas


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-03-01 19:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-26 22:48 [PATCH] locate members in multiple-inheritance hierarchy Thomas Richter
2006-03-01 19:35 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox