Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Thomas Richter <thor@mail.math.tu-berlin.de>
To: gdb-patches@sourceware.org
Subject: [PATCH] locate members in multiple-inheritance hierarchy
Date: Sun, 26 Feb 2006 22:48:00 -0000	[thread overview]
Message-ID: <200602262244.k1QMi4kk009927@mersenne.math.TU-Berlin.DE> (raw)

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


             reply	other threads:[~2006-02-26 22:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-26 22:48 Thomas Richter [this message]
2006-03-01 19:35 ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200602262244.k1QMi4kk009927@mersenne.math.TU-Berlin.DE \
    --to=thor@mail.math.tu-berlin.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox