When I attach to a process, or when a breakpoint is hit, all the threads are paused. I can't find out how to pause one thread, and let other threads continue running.
Asked
Active
Viewed 429 times
1 Answers
0
I can't find out how to pause one thread, and let other threads continue running.
Besides the non-stop mode mentioned in this answer, and scheduler locking mentioned here, you could do this:
# arrange for GDB to stop in the thread you want to suspend.
(gdb) call sleep(1000) # current thread will sleep, all others will continue running

Employed Russian
- 199,314
- 34
- 295
- 362