From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23107 invoked by alias); 14 Jan 2008 22:57:07 -0000 Received: (qmail 23099 invoked by uid 22791); 14 Jan 2008 22:57:07 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 14 Jan 2008 22:56:49 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id 0065F3C851; Mon, 14 Jan 2008 14:56:46 -0800 (PST) Subject: Re: [RFC/RFA?] Should break FILE:LINENO skip prologue? From: Michael Snyder To: Eli Zaretskii Cc: Joel Brobecker , drow@false.org, mark.kettenis@xs4all.nl, gdb-patches@sourceware.org In-Reply-To: References: <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> <20080113062450.GG9143@adacore.com> Content-Type: text/plain Date: Mon, 14 Jan 2008 22:57:00 -0000 Message-Id: <1200351406.3263.11.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-4.fc7) Content-Transfer-Encoding: 7bit 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/msg00335.txt.bz2 On Sun, 2008-01-13 at 01:54 -0500, Eli Zaretskii wrote: > > Date: Sat, 12 Jan 2008 22:24:50 -0800 > > From: Joel Brobecker > > Cc: Daniel Jacobowitz , mark.kettenis@xs4all.nl, > > gdb-patches@sourceware.org > > > > > > 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. > > > > What I suggest is that we document *FUNCTION as a special case and yet > > very useful form of *EXPRESSION, and explain why it works. > > In what languages _does_ it work, besides C/C++? Speaking from memory, and therefore this may not be the way it works today... break *expression used to be a special case of the break command, and NOT the same as "break (*expression). The * in this case is (was) NOT treated as the * expression op. It meant "treat the following expression as a literal address, and PUT A BREAKPOINT THERE (as opposed to skipping a prologue first and then putting a breakpoint). It did NOT mean "dereference a pointer expression". This is a fallout of the fact that the argument to the break command is not simply an expression -- an expression is just one of several possibilities. The "*" is a disambiguator, albeit perhaps a poorly chosen one. It means, "this is not an expression, this is a linespec, something that evaluates to an address, and I don't want any post-processing done to the address (such as skip-prologue).