This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] m32c-tdep.c: Don't choke on virtual functions in push_dummy_call


> Date: Wed, 28 Jun 2006 16:18:39 +0200
> From: Corinna Vinschen <vinschen@redhat.com>
> 
> 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?

Hmm, I don't understand why this is a m32c-specific problem.
Shouldn't this be handled in generic code instead?

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]