From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2738 invoked by alias); 10 Dec 2005 22:23:19 -0000 Received: (qmail 2730 invoked by uid 22791); 10 Dec 2005 22:23:18 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 10 Dec 2005 22:23:18 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-70-128.inter.net.il [80.230.70.128]) by romy.inter.net.il (MOS 3.7.2-GA) with ESMTP id DDM89851 (AUTH halo1); Sun, 11 Dec 2005 00:23:12 +0200 (IST) Date: Tue, 13 Dec 2005 06:17:00 -0000 Message-Id: From: Eli Zaretskii To: Michael Snyder CC: drow@false.org, gdb-patches@sourceware.org In-reply-to: <439A307C.3080107@redhat.com> (message from Michael Snyder on Fri, 09 Dec 2005 17:33:48 -0800) Subject: Re: [RFA] checkpoint / restart, and multi-fork debugging Reply-to: Eli Zaretskii References: <439614B1.2030206@redhat.com> <20051209143700.GB11917@nevyn.them.org> <439A307C.3080107@redhat.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-12/txt/msg00202.txt.bz2 > Date: Fri, 09 Dec 2005 17:33:48 -0800 > From: Michael Snyder > 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.