From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19396 invoked by alias); 12 Jul 2009 14:20:20 -0000 Received: (qmail 19384 invoked by uid 22791); 12 Jul 2009 14:20:19 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 12 Jul 2009 14:20:12 +0000 Received: (qmail 17173 invoked from network); 12 Jul 2009 14:19:09 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 12 Jul 2009 14:19:09 -0000 From: Pedro Alves To: gdb@sourceware.org Subject: Re: Testing of reverse debug commands Date: Sun, 12 Jul 2009 14:20:00 -0000 User-Agent: KMail/1.9.10 Cc: Joel Brobecker , Michael Snyder , Hui Zhu References: <4A5930EE.3040201@vmware.com> <20090712080145.GB10756@adacore.com> In-Reply-To: <20090712080145.GB10756@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907121520.19647.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00078.txt.bz2 On Sunday 12 July 2009 09:01:45, Joel Brobecker wrote: > > gdb_test "record" "" "Turn on process record" > > # FIXME: command ought to acknowledge, so we can test if it succeeded. > > This is just a shot in the dark since I really don't have much time > to double-check this, but does gdb_test_multiple allow you to verify > that no output was generated? For some reason, I thought it did. You should be able to see the precord target in the target stack with "maint print target-stack". You could also use it to plug that FIXME, but, it's a bit ugly since it exposes precord's implementation details. Can't the user ask GDB if process record is in effect (at any time)? This seems like something a user would want to do --- "hmmm, I forget, am I recording now?". I can think of other interesting things that would be nice to be able to query GDB, e.g.: "what is the status of the recording buffers?" --- maybe there should be a "record status" command or something like that. Is there one already? Another hack would be to send GDB another "record" and see if this query shows up: record_open () /* Check if record target is already running. */ if (current_target.to_stratum == record_stratum) { if (!nquery (_("Process record target already running, do you want to delete " "the old record log?"))) return; } That's also hackish, but the good thing is that you end up adding a test for a code path that isn't tested currently. :-) -- Pedro Alves