From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28766 invoked by alias); 12 Jul 2009 19:07:38 -0000 Received: (qmail 28757 invoked by uid 22791); 12 Jul 2009 19:07:37 -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 19:07:29 +0000 Received: (qmail 18636 invoked from network); 12 Jul 2009 19:07:26 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 12 Jul 2009 19:07:26 -0000 From: Pedro Alves To: gdb@sourceware.org Subject: Re: Testing of reverse debug commands Date: Sun, 12 Jul 2009 19:07:00 -0000 User-Agent: KMail/1.9.10 Cc: "Marc Khouzam" , "Michael Snyder" , "Jan Kratochvil" , "Joel Brobecker" , "Hui Zhu" References: <4A5930EE.3040201@vmware.com> <4A5A19FC.9050206@vmware.com> <6D19CA8D71C89C43A057926FE0D4ADAA07B71A36@ecamlmw720.eamcs.ericsson.se> In-Reply-To: <6D19CA8D71C89C43A057926FE0D4ADAA07B71A36@ecamlmw720.eamcs.ericsson.se> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907122007.38248.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/msg00084.txt.bz2 On Sunday 12 July 2009 19:49:58, Marc Khouzam wrote: > From a frontend perspective, the current 'record' command is not very > good. > First, there is no MI equivalent, although that is not a big deal. > But since it does not report error, the frontend must always assumes > that > the command worked. Are you sure that is the case with "record"? I see `error' calls in record.c:record_open. If there are some missing, let's add them. > Below you can see that using 'record stop' directly will give a ^done > instead of an ^error when it fails (although there is an error message > but we don't parse those in Eclipse). Also, using -interpreter-exec > is even worse as even the error message is gone. Note that "record stop" is really a different command, although it shares a common "record" prefix. > > (gdb) > record stop > &"record stop\n" > ~"Process record is not started.\n" > ^done > (gdb) > So, I think some improvement would be nice for frontends. So, is this really an error? Hui seems to have thought it wasn't. Hui? If it is, then it's just a matter of changing the corresponding printf_unfiltered calls in record.c to `error' calls (look for the "Process record is..." string). Then MI will get an ^error,msg="foo", instead of a ~"foo" + ^done. -- Pedro Alves