forked from Imagelibrary/binutils-gdb
gdb: make thread_info::executing private
Rename thread_info::executing to thread_info::m_executing, and make it private. Add a new get/set member functions, and convert GDB to make use of these. The only real change of interest in this patch is in thread.c where I have deleted the helper function set_executing_thread, and now just use the new set function thread_info::set_executing. However, the old helper function set_executing_thread included some code to reset the thread's stop_pc, so I moved this code into the new function thread_info::set_executing. However, I don't believe there is anywhere that this results in a change of behaviour, previously the executing flag was always set true through a call to set_executing_thread anyway.
This commit is contained in:
@@ -1661,7 +1661,7 @@ watchpoint_in_thread_scope (struct watchpoint *b)
|
||||
return (b->pspace == current_program_space
|
||||
&& (b->watchpoint_thread == null_ptid
|
||||
|| (inferior_ptid == b->watchpoint_thread
|
||||
&& !inferior_thread ()->executing)));
|
||||
&& !inferior_thread ()->executing ())));
|
||||
}
|
||||
|
||||
/* Set watchpoint B to disp_del_at_next_stop, even including its possible
|
||||
@@ -4512,7 +4512,7 @@ get_bpstat_thread ()
|
||||
return NULL;
|
||||
|
||||
thread_info *tp = inferior_thread ();
|
||||
if (tp->state == THREAD_EXITED || tp->executing)
|
||||
if (tp->state == THREAD_EXITED || tp->executing ())
|
||||
return NULL;
|
||||
return tp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user