I am using gdb, and something like following:
thread_2()
{
// do something
wait_thread_1_to_wake_me_up();
// do something
}
thread_1()
{
// do something
create_thread_2();
// do something
wake_thread_2_up();
// do something
join();
}
my problem is when I am using gdb and set scheduler-locking on
, if my current thread is thread_2, when it's hanging up by wait_thread_1_to_wake_me_up()
, how could I now switch to thread_1?
Because current thread is thread_2 and it's hanging up, I can't input anything like ``thread 1".
It's really annoying for me, anybody who know how to do that? Or some other smart ideas to get rid of it?
Thanks so much!