From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22920 invoked by alias); 11 Jan 2008 05:36:15 -0000 Received: (qmail 22912 invoked by uid 22791); 11 Jan 2008 05:36:14 -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; Fri, 11 Jan 2008 05:35:57 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id AE06A2A96EF; Fri, 11 Jan 2008 00:35:55 -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 K3AFqi3L1zeD; Fri, 11 Jan 2008 00:35:55 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B4CBA2A96EE; Fri, 11 Jan 2008 00:35:54 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 2A61CE7ACB; Thu, 10 Jan 2008 21:35:47 -0800 (PST) Date: Fri, 11 Jan 2008 05:36:00 -0000 From: Joel Brobecker To: Mark Kettenis Cc: msnyder@specifix.com, ebotcazou@adacore.com, jimb@codesourcery.com, gdb-patches@sourceware.org Subject: Re: [RFC/RFA?] Should break FILE:LINENO skip prologue? Message-ID: <20080111053547.GB12954@adacore.com> References: <20080109151745.GA13181@adacore.com> <200801092140.43362.ebotcazou@adacore.com> <200801101058.m0AAw7HA023877@brahms.sibelius.xs4all.nl> <200801101247.28736.ebotcazou@adacore.com> <1200001622.14654.29.camel@localhost.localdomain> <200801102208.m0AM8aDR023344@brahms.sibelius.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200801102208.m0AM8aDR023344@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/msg00260.txt.bz2 > 1. int > 2. foo (int i, double d) > 3. { > 4. int j = 42; > 5. float f = sin(d); > 6. ... > 7. } > > the first assignment may be scheduled into the prologue, but the > second almost certainly won't. The prologue should never include any of the local variable assignments. At -O0, the situation is very clear and easy, as the variable assignments are always past the prologue. Each variable assignment has its own line and you can break on them as usual. My patches will not affect that. The situation becomes trickier at -O1 and beyond, because parts of the prologue may be delayed later inside the function body. But in that case, the compiler will still emit a specific line for the instruction block that does the assignment. So the actual linetable will look like this: Line 3: prologue Line 4. assign j Lin3 3. prologue Line 5. call sin, assign f ... In that case, the skipping will only skip the first part of the prologue, and you can still break on any assignment if you'd like. My patches do not affect that situation either. > If we can somehow ascertain ourselves that indeed we can still put a > breakpoint on the second assignment and have it break before entering > sin(), I think Joels origional diff is actually acceptable. Hopefully the explaination above convinces you that this is the case? -- Joel