btrace: support to_stop

Add support for the to_stop target method to the btrace record target.

gdb/
	* btrace.h (enum btrace_thread_flag) <BTHR_STOP>: New.
	* record-btrace (record_btrace_resume_thread): Clear BTHR_STOP.
	(record_btrace_find_thread_to_move): Also accept threads that have
	BTHR_STOP set.
	(btrace_step_stopped_on_request, record_btrace_stop): New.
	(record_btrace_step_thread): Support BTHR_STOP.
	(record_btrace_wait): Also clear BTHR_STOP when stopping other threads.
	(init_record_btrace_ops): Initialize to_stop.
This commit is contained in:
Markus Metzger
2015-08-19 13:35:52 +02:00
parent 5953356cc4
commit 6e4879f0eb
3 changed files with 70 additions and 9 deletions

View File

@@ -240,7 +240,10 @@ enum btrace_thread_flag
BTHR_RCONT = (1 << 3),
/* The thread is to be moved. */
BTHR_MOVE = (BTHR_STEP | BTHR_RSTEP | BTHR_CONT | BTHR_RCONT)
BTHR_MOVE = (BTHR_STEP | BTHR_RSTEP | BTHR_CONT | BTHR_RCONT),
/* The thread is to be stopped. */
BTHR_STOP = (1 << 4)
};
#if defined (HAVE_LIBIPT)