Open GoogleCodeExporter opened 9 years ago
The "problem" here is that the exit event gets sent to the debugger when the
application has actually exited. This means that it literally no longer exists.
I do believe that there is a ptrace flag to be able to trap exit events, so
I'll look into that and if possible, at least make it an option.
Evan Teran
Original comment by evan.teran
on 3 Oct 2012 at 3:56
Well, I know that gdb can do this (ie. after exit of debuggee, allow you to
restart it with BPs intact) so it must be possible. A quick grep through the
kernel src revealed the option PTRACE_O_TRACEEXIT, which may be what you want.
Google turned up http://www.technovelty.org/linux/ptrace-exit.html, which talks
about this very thing. I'm guessing if you can save EDB's internal state (eg
BPs) at debuggee exit, and then reload debuggee and state after exit, you could
accomplish the desired behavior.
With gdb, the debuggee is also 'really terminated' at exit, ie disappears from
the process list, and then comes back after you restart, so it would seem gdb
does something similar to the above.
Original comment by evan.teran
on 3 Oct 2012 at 3:56
yup, that's the flag I was thinking of. I'll look into it. I'm not quite sure
how the "resurrecting" works in GDB. Maybe I'll take a look at that code.
Currently to restart, I just kill the processes and run it again. Which
unfortunately has the side effect of re-doing the address space layout
randomization (making restoring breakpoint slightly more complicated, I plan to
address this with relative BPs stored in the session files).
Like I said, I'll look into it and try to make it an option.
Evan Teran
Original comment by evan.teran
on 3 Oct 2012 at 3:57
Original comment by evan.teran
on 4 Apr 2014 at 3:47
Original issue reported on code.google.com by
evan.teran
on 3 Oct 2012 at 3:21