From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7893 invoked by alias); 14 Jan 2008 22:17:44 -0000 Received: (qmail 7885 invoked by uid 22791); 14 Jan 2008 22:17:44 -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; Mon, 14 Jan 2008 22:17:16 +0000 Received: (qmail 449 invoked from network); 14 Jan 2008 22:17:13 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Jan 2008 22:17:13 -0000 To: Eli Zaretskii Cc: Daniel Jacobowitz , mark.kettenis@xs4all.nl, 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> From: Jim Blandy Date: Mon, 14 Jan 2008 22:17:00 -0000 In-Reply-To: (Eli Zaretskii's message of "Sun, 13 Jan 2008 06:21:36 +0200") 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/msg00331.txt.bz2 Eli Zaretskii writes: > I said it is generally not used in programs. > Therefore, its use in GDB is unintuitive given just programming > experience. It is almost as widely used as function pointers. In my experience (including code outside GDB), it's the preferred way to get a function pointer. I think the GDB manual should document '*EXPRESSION', and then mention the useful special case that in C, '*FUNCTION' refers to the first instruction in FUNCTION, before the stack frame and arguments have been set up. I suspect less technical readers will assume that the term 'entry point' simply means the point at which none of the function's body statements have executed yet. It will not suggest to them that the stack and arguments may be in an odd state. So if the manual describes 'break *FUNCTION' as a way to set a breakpoint "at FUNCTION's entry point", I think many users will use it when they would be happier with 'break FUNCTION'. So I think the documentation for the '*FUNCTION' special case should spell out what that means, perhaps with a phrase like the one I used in the paragraph before this one.