简体   繁体   中英

GDB step by step debugging of two threads

I have a c++ program running two threads. thread A and thread B. is there a way to do step by step debugging of both threads in GDB? steps should be something like this:

  1. Stop Threads A & B
  2. Switch to thread A. continue one step.
  3. Switch to thread B. continue two steps.

使用gdb命令“信息线程”查看该进程的所有线程,然后使用命令“ thread thread-id”顶部切换到所需的任何线程。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM