From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23011 invoked by alias); 12 Jan 2008 17:58:43 -0000 Received: (qmail 22996 invoked by uid 22791); 12 Jan 2008 17:58:43 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 12 Jan 2008 17:58:21 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 4CB0698223; Sat, 12 Jan 2008 17:58:19 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 35BDD9811D; Sat, 12 Jan 2008 17:58:19 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JDkcb-0005n5-Fp; Sat, 12 Jan 2008 12:58:17 -0500 Date: Sat, 12 Jan 2008 17:58:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: Mark Kettenis , gdb-patches@sourceware.org Subject: Re: [RFC/RFA?] Should break FILE:LINENO skip prologue? Message-ID: <20080112175817.GA21954@caradoc.them.org> Mail-Followup-To: Eli Zaretskii , Mark Kettenis , gdb-patches@sourceware.org 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-12-11) 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/msg00313.txt.bz2 On Sat, Jan 12, 2008 at 06:57:39PM +0200, Eli Zaretskii wrote: > > Date: Sat, 12 Jan 2008 17:18:03 +0100 (CET) > > From: Mark Kettenis > > CC: gdb-patches@sourceware.org > > > > > "*FUNCTION" is generally not a useful C expression, unless FUNCTION > > > returns a pointer. So I don't want to rely on the user to guess this > > > magic in GDB. > > > > Actually *FUNCTION is a perfectly valid C expression > > I didn't say it's invalid; I said it was not useful. That is, a > casual C programmer is unlikely to think about such an expression. I suggest you not think of *FUNCTION as dereferencing FUNCTION. That's not what the * means here. * means "what follows is an expression in the current language; evaluate it as an address and break there". In C, a function evaluates to its address (technically, decays to a function pointer). The * is not part of the expression. In Ada, as Joel said, this is not true. *FUNCTION won't work, because the * means "an expression follows" and the name of a function taking no arguments means to call the function. The * is language independent in this context. -- Daniel Jacobowitz CodeSourcery