aboutsummaryrefslogtreecommitdiff
path: root/gdb/thread.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-05-23 17:12:51 +0000
committerPedro Alves <palves@redhat.com>2013-05-23 17:12:51 +0000
commitce4c476a0f4f38e08bce87f4144aaa7550e9a79d (patch)
tree77c408bebdfe729c8c4b6aaa1d72b0c3cd6ff671 /gdb/thread.c
parent6cf1d90c239bf3da9ac8b3cea667cca9c9e7e924 (diff)
downloadgdb-ce4c476a0f4f38e08bce87f4144aaa7550e9a79d.zip
gdb-ce4c476a0f4f38e08bce87f4144aaa7550e9a79d.tar.gz
gdb-ce4c476a0f4f38e08bce87f4144aaa7550e9a79d.tar.bz2
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/thread.c')
-rw-r--r--gdb/thread.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/thread.c b/gdb/thread.c
index 2a1d723..2eb506b 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -750,6 +750,13 @@ finish_thread_state_cleanup (void *arg)
finish_thread_state (*ptid_p);
}
+int
+pc_in_thread_step_range (CORE_ADDR pc, struct thread_info *thread)
+{
+ return (pc >= thread->control.step_range_start
+ && pc < thread->control.step_range_end);
+}
+
/* Prints the list of threads and their details on UIOUT.
This is a version of 'info_threads_command' suitable for
use from MI.