A simple test to reproduce: $ ./gdb -nx /bin/sleep GNU gdb (GDB) 7.12.50.20161125-git ... Reading symbols from /bin/sleep...(no debugging symbols found)...done. (gdb) r 123456 & Starting program: /bin/sleep 123456 (gdb) i th Id Target Id Frame * 1 process 23909 "sleep" (running) At this point, the process' state according to /proc/$pid/status is: State: S (sleeping) Then, we enable record and try to interrupt: (gdb) record (gdb) interrupt (gdb) i th Id Target Id Frame * 1 process 23909 "sleep" (running) (gdb) At this point, the process' state is: State: t (tracing stop) So it seems like the inferior received the signal and stopped correctly, but gdb missed the event or doesn't do anything about it.
I was wondering if we even expect to be able to enable record while the target is running or not. Should gdb tell you "can't do that while the target is running"?