This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] m32c-tdep.c: Don't choke on virtual functions in push_dummy_call
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Wed, 28 Jun 2006 17:32:55 -0400
- Subject: Re: [PATCH] m32c-tdep.c: Don't choke on virtual functions in push_dummy_call
- References: <20060628141839.GA29012@calimero.vinschen.de>
On Wed, Jun 28, 2006 at 04:18:39PM +0200, Corinna Vinschen wrote:
> Hi,
>
> the below patch fixes a couple of GDB internal errors when calling
> virtual C++ methods. Virtual methods are not represented as type
> TYPE_CODE_METHOD, but as TYPE_CODE_PTR pointing to TYPE_CODE_METHOD.
> The m32c_push_dummy_call function only checks the function type for
> TYPE_CODE_FUNC or TYPE_CODE_METHOD, which results in a failed assertion
> in case of virtual methods. The below patch skips TYPE_CODE_PTR types
> until it points to the actual TYPE_CODE_METHOD to evaluate further
> necessary data.
>
> Ok to apply?
In addition to Mark's question, which I am also curious about - did
anything in the testsuite catch this, or if not, how can we reproduce
it? - I am currently (i.e. right this moment) rewriting lots of this
stuff. You may wish to wait a little while - though be sure to poke me
about it if I don't have something to check in soon! It is all broken
anyway; GDB is not going to succeed at calling a virtual pointer, it's
going to go off into neverland.
--
Daniel Jacobowitz
CodeSourcery