From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20542 invoked by alias); 13 Jan 2008 04:22:08 -0000 Received: (qmail 20328 invoked by uid 22791); 13 Jan 2008 04:22:07 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (213.8.233.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 13 Jan 2008 04:21:47 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-201-184.inter.net.il [80.230.201.184]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id JWT96213 (AUTH halo1); Sun, 13 Jan 2008 06:21:21 +0200 (IST) Date: Sun, 13 Jan 2008 04:22:00 -0000 Message-Id: From: Eli Zaretskii To: Daniel Jacobowitz CC: mark.kettenis@xs4all.nl, gdb-patches@sourceware.org In-reply-to: <20080112175817.GA21954@caradoc.them.org> (message from Daniel Jacobowitz on Sat, 12 Jan 2008 12:58:17 -0500) Subject: Re: [RFC/RFA?] Should break FILE:LINENO skip prologue? Reply-to: Eli Zaretskii 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> 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/msg00314.txt.bz2 > Date: Sat, 12 Jan 2008 12:58:17 -0500 > From: Daniel Jacobowitz > Cc: Mark Kettenis , gdb-patches@sourceware.org > > 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. Sigh. This must be one of those days when I'm unable to explain myself. Look, I didn't say _I_ didn't know about *FUNCTION, so you don't need to explain that to _me_. I said it is generally not used in programs. Therefore, its use in GDB is unintuitive given just programming experience. > 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.