GDB establece un punto de interrupción en un hilo

break <linespec> thread <threadno>
break <linespec> thread <threadno> if...

linespec指定了断点设置在的源程序的行号
threadno指定了线程的ID ID是GDB分配的 可以通过info threads命令来查看正在运行程序中的线程信息 
如果不指定thread <threadno>表示断点设在所有线程上面 
还可以为某线程指定断点条件
例:(gdb) break frik.c:13 thread 28 if bartab > lim

当程序被GDB停住时,所有运行线程都会被停住,恢复运行时所有的线程也会被恢复运行

Supongo que te gusta

Origin blog.csdn.net/qq_42823109/article/details/102538461
Recomendado
Clasificación