This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Patch for PR 9399
No, I think the patch is fine to go in.
On Thu, Dec 10, 2009 at 12:04:09PM -0700, Tom Tromey wrote:
> I think from value_cast_structs:
>
> /* Downcasting: look in the type of the target to see if it contains the
> type of the source as a superclass. If so, we'll need to
> offset the pointer rather than just change its type.
> FIXME: This fails silently with virtual inheritance. */
>
> ... but this doesn't fail silently, it tries to dereference NULL, due to
> the use of value_zero. IIRC.
I see now. This is just lame. We should be able to ask this question
about the static type of the target - possibly the easiest way to do
that is to special-case the NULL vptr. I probably wrote that.
--
Daniel Jacobowitz
CodeSourcery