From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6166 invoked by alias); 17 Jan 2008 22:09:32 -0000 Received: (qmail 6157 invoked by uid 22791); 17 Jan 2008 22:09:31 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 17 Jan 2008 22:08:57 +0000 Received: (qmail 32468 invoked from network); 17 Jan 2008 22:08:55 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 17 Jan 2008 22:08:55 -0000 To: Michael Snyder Cc: Mark Kettenis , eliz@gnu.org, uweigand@de.ibm.com, brobecker@adacore.com, gdb-patches@sourceware.org Subject: Re: [RFC/RFA?] Should break FILE:LINENO skip prologue? References: <200801152140.m0FLeMha003566@d12av02.megacenter.de.ibm.com> <200801161034.m0GAYfpk000326@brahms.sibelius.xs4all.nl> <1200543483.3263.73.camel@localhost.localdomain> <200801170945.m0H9jZ2I004104@brahms.sibelius.xs4all.nl> <1200606670.3263.85.camel@localhost.localdomain> From: Jim Blandy Date: Thu, 17 Jan 2008 22:09:00 -0000 In-Reply-To: <1200606670.3263.85.camel@localhost.localdomain> (Michael Snyder's message of "Thu, 17 Jan 2008 13:51:10 -0800") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2008-01/txt/msg00462.txt.bz2 Michael Snyder writes: > On Thu, 2008-01-17 at 10:45 +0100, Mark Kettenis wrote: >> > From: Michael Snyder >> > Date: Wed, 16 Jan 2008 20:18:03 -0800 >> > >> > On Thu, 2008-01-17 at 06:13 +0200, Eli Zaretskii wrote: >> > > > Cc: Mark Kettenis , uweigand@de.ibm.com, >> > > > brobecker@adacore.com, msnyder@specifix.com, >> > > > gdb-patches@sourceware.org >> > > > From: Jim Blandy >> > > > Date: Wed, 16 Jan 2008 13:36:11 -0800 >> > > > >> > > > GDB allows 'FILENAME'::FUNCTION in C expressions: >> > > >> > > Thanks. >> > > >> > > But if "break *'FILENAME'::FUNCTION" works, why is it wrong to expect >> > > that "break *FILENAME:FUNCTION" should also work. None of them is a >> > > valid C expression, it's just something GDB does to help the user, >> > > right? >> > >> > Right. It is a separate parser, the LINEINFO parser, as >> > opposed to the expression parser. It defines a superset >> > of the expression syntax. It is used mainly by the 'break' >> > and 'list' commands. >> >> That isn't quite true. The LINESPEC (I assume that's what you meant >> with LINEINFO) parser only parses the '*' and then hands things off to >> the standard expression parser. >> >> This of course is a good thing, because it means expressions are >> handled uniformly all over GDB. > > We're on the same page, possibly not the same paragraph. > > I'm not looking at the code, just going from memory -- > but I think the LINESPEC parser used to do a bit more > than just parse the "*". For instance, it would have to > parse that "::" up there, n'est ce pas? Actually, :: is actually a GDB extension to the C expression syntax. If you look at the example interaction in the message at the link, you can see this in the two 'print' commands, where I use the :: operator. http://sourceware.org/ml/gdb-patches/2008-01/msg00417.html > Anyway, yes, the LINESPEC parser does call the expression > parser, but it also does some syntax itself, thus generating > a superset of the language-specified expression syntax. > We're all agreed on that much. Once it has recognized the '*', linespec.c passes things off directly to the language expression parser, with no further munging; see the code fragments I posted here: http://sourceware.org/ml/gdb-patches/2008-01/msg00354.html So, the syntax of things that may appear after the '*' is exactly an expression, no less or more.