From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10379 invoked by alias); 19 Dec 2007 14:18:21 -0000 Received: (qmail 10370 invoked by uid 22791); 19 Dec 2007 14:18:21 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 19 Dec 2007 14:18:15 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id C444D98150; Wed, 19 Dec 2007 14:18:13 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id AD0579814F; Wed, 19 Dec 2007 14:18:13 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1J4zkS-0005Zz-Qc; Wed, 19 Dec 2007 09:18:12 -0500 Date: Wed, 19 Dec 2007 14:18:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFC/RFA] continue stepping if landed in new range of same line Message-ID: <20071219141812.GA21072@caradoc.them.org> Mail-Followup-To: Joel Brobecker , gdb-patches@sourceware.org References: <20071219075903.GA6184@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071219075903.GA6184@adacore.com> User-Agent: Mutt/1.5.17 (2007-12-11) 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: 2007-12/txt/msg00308.txt.bz2 On Wed, Dec 19, 2007 at 11:59:03AM +0400, Joel Brobecker wrote: > After the jump, the inferior stops and GDB finds that we stepped > inside the last line of our function, and decides that we should > stop: > > if (ecs->stop_func_end && ecs->sal.end >= ecs->stop_func_end) > { > /* If this is the last line of the function, don't keep stepping > (it would probably step us out of the function). > This is particularly necessary for a one-line function, > in which after skipping the prologue we better stop even though > we will be in mid-line. */ > > This code predates the public CVS so I wasn't able to find much > besides the comment. After reading this comment, I am no longer > sure of what to do. > > The behavior that I observed is a bit surprising, and I am not sure that > the comment above meant to include a case like mine. However, can we > still maintain support for one-line functions, and yet handle the case > above? After thinking about it for a while, I think it's possible, but > it requires a bit a processing. I don't like your patch very much, since it assumes things about code based on the structure of the source (and there are some pathological cases, like functions which start in one file and end in another). I'd rather figure out if the above quoted code is still necessary. If we were on the last line of the function and told to step, why shouldn't we step out of it? -- Daniel Jacobowitz CodeSourcery