在记录模式下,GDB不会中断

时间:2018-10-08 18:55:39

标签: c++ debugging gdb

我试图在(多线程)C ++程序上使用GDB的过程记录和重放功能。在record模式下,GDB不会在我设置的任何断点处中断。如果我不处于record模式,则可以很好地操作GDB(在断点处设置和中断,step / next / continue等)

在这里,我没有设置任何断点,而是尝试在开始录制后简单地continue

(gdb) record
(gdb) **I hit the Return key here**
The process is already being recorded.  Use "record stop" to stop recording first.
(gdb) continue
Continuing.
Couldn't get registers: No such process.
(gdb) Couldn't get registers: No such process.
(gdb) continue
Continuing.
Cannot execute this command while the selected thread is running.
(gdb) info threads
  Id   Target Id         Frame 
  1    Thread 0x7fad1826a740 (LWP 161777) "athena.py" (running)
  2    Thread 0x7faccba31700 (LWP 162405) "athena.py" (running)
  3    Thread 0x7faccc432700 (LWP 162404) "athena.py" (running)
  4    Thread 0x7facf6c1d740 (LWP 161852) "athena.py" (running)
* 5    Thread 0x7facfcc36700 (LWP 161851) "athena.py" (running)

如果设置断点然后continue,我仍然会收到相同的错误消息。 info threads也不显示任何线程都达到了断点(它们都表示为正在运行)。

athena.py是C ++程序的Python接口。众所周知,基本的GDB功能可以与此接口和程序很好地协同工作。

0 个答案:

没有答案