From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21984 invoked by alias); 10 Dec 2005 01:20:37 -0000 Received: (qmail 21976 invoked by uid 22791); 10 Dec 2005 01:20:36 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 10 Dec 2005 01:20:35 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id jBA1KX0r025277 for ; Fri, 9 Dec 2005 20:20:33 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id jBA1KWV10522; Fri, 9 Dec 2005 20:20:32 -0500 Received: from [172.16.24.50] (bluegiant.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id jBA1KVfU029243; Fri, 9 Dec 2005 20:20:31 -0500 Message-ID: <439A2D5E.6070201@redhat.com> Date: Sat, 10 Dec 2005 07:24:00 -0000 From: Michael Snyder User-Agent: Mozilla Thunderbird (X11/20050322) MIME-Version: 1.0 To: tromey@redhat.com CC: gdb-patches@sources.redhat.com Subject: Re: [RFA] checkpoint / restart, and multi-fork debugging References: <439614B1.2030206@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00187.txt.bz2 Tom Tromey wrote: >>>>>>"Michael" == Michael Snyder writes: > > > Michael> OK, ready for submission. > Michael> This patch adds two new functionalities for linux native debugging: > Michael> * Multiple fork debugging, and > Michael> * Checkpoint / Restart. > > I know nothing about the patch of course, but this looks like an > excellent feature. One thing that amazes me about it is that it is > conceptually simple but I don't recall ever hearing it as an idea > until recently. It's an idea that Stan Shebs and I have been kicking around for years. By the way, Stan is the one who thought of using fork to capture the state -- I've been very remiss about giving him credit for that. > One thing I didn't see mentioned in the docs is the effect on gdb of a > 'restart'. I assume that new breakpoints, watchpoints, etc, are kept > instead of reverting to the state at the checkpoint. Maybe this is > worth mentioning. Yes, thanks -- I'll work it in. You're correct, checkpoint only preserves the inferior's state, not the debugger's. All breakpoints and watchpoints are shared between checkpoints and/or forks. > 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'. True that.