0

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.

Mr Pang
  • 1,083
  • 1
  • 8
  • 20

1 Answers1

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