From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28749 invoked by alias); 10 Jan 2008 17:15:48 -0000 Received: (qmail 28740 invoked by uid 22791); 10 Jan 2008 17:15:47 -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; Thu, 10 Jan 2008 17:15:19 +0000 Received: (qmail 2739 invoked from network); 10 Jan 2008 17:15:17 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 10 Jan 2008 17:15:17 -0000 To: Michael Snyder Cc: Joel Brobecker , gdb-patches@sourceware.org Subject: Re: [RFC/RFA?] Should break FILE:LINENO skip prologue? References: <20080109151745.GA13181@adacore.com> <1199910284.14654.13.camel@localhost.localdomain> From: Jim Blandy Date: Thu, 10 Jan 2008 17:15:00 -0000 In-Reply-To: <1199910284.14654.13.camel@localhost.localdomain> (Michael Snyder's message of "Wed, 09 Jan 2008 12:24:44 -0800") 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/msg00242.txt.bz2 Michael Snyder writes: > By habit and actual practice, if I tell gdb to set a breakpoint > at the opening brace of a function, it is because I want it to > stop before the prologue. My feeling is that this usage is not important to support, as it makes things confusing for most GUI users, and GDB provides another way to set a breakpoint at a function's exact entry point. > If I tell gdb to set a breakpoint AFTER local variable x > is initialized, but BEFORE local variable y is initialized, > as in the following example... > > int foo() > { > int x = 12; > char *y = "bar"; > > it is because I want gdb to stop after x is initialized > and before y is initialized. > If gdb decided not to LET me stop in the middle of the > prologue, I would be exceedingly pissed off. Prologue skipping doesn't affect this, as those initializations are not considered part of the prologue. 'break foo', which skips the prologue, will set the breakpoint before the initialization of 'x'. Have I misunderstood?