Bug 20869 - "record full" while target is running breaks run control
Summary: "record full" while target is running breaks run control
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: record (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-25 18:17 UTC by Simon Marchi
Modified: 2016-11-25 18:17 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Marchi 2016-11-25 18:17:08 UTC
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.
Comment 1 Simon Marchi 2016-11-25 18:17:54 UTC
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"?