summaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-05-23 17:12:50 +0000
committerPedro Alves <palves@redhat.com>2013-05-23 17:12:50 +0000
commit34d2892f76ba085447dad2041ebace48815a45fc (patch)
treea0465adff3c518f5ab7a308d71210a92dc9acbdc /gdb/infrun.c
parent79aeb20ca9af9669fca91eb85950f816bbe8a4e9 (diff)
downloadgdb-34d2892f76ba085447dad2041ebace48815a45fc.tar.gz
Factor out in-stepping-range checks.
This adds a function for doing within-thread's-stepping-range checks, and converts a couple spots to use it. Following patches will add more uses. gdb/ 2013-05-23 Yao Qi <yao@codesourcery.com> Pedro Alves <palves@redhat.com> * gdbthread.h (pc_in_thread_step_range): New declaration. * thread.c (pc_in_thread_step_range): New function. * infrun.c (handle_inferior_event): Use it.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 54e92f2318b..57c427da6d4 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -4337,8 +4337,7 @@ process_event_stop_test:
if (ecs->event_thread->control.step_range_end != 0
&& ecs->event_thread->suspend.stop_signal != GDB_SIGNAL_0
- && (ecs->event_thread->control.step_range_start <= stop_pc
- && stop_pc < ecs->event_thread->control.step_range_end)
+ && pc_in_thread_step_range (stop_pc, ecs->event_thread)
&& frame_id_eq (get_stack_frame_id (frame),
ecs->event_thread->control.step_stack_frame_id)
&& ecs->event_thread->control.step_resume_breakpoint == NULL)
@@ -4707,8 +4706,7 @@ process_event_stop_test:
through a function epilogue and therefore must detect when
the current-frame changes in the middle of a line. */
- if (stop_pc >= ecs->event_thread->control.step_range_start
- && stop_pc < ecs->event_thread->control.step_range_end
+ if (pc_in_thread_step_range (stop_pc, ecs->event_thread)
&& (execution_direction != EXEC_REVERSE
|| frame_id_eq (get_frame_id (frame),
ecs->event_thread->control.step_frame_id)))