From: Joel Brobecker <brobecker@gnat.com>
To: Andrew Cagney <cagney@gnu.org>
Cc: Ulrich Weigand <weigand@i1.informatik.uni-erlangen.de>,
gdb-patches@sources.redhat.com
Subject: Re: [patch/rfc] Use frame_type for sigtramp test in infrun.c
Date: Sat, 03 Apr 2004 00:08:00 -0000 [thread overview]
Message-ID: <20040403000855.GF871@gnat.com> (raw)
In-Reply-To: <406DD226.1080104@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 790 bytes --]
> 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
[-- Attachment #2: infrun.c.diff --]
[-- Type: text/plain, Size: 2752 bytes --]
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. */
next prev parent reply other threads:[~2004-04-03 0:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-29 23:38 Ulrich Weigand
2004-03-31 21:49 ` Andrew Cagney
2004-04-02 20:50 ` Andrew Cagney
2004-04-02 23:57 ` Joel Brobecker
2004-04-03 0:08 ` Joel Brobecker [this message]
2004-04-03 1:01 ` Andrew Cagney
2004-04-06 1:48 ` Joel Brobecker
2004-04-06 16:21 ` Joel Brobecker
2004-04-06 17:48 ` Andrew Cagney
2004-04-06 17:54 ` Daniel Jacobowitz
2004-04-06 18:11 ` Andrew Cagney
2004-04-06 23:33 ` Andrew Cagney
2004-04-29 22:46 ` Andrew Cagney
-- strict thread matches above, loose matches on Subject: below --
2004-03-16 18:57 Andrew Cagney
2004-03-19 0:09 ` Andrew Cagney
2004-03-21 22:38 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040403000855.GF871@gnat.com \
--to=brobecker@gnat.com \
--cc=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=weigand@i1.informatik.uni-erlangen.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox