From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4785 invoked by alias); 19 Feb 2004 22:53:26 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4255 invoked from network); 19 Feb 2004 22:44:17 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 19 Feb 2004 22:44:17 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i1JMiGb06115 for ; Thu, 19 Feb 2004 17:44:16 -0500 Received: from zenia.home.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i1JMiEi29189; Thu, 19 Feb 2004 17:44:15 -0500 To: Andrew Cagney CC: gdb-patches@sources.redhat.com Subject: Re: RFA: handle zero-length types in value_from_register References: <40337EB3.5000306@gnu.org> From: Jim Blandy Date: Thu, 19 Feb 2004 22:53:00 -0000 In-Reply-To: <40337EB3.5000306@gnu.org> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-02/txt/msg00544.txt.bz2 Andrew Cagney writes: > > The patches I posted here: > > http://sources.redhat.com/ml/gdb-patches/2004-01/msg00717.html > > haven't gotten any more comments since my last revision, so I've > > committed them. > > Jim, did you read this thread? > http://sources.redhat.com/ml/gdb-patches/2004-02/msg00075.html > Andrew No, I hadn't --- thanks. I've committed the following. 2004-02-19 Jim Blandy * findvar.c (value_from_register): Doc fix. *** findvar.c.~1.73.~ 2004-02-17 23:24:28.000000000 -0500 --- findvar.c 2004-02-19 17:39:16.000000000 -0500 *************** *** 627,640 **** error. Zero-length types can legitimately arise from declarations ! like 'struct {}'. GDB may also create them when it finds ! bogus debugging information; for example, in GCC 2.95.4 and ! binutils 2.11.93.0.2, the STABS BINCL->EXCL compression ! process can create bad type numbers. GDB reads these as ! TYPE_CODE_UNDEF types, with zero length. (That bug is ! actually the only known way to get a zero-length value ! allocated to a register --- which is what it takes to make it ! here.) We'll just attribute the value to the original register. */ VALUE_LVAL (v) = lval_register; --- 627,640 ---- error. Zero-length types can legitimately arise from declarations ! like 'struct {}' (a GCC extension, not valid ISO C). GDB may ! also create them when it finds bogus debugging information; ! for example, in GCC 2.95.4 and binutils 2.11.93.0.2, the ! STABS BINCL->EXCL compression process can create bad type ! numbers. GDB reads these as TYPE_CODE_UNDEF types, with zero ! length. (That bug is actually the only known way to get a ! zero-length value allocated to a register --- which is what ! it takes to make it here.) We'll just attribute the value to the original register. */ VALUE_LVAL (v) = lval_register;