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.
This commit is contained in:
Pedro Alves 2013-05-23 17:12:51 +00:00
parent 6cf1d90c23
commit ce4c476a0f
4 changed files with 20 additions and 4 deletions

View file

@ -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.