From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3750 invoked by alias); 12 Jan 2002 01:11:20 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 3712 invoked from network); 12 Jan 2002 01:11:18 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 12 Jan 2002 01:11:18 -0000 Received: from drow by nevyn.them.org with local (Exim 3.33 #1 (Debian)) id 16PChV-0006YA-00; Fri, 11 Jan 2002 20:11:13 -0500 Date: Fri, 11 Jan 2002 17:11:00 -0000 From: Daniel Jacobowitz To: Jason Merrill Cc: Michael Elizabeth Chastain , gdb@sources.redhat.com, fnf@redhat.com Subject: Re: gdb.c++ failures Message-ID: <20020111201113.A24997@nevyn.them.org> Mail-Followup-To: Jason Merrill , Michael Elizabeth Chastain , gdb@sources.redhat.com, fnf@redhat.com References: <200201101712.LAA18053@duracef.shout.net> <20020110143328.B9479@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i X-SW-Source: 2002-01/txt/msg00127.txt.bz2 On Thu, Jan 10, 2002 at 09:24:44PM +0000, Jason Merrill wrote: > >>>>> "Daniel" == Daniel Jacobowitz writes: > > > On Thu, Jan 10, 2002 at 07:21:18PM +0000, Jason Merrill wrote: > >> The stabs output from gcc ignores const and volatile. There is even a > >> comment saying that "stabs does not distinguish const and volatile". > >> The method qualifiers are described, and gdb could do the work to apply > >> them to the type of 'this', but it's probably fine just to leave it as it > >> is. > > > There are documented extensions to STABS to express both const and > > volatile. GDB supports them, and documents them - see info stabs. > > They're originally Sun extensions. > > > Could I persuade you to add them to GCC? It would take you less time > > than I. > > Give this a whirl. The output looks right to me, but gdb doesn't seem to > like it much. > > 2002-01-10 Jason Merrill > > * dbxout.c (dbxout_type): Support const and volatile. Of course it doesn't like it. The stabs reader was missing two important lines - see gdb-patches in a moment. Only two const/volatile tests seem to fail after this patch. They are: int qux1 (const char cc, const char /*&*/ccr, const char *ccp, char *const cpc) int qux2 (volatile unsigned char vuc, const volatile int cvi, volatile short /*&*/vsr, volatile long *vlp, float *volatile fpv, const volatile signed char *const volatile cvscpcv) The const char cc, const char ccr, volatile unsigned char vuc, and volatile short vsr all become 'int'. 'const volatile int cvi' comes through OK, though, so it seems to be a problem of the subrange integer types. This is definitely GCC's fault and not GDB's - I checked the stabs by hand. I'd appreciate it if you'd commit this to GCC (although probably not to the branch - since GDB 5.1 will object strenuously to them). -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer