From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32266 invoked by alias); 12 Apr 2010 15:55:18 -0000 Received: (qmail 32255 invoked by uid 22791); 12 Apr 2010 15:55:17 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=BAYES_00,TW_XS X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 12 Apr 2010 15:55:09 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id D8E0A2BAB87; Mon, 12 Apr 2010 11:55:07 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id xSDDZDbevy1S; Mon, 12 Apr 2010 11:55:07 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 8AA9E2BAB8A; Mon, 12 Apr 2010 11:55:07 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 2AB0CF58C2; Mon, 12 Apr 2010 08:54:53 -0700 (PDT) Date: Mon, 12 Apr 2010 15:55:00 -0000 From: Joel Brobecker To: Pierre Muller Cc: gdb-patches@sourceware.org Subject: Re: [RFC] Fix bug report 11479 Message-ID: <20100412155453.GW19194@adacore.com> References: <000f01cad75b$b53278a0$1f9769e0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000f01cad75b$b53278a0$1f9769e0$@muller@ics-cnrs.unistra.fr> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-04/txt/msg00361.txt.bz2 > This is not a direct RFA for two reasons: [...] > 2) concerning the fix in stabsread.c, this chain of different types > that all point to the same main type could apparently be something > else than just a simple 'const' or 'volatile' modifier. But I don't > think that I know enough about the other possibilities to know if I > should exclude them from my patch by checking if only TYPE_CONST and > TYPE_VOLATILE are different. It's OK to post an RFA even if there are questions you don't know how to answer. If we don't either, then we'll just have to go with what we have and fix any problem we might find later. > 2010-04-08 Pierre Muller > > * stabsread.c (read_struct_type): Also set length of > other types in the chain. It would have been useful if you had also provided a copy of the stabs for us to look at. I think I managed to generate them from the C file you provided: .stabs "t:p(0,21)=*(0,22)=k(0,23)=xsdummy:",160,0,28,-24 Followed later on by the actual definition: .stabs "dummy:T(0,23)=s16x:(0,1),0,32;y:(0,1),32,32;b:(0,13),64,64;;",128,0,0,0 What I don't get is that the xsdummy should lead to what we call an undefined type in stabsread.c, which should be put in the undef_types queue. This queue is then processed at the end to fix all undefined types, including the various volatile/const variants in the type chain. Any idea why this is not working this way for your example? > 2010-04-08 Pierre Muller > Test for bug 11479. > * gdb.stabs/gdb11479.exp: New file. > * gdb.stabs/gdb11479.c: New file. Just a small cleanup request: > +# Please email any bugs, comments, and/or additions to this file to: > +# bug-gdb@gnu.org I think we decided to remove this from the header - does this email address even works nowadays? > +set testfile "gdb11479" > +set srcfile ${testfile}.c > +set binfile ${objdir}/${subdir}/${testfile} > +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable > {debug}] != "" } { > + untested "couldn't compile ${srcdir}/${subdir}/${srcfile}" > + return -1 > +} > + > +# Start with a fresh gdb. > +gdb_exit > +gdb_start > +gdb_reinitialize_dir $srcdir/$subdir > +gdb_load ${binfile} The above can be replaced by: set testfile "gdb11479" set srcfile ${testfile}.c if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } { return -1 > + Please email any bugs, comments, and/or additions to this file to: > + bug-gdb@gnu.org */ Same as above. -- Joel