summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-03-21 22:53:49 +0000
committerAndrew Cagney <cagney@redhat.com>2004-03-21 22:53:49 +0000
commit79d59dbc3b4c2550eb65fd0babfe190e26c1f63e (patch)
treecc6fa0d34ee77780f01c713f59316f18b640a1e9
parent77371d57c0520009e69692eeeef100f0d3d1d505 (diff)
downloadgdb-79d59dbc3b4c2550eb65fd0babfe190e26c1f63e.tar.gz
2004-03-21 Andrew Cagney <cagney@redhat.com>cagney_tramp-20040321-mergepoint
* infrun.c (handle_inferior_event): For non legacy frames, use the frame ID and frame type to identify a signal trampoline. Update comments.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/infrun.c27
2 files changed, 18 insertions, 15 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 07f8d561491..16e852a05ce 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2004-03-21 Andrew Cagney <cagney@redhat.com>
+
+ * infrun.c (handle_inferior_event): For non legacy frames, use the
+ frame ID and frame type to identify a signal trampoline. Update
+ comments.
+
2004-03-21 Nathan J. Williams <nathanw@wasabisystems.com>
* mipsnbsd-tdep.c: Update copyright. Include "mips-tdep.h".
diff --git a/gdb/infrun.c b/gdb/infrun.c
index a863140670c..dac953850b9 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2521,22 +2521,19 @@ process_event_stop_test:
But we can update it every time we leave the step range. */
ecs->update_step_sp = 1;
- /* Did we just take a signal? */
- if (pc_in_sigtramp (stop_pc)
- && !pc_in_sigtramp (prev_pc)
- && INNER_THAN (read_sp (), step_sp))
+ /* Did we just step into a singal trampoline (either by stepping out
+ of a handler, or by taking a signal)? */
+ /* NOTE: cagney/2004-03-16: Replaced (except for legacy) a check for
+ "pc_in_sigtramp(stop_pc) != pc_in_sigtramp(step_pc)" with
+ frame_type == SIGTRAMP && !frame_id_eq. The latter is far more
+ robust as it will correctly handle nested signal trampolines. */
+ if (legacy_frame_p (current_gdbarch)
+ ? (pc_in_sigtramp (stop_pc)
+ && !pc_in_sigtramp (prev_pc)
+ && INNER_THAN (read_sp (), step_sp))
+ : (get_frame_type (get_current_frame ()) == SIGTRAMP_FRAME
+ && !frame_id_eq (get_frame_id (get_current_frame ()), step_frame_id)))
{
- /* We've just taken a signal; go until we are back to
- the point where we took it and one more. */
-
- /* Note: The test above succeeds not only when we stepped
- into a signal handler, but also when we step past the last
- statement of a signal handler and end up in the return stub
- of the signal handler trampoline. To distinguish between
- these two cases, check that the frame is INNER_THAN the
- previous one below. pai/1997-09-11 */
-
-
{
struct frame_id current_frame = get_frame_id (get_current_frame ());