[问题] set scheduler_locking off 之后...

楼主: radom (缺水中...)   2020-10-21 11:01:57
开发平台(Platform): (Ex: Win10, Linux, ...)
Llinux
编译器(Ex: GCC, clang, VC++...)+目标环境(跟开发平台不同的话需列出)
GCC
问题(Question):
程式为multi-thread
在GDB中,为了停在有问题的code中,不要被其他thread干扰,
而下了 set scheduler-locking on
之后不小心下了 continue 的指令(应该先下 set scheduler-locking off)
出现了类似
[Thread 0x2ade69eee700 (LWP 31869) exited]
然后它就不理我了....
请问我该怎么跳到别的thread让它继续执行下去呢?
按了ctrl-c、ctrl-z都没用
看top中我的程式也没在跑的样子 ...
谢谢 ~~~
作者: ucrxzero (RX-0)   2020-10-21 11:04:00
所以你还在gdb的shell内吗直接r?
楼主: radom (缺水中...)   2020-10-21 11:22:00
还在啊...按了r不就重run了?
作者: b0920075 (Void)   2020-10-21 11:30:00
info thread 看编号然后 thread 编号?
作者: LPH66 (-6.2598534e+18f)   2020-10-21 11:33:00
gdb 是有个 thread 指令可以切换 thread 啦...
作者: ucrxzero (RX-0)   2020-10-21 11:51:00
对啊看不懂你为啥可以top还能再gdb shell内 你是用shell top?反正只知道你的那个执行绪已经跑完了重现那个状况 移过去那个执行绪看bt 为啥死在那可行吗你都可以Ctenophora+c了为啥不能重跑Ctrl +c

Links booklink

Contact Us: admin [ a t ] ucptt.com