From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9455 invoked by alias); 3 Apr 2004 00:08:58 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 9445 invoked from network); 3 Apr 2004 00:08:56 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by sources.redhat.com with SMTP; 3 Apr 2004 00:08:56 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id CBAAA47D62; Fri, 2 Apr 2004 16:08:55 -0800 (PST) Date: Sat, 03 Apr 2004 00:08:00 -0000 From: Joel Brobecker To: Andrew Cagney Cc: Ulrich Weigand , gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] Use frame_type for sigtramp test in infrun.c Message-ID: <20040403000855.GF871@gnat.com> References: <200403292338.BAA16799@faui1d.informatik.uni-erlangen.de> <406DD226.1080104@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="xesSdrSSBC0PokLI" Content-Disposition: inline In-Reply-To: <406DD226.1080104@gnu.org> User-Agent: Mutt/1.4i X-SW-Source: 2004-04/txt/msg00088.txt.bz2 --xesSdrSSBC0PokLI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 790 > Joel, from memory you had a change to: > > if (((stop_pc == ecs->stop_func_start /* Quick test */ > || in_prologue (stop_pc, ecs->stop_func_start)) > && !IN_SOLIB_RETURN_TRAMPOLINE (stop_pc, ecs->stop_func_name)) > || IN_SOLIB_CALL_TRAMPOLINE (stop_pc, ecs->stop_func_name) > || ecs->stop_func_name == 0) > { > /* It's a subroutine call. */ > handle_step_into_function (ecs); > return; > } > > pending? If we do pull the sigtramp code I think it would be prudent to > first have that committed - Joel's change greatly clarifies the logic. Just to make sure we're talking about the same patch, attached is the patch I was working on (may need to be updated to the current sources). Is that what you were refering to? Thanks, -- Joel --xesSdrSSBC0PokLI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="infrun.c.diff" Content-length: 2752 Index: infrun.c =================================================================== RCS file: /cvs/src/src/gdb/infrun.c,v retrieving revision 1.140 diff -u -p -r1.140 infrun.c --- infrun.c 15 Mar 2004 17:12:50 -0000 1.140 +++ infrun.c 3 Apr 2004 00:06:46 -0000 @@ -2516,6 +2516,18 @@ process_event_stop_test: return; } + if (step_over_calls == STEP_OVER_UNDEBUGGABLE + && ecs->stop_func_name == NULL) + { + /* There is no symbol, not even a minimal symbol, corresponding + to the address where we just stopped. So we just stepped + inside undebuggable code. Since we want to step over this + kind of code, we keep going until the inferior returns from + the current function. */ + handle_step_into_function (ecs); + return; + } + /* We can't update step_sp every time through the loop, because reading the stack pointer would slow down stepping too much. But we can update it every time we leave the step range. */ @@ -2605,15 +2617,35 @@ process_event_stop_test: return; } - if (((stop_pc == ecs->stop_func_start /* Quick test */ - || in_prologue (stop_pc, ecs->stop_func_start)) - && !IN_SOLIB_RETURN_TRAMPOLINE (stop_pc, ecs->stop_func_name)) - || IN_SOLIB_CALL_TRAMPOLINE (stop_pc, ecs->stop_func_name) - || ecs->stop_func_name == 0) + if (legacy_frame_p (current_gdbarch)) { - /* It's a subroutine call. */ - handle_step_into_function (ecs); - return; + /* FIXME: brobecker/2004-03-04: The current architecture is still + using the legacy frame code, so we prefer not to rely on frame IDs + to check whether we just stepped into a function or not. Some + experiments conducted on sparc-solaris before it was converted + to the new frame code showed that it could introduce some + severe problems. Once all targets have transitioned to the new + frame code, this block can be deleted. */ + if (((stop_pc == ecs->stop_func_start /* Quick test */ + || in_prologue (stop_pc, ecs->stop_func_start)) + && !IN_SOLIB_RETURN_TRAMPOLINE (stop_pc, ecs->stop_func_name)) + || IN_SOLIB_CALL_TRAMPOLINE (stop_pc, ecs->stop_func_name) + || ecs->stop_func_name == 0) + { + /* It's a subroutine call. */ + handle_step_into_function (ecs); + return; + } + } + else + { + if (frame_id_eq (get_frame_id (get_prev_frame (get_current_frame ())), + step_frame_id)) + { + /* It's a subroutine call. */ + handle_step_into_function (ecs); + return; + } } /* We've wandered out of the step range. */ --xesSdrSSBC0PokLI--