From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3515 invoked by alias); 10 Jan 2008 15:39:51 -0000 Received: (qmail 3504 invoked by uid 22791); 10 Jan 2008 15:39:50 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 10 Jan 2008 15:39:32 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 1C0532A96BB; Thu, 10 Jan 2008 10:39:31 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id TKp2eo+cpI7U; Thu, 10 Jan 2008 10:39:31 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 397722A96B5; Thu, 10 Jan 2008 10:39:30 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id D6521E7ACB; Thu, 10 Jan 2008 07:39:22 -0800 (PST) Date: Thu, 10 Jan 2008 15:39:00 -0000 From: Joel Brobecker To: Mark Kettenis Cc: msnyder@specifix.com, gdb-patches@sourceware.org Subject: Re: [RFC/RFA?] Should break FILE:LINENO skip prologue? Message-ID: <20080110153922.GA12954@adacore.com> References: <20080109151745.GA13181@adacore.com> <1199910284.14654.13.camel@localhost.localdomain> <20080109203453.GI21281@adacore.com> <1199912695.14654.21.camel@localhost.localdomain> <20080110041540.GK21281@adacore.com> <200801101038.m0AAcT01010079@brahms.sibelius.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200801101038.m0AAcT01010079@brahms.sibelius.xs4all.nl> User-Agent: Mutt/1.4.2.2i 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/msg00238.txt.bz2 [I already conceded and moved to a revised proposal where the current behavior is preserved, but this is an interesting question]. > Ah, that puts things in a slightly different perspective. One could > argue that the problem here isn't in GDB, but in the GUI which really > should respond to the user clicking the function name with setting a > breakpoint on the function instead of putting the breakpoint on a > line. Unfortunately, it's not always possible for the GUI to know that the user clicked on a function name. The user actually clicked on a line where a function happens to be defined. With GNAT, some information is available for the GUI to use once the program has been compiled, but not all languages provide that type of info. This is why your suggestion would be relatively difficult to implement in a way that would be "intelligent". Right now, if you take GPS (AdaCore's GUI) as an example, if you want to break on a function (using its name), you have to use the contextual menu after right-clicking on the function name. If you want to click on a specific line, just click on it. Breaking on a function by name is therefore a little more effort than breaking on a given line, which explains why most users just click on line numbers. -- Joel