This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] checkpoint / restart, and multi-fork debugging
> Date: Fri, 09 Dec 2005 17:33:48 -0800
> From: Michael Snyder <msnyder@redhat.com>
> CC: gdb-patches@sourceware.org
>
> Daniel Jacobowitz wrote:
> > On Fri, Dec 09, 2005 at 04:23:34PM +0200, Eli Zaretskii wrote:
> >
> >>>A nice problem this solves is handling watchpoints when the system has
> >>>address space randomization. I run into this all the time when
> >>>debugging -- back before this feature was added to the OS I would put
> >>>a fair amount of effort into finding some address to watch in one
> >>>debug session, then restart the inferior with a watchpoint set.
> >>>Randomization made this impossible; but with this patch I could just
> >>>make a checkpoint at 'main'.
> >>
> >>Perhaps we should mention this as well.
> >
> > Amen!
>
> Something like this?
>
> It may be useful to take a checkpoint at 'main', and return
> to that checkpoint instead of restarting the program. This
> will help keep things deterministic by avoiding random things
> that may occur during creation of a new process (such as
> address space randomization).
Yes, except that I'd explicitly mention that some systems, like
GNU/Linux, randomize the address space for security reasons, and that
on such systems it is hard to set a watchpoint or breakpoint on
absolute addresses. Then the suggested use of this feature will make
more sense, I think.