From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13263 invoked by alias); 31 Dec 2003 00:59:17 -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 13254 invoked from network); 31 Dec 2003 00:59:16 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 31 Dec 2003 00:59:16 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1AbUhZ-0005Bw-HL; Tue, 30 Dec 2003 19:59:09 -0500 Date: Wed, 31 Dec 2003 00:59:00 -0000 From: Daniel Jacobowitz To: Michael Elizabeth Chastain Cc: gdb-patches@sources.redhat.com Subject: Re: [cplus] An initial use of the canonicalizer Message-ID: <20031231005909.GA19866@nevyn.them.org> Mail-Followup-To: Michael Elizabeth Chastain , gdb-patches@sources.redhat.com References: <20031230211502.E56374B35A@berman.michael-chastain.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031230211502.E56374B35A@berman.michael-chastain.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-12/txt/msg00524.txt.bz2 On Tue, Dec 30, 2003 at 04:15:02PM -0500, Michael Chastain wrote: > Uh, I don't like parts of this. That's why I'm not submitting it for mainline yet. Sorry if I wasn't clear. The [cplus] tag means it's going on my branch. > > - -re "type = (class |)Foo \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*.*char.*\\*t;\r\n\r\n\[ \t\]*.*char.* \\* foo\\(int,.*char.*\\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fvpchar" } > + -re "type = (class |)Foo<.*char.* ?\\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*.*char.*\\*t;\r\n\r\n\[ \t\]*.*char.* \\* foo\\(int,.*char.*\\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fvpchar" } > > You dropped the "volatile" from the expected test pattern. > Can you do something like: > > (volatile char ?*|char volatile ?*) What's going to happen in the end is that we won't need any of this garbage. You'll be able to say: char volatile\\* and no matter what debug info format or compiler generated the object, that's what GDB will print. For now I'm just kludging around things so that I can see when I introduce regressions on my branch. > Here is why: sometimes, I need to run the current test suite with gdb 6.0, > because the 6.0 test suite no longer works with the current compiler. > So it helps me a lot if the current test suite accepts the output > of both gdb 6.0 and gdb HEAD. > > Sometimes this is painful but in cases like this it's easy and cheap. Not when I'm done with my project, it won't be. Let's talk about the problem. Which is more important - checking GDB 6.0 against GCC HEAD, or being able to verify that I've successfully canonicalized _all_ of GDB's output patterns? I'd like to consider "volatile char *" a bug when we're expecting to see "char volatile*", not accept both. As a general issue. (I personally consider the former more natural, but the latter seems to be more common C++ style and matches the demangler, for this specific example). -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer