forked from Imagelibrary/binutils-gdb
gdb: add threads debugging switch
Add new commands: set debug threads on|off show debug threads Prints additional debug information relating to thread creation and deletion. GDB already announces when threads are created of course.... most of the time, but sometimes threads are added silently, in which case this debug message is the only mechanism to see the thread being added. Also, though GDB does announce when a thread exits, it doesn't announce when the thread object is deleted, I've added a debug message for that. Additionally, having message printed through the debug system will cause the messages to be nested to an appropriate depth when other debug sub-systems are turned on (especially things like `infrun` and `lin-lwp`).
This commit is contained in:
@@ -179,6 +179,8 @@ inferior::clear_thread_list (bool silent)
|
||||
{
|
||||
thread_list.clear_and_dispose ([=] (thread_info *thr)
|
||||
{
|
||||
threads_debug_printf ("deleting thread %s, silent = %d",
|
||||
thr->ptid.to_string ().c_str (), silent);
|
||||
set_thread_exited (thr, silent);
|
||||
if (thr->deletable ())
|
||||
delete thr;
|
||||
|
||||
Reference in New Issue
Block a user