From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12176 invoked by alias); 15 Jan 2008 17:13:57 -0000 Received: (qmail 12165 invoked by uid 22791); 15 Jan 2008 17:13:56 -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; Tue, 15 Jan 2008 17:13:26 +0000 Received: (qmail 22695 invoked from network); 15 Jan 2008 17:13:25 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 15 Jan 2008 17:13:25 -0000 To: Michael Snyder Cc: Mark Kettenis , eliz@gnu.org, drow@false.org, gdb-patches@sourceware.org Subject: Re: [RFC/RFA?] Should break FILE:LINENO skip prologue? References: <20080111053547.GB12954@adacore.com> <200801111126.m0BBQQDB006618@brahms.sibelius.xs4all.nl> <20080111182136.GD12954@adacore.com> <200801112113.m0BLDnAF024595@brahms.sibelius.xs4all.nl> <200801121531.m0CFVW8I023504@brahms.sibelius.xs4all.nl> <200801121618.m0CGI27U012957@brahms.sibelius.xs4all.nl> <20080112175817.GA21954@caradoc.them.org> <200801130921.m0D9LDtI008394@brahms.sibelius.xs4all.nl> <1200351608.3263.16.camel@localhost.localdomain> From: Jim Blandy Date: Tue, 15 Jan 2008 17:13:00 -0000 In-Reply-To: <1200351608.3263.16.camel@localhost.localdomain> (Michael Snyder's message of "Mon, 14 Jan 2008 15:00:08 -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/msg00354.txt.bz2 Michael Snyder writes: > On Sun, 2008-01-13 at 10:21 +0100, Mark Kettenis wrote: >> > Date: Sun, 13 Jan 2008 06:21:36 +0200 >> > From: Eli Zaretskii >> > >> > > In Ada, as Joel said, this is not true. *FUNCTION won't work >> > >> > That's too bad: this is an important feature, so if we cannot make it >> > work in all languages, we should at least document that. >> >> This is exactly the reason why documenting *FUNCTION on its own is the >> wrong thing to do. What we implement in GDB is *EXPRESSION, where >> EXPRESSION is an expression in the current language yielding an >> address. > > Mark, I don't think that is true -- at least it used to be not > (damn English language...) > > When you say "break *", the asterisk is NOT > interpreted by the expression parser -- it is interpreted > by the break command, or more precisely, by the LINESPEC > parser. Mark is agreeing with you. He said the syntax is: break *EXPRESSION Since the * is written out explicitly, it is not part of EXPRESSION. If Mark had wanted to indicate that the expression parser was handling that *, he would have written break EXPRESSION We're all in violent agreement that this isn't what GDB does at present. :) From decode_line_1: /* See if arg is *PC. */ if (**argptr == '*') return decode_indirect (argptr); where: /* Decode arg of the form *PC. */ static struct symtabs_and_lines decode_indirect (char **argptr) { struct symtabs_and_lines values; CORE_ADDR pc; (*argptr)++; pc = parse_and_eval_address_1 (argptr); ... }