From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23072 invoked by alias); 22 Dec 2007 06:02:33 -0000 Received: (qmail 23063 invoked by uid 22791); 22 Dec 2007 06:02:32 -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; Sat, 22 Dec 2007 06:02:23 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5B5502A969B for ; Sat, 22 Dec 2007 01:02:21 -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 gP2Z7j6JOsB8 for ; Sat, 22 Dec 2007 01:02:21 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 58FDA2A9699 for ; Sat, 22 Dec 2007 01:02:20 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id B9350E7ACA; Sat, 22 Dec 2007 10:01:37 +0400 (RET) Date: Sat, 22 Dec 2007 06:03:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: Re: [RFC/RFA] continue stepping if landed in new range of same line Message-ID: <20071222060137.GS6154@adacore.com> References: <20071219075903.GA6184@adacore.com> <20071219141812.GA21072@caradoc.them.org> <20071220052617.GE6154@adacore.com> <20071220140023.GB7244@caradoc.them.org> <20071221060730.GM6184@adacore.com> <20071221132401.GA22244@caradoc.them.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="cW+P/jduATWpL925" Content-Disposition: inline In-Reply-To: <20071221132401.GA22244@caradoc.them.org> 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: 2007-12/txt/msg00389.txt.bz2 --cW+P/jduATWpL925 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1247 > Might need (c-toggle-auto-state 1) too (C-c C-a). Indeed, that enabled the auto-indenting. Thanks! I used to be an emacs aficionado but a couple of years no slow (and shared) Solaris machines had me converted to vim ;-). > To be honest, I find this behavior a bit surprising. Me too. I don't really like to abritrarily change the behavior of the debugger, which is why I was trying to work around it, but it looks like from our experiments that the originally intended behavior might no longer be possible because of the current debugging info. And it looks like it has been so for a number of years already - I looked at the output generated by GCC 3.2.3, and we have the same line table. I wouldn't mind removing the code altogether; as a bonus it would also reduce the size of handle_inferior_event. I can send a patch now, or I can poll users on gdb@ and see what they think... Honestly, given the likeliness of one-line functions, I'd just say it's not very important to keep that special case. 2007-12-22 Joel Brobecker * infrun.c (handle_inferior_event): Remove code that made us stop when stepping into the last line of the current function. Tested on x86-linux, no regression. -- Joel --cW+P/jduATWpL925 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="hie.diff" Content-length: 1168 Index: infrun.c =================================================================== RCS file: /cvs/src/src/gdb/infrun.c,v retrieving revision 1.260 diff -u -p -r1.260 infrun.c --- infrun.c 19 Dec 2007 05:16:35 -0000 1.260 +++ infrun.c 22 Dec 2007 05:47:10 -0000 @@ -2702,20 +2702,6 @@ process_event_stop_test: new line in mid-statement, we continue stepping. This makes things like for(;;) statements work better.) */ - 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. */ - if (debug_infrun) - fprintf_unfiltered (gdb_stdlog, "infrun: stepped to a different function\n"); - stop_step = 1; - print_stop_reason (END_STEPPING_RANGE, 0); - stop_stepping (ecs); - return; - } step_range_start = ecs->sal.pc; step_range_end = ecs->sal.end; step_frame_id = get_frame_id (get_current_frame ()); --cW+P/jduATWpL925--