Eyes Above The Waves

Robert O'Callahan. Christian. Repatriate Kiwi. Hacker.

Saturday 6 June 2015

Small Change To rr Behavior

To address issue 1490, I just checked in an rr improvement that changes the behavior of gdb+rr in a user-visible way. When the last thread of the debuggee process exits, rr generates a fake SIGKILL signal before exiting the process. This gives the user a chance to reverse-execute from the end of the debuggee execution, when previously rr would have let the process terminate normally so reverse execution cannot occur. The new behavior is a little bit of a lie since in most cases SIGKILL was never actually sent, but I hope the usefulness of this new behavior outweights any possible confusion.

Comments

glandium
Man, that would have been so useful in the various occasions where I had to debug a program that prematurely exited. That being said, considering reverse-execution is supported by gdb itself, I wonder if gdb shouldn't be the one doing it, possibly optionally.