aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2000-05-03 20:16:05 +0000
committerMark Kettenis <kettenis@gnu.org>2000-05-03 20:16:05 +0000
commitd41707c8687e8a3b364998a5b654f23afa5d8e77 (patch)
tree632eb4877e9baa16a60451c80a9e771846e3e160
parenteaa15ab811a1bb4093b5d73f4ab767588d851b42 (diff)
downloadgdb-d41707c8687e8a3b364998a5b654f23afa5d8e77.zip
gdb-d41707c8687e8a3b364998a5b654f23afa5d8e77.tar.gz
gdb-d41707c8687e8a3b364998a5b654f23afa5d8e77.tar.bz2
* infrun.c (handle_inferior_event): When doing a "next", and
stepping out of a signal handler into its calling trampoline ignore the value of step_frame_address. (step_over_function): Only modify step_resume_breakpoint->frame if the value of step_frame_address is non-zero.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/infrun.c16
2 files changed, 23 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0e59956..5f2469f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2000-05-01 Mark Kettenis <kettenis@gnu.org>
+
+ * infrun.c (handle_inferior_event): When doing a "next", and
+ stepping out of a signal handler into its calling trampoline
+ ignore the value of step_frame_address.
+ (step_over_function): Only modify step_resume_breakpoint->frame if
+ the value of step_frame_address is non-zero.
+
2000-05-03 Michael Snyder <msnyder@seadog.cygnus.com>
* monitor.c (monitor_fetch_register): MAX_REGISTER_RAW_SIZE
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 8bf3012..fb24203 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2745,6 +2745,20 @@ handle_inferior_event (struct execution_control_state *ecs)
if (step_over_calls > 0 || IGNORE_HELPER_CALL (stop_pc))
{
/* We're doing a "next". */
+
+ if (IN_SIGTRAMP (stop_pc, ecs->stop_func_name)
+ && INNER_THAN (step_frame_address, read_sp()))
+ /* We stepped out of a signal handler, and into its
+ calling trampoline. This is misdetected as a
+ subroutine call, but stepping over the signal
+ trampoline isn't such a bad idea. In order to do
+ that, we have to ignore the value in
+ step_frame_address, since that doesn't represent the
+ frame that'll reach when we return from the signal
+ trampoline. Otherwise we'll probably continue to the
+ end of the program. */
+ step_frame_address = 0;
+
step_over_function (ecs);
keep_going (ecs);
return;
@@ -3045,7 +3059,7 @@ step_over_function (struct execution_control_state *ecs)
step_resume_breakpoint =
set_momentary_breakpoint (sr_sal, get_current_frame (), bp_step_resume);
- if (!IN_SOLIB_DYNSYM_RESOLVE_CODE (sr_sal.pc))
+ if (step_frame_address && !IN_SOLIB_DYNSYM_RESOLVE_CODE (sr_sal.pc))
step_resume_breakpoint->frame = step_frame_address;
if (breakpoints_inserted)