From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27439 invoked by alias); 10 Dec 2009 19:13:51 -0000 Received: (qmail 27429 invoked by uid 22791); 10 Dec 2009 19:13:51 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Dec 2009 19:13:43 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id D8B9F10D91; Thu, 10 Dec 2009 19:13:41 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id B9A3E1078C; Thu, 10 Dec 2009 19:13:41 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1NIoSK-00051u-Ja; Thu, 10 Dec 2009 14:13:40 -0500 Date: Thu, 10 Dec 2009 19:13:00 -0000 From: Daniel Jacobowitz To: Tom Tromey Cc: Chris Moller , gdb-patches@sourceware.org Subject: Re: Patch for PR 9399 Message-ID: <20091210191340.GA19057@caradoc.them.org> Mail-Followup-To: Tom Tromey , Chris Moller , gdb-patches@sourceware.org References: <4B1FA6F2.1060105@redhat.com> <20091209140534.GA12330@caradoc.them.org> <4B1FBDF4.4040801@redhat.com> <20091210184102.GA16828@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-12/txt/msg00149.txt.bz2 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