From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24951 invoked by alias); 31 Aug 2010 19:10:22 -0000 Received: (qmail 24939 invoked by uid 22791); 31 Aug 2010 19:10:21 -0000 X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Aug 2010 19:10:17 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id C878E13028; Tue, 31 Aug 2010 12:10:15 -0700 (PDT) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost2.vmware.com (Postfix) with ESMTP id BB41B8E62E; Tue, 31 Aug 2010 12:10:15 -0700 (PDT) Message-ID: <4C7D5397.4000809@vmware.com> Date: Tue, 31 Aug 2010 19:10:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20100702) MIME-Version: 1.0 To: Pedro Alves CC: "gdb@sourceware.org" , Marc Khouzam Subject: Re: Different output from -gdb-show than show References: <201008311940.55038.pedro@codesourcery.com> <4C7D51EA.9020701@vmware.com> <201008312007.57425.pedro@codesourcery.com> In-Reply-To: <201008312007.57425.pedro@codesourcery.com> Content-Type: multipart/mixed; boundary="------------010804090509030701030106" 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: 2010-08/txt/msg00180.txt.bz2 This is a multi-part message in MIME format. --------------010804090509030701030106 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Content-length: 889 Pedro Alves wrote: > On Tuesday 31 August 2010 20:03:06, Michael Snyder wrote: >> Pedro Alves wrote: >>> On Tuesday 31 August 2010 19:33:17, Michael Snyder wrote: >>> >>>> Would this be suitable? >>> You also need to reset exec_direction back from execution_direction >>> in set_exec_direction_func. The set command callbacks are called _after_ >>> their controlled variable has already been changed. See >>> infrun.c:set_non_stop, for example. >>> >> Hmmm, but "exec_direction" doesn't actually seem to be used anywhere. >> >> I did try this patch, and after failing to set "reverse", it >> still shows "Forward". >> >> What am I missing? > > That "-gdb-show exec-direction" reads from exec_direction. See > Marc's original bug report upthread. :-) > I don't see how, since it's a static variable and I've looked at every local reference to it. But anyway, here's a new patch: --------------010804090509030701030106 Content-Type: text/plain; name="infrun.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="infrun.txt" Content-length: 731 2010-08-31 Michael Snyder * infrun.c (set_exec_direction_func): Error out if target does not support reverse execution. Index: infrun.c =================================================================== RCS file: /cvs/src/src/gdb/infrun.c,v retrieving revision 1.445 diff -u -p -r1.445 infrun.c --- infrun.c 1 Jul 2010 15:36:15 -0000 1.445 +++ infrun.c 31 Aug 2010 19:09:07 -0000 @@ -6436,6 +6436,11 @@ set_exec_direction_func (char *args, int else if (!strcmp (exec_direction, exec_reverse)) execution_direction = EXEC_REVERSE; } + else + { + exec_direction = exec_forward; + error (_("Target does not support this operation.")); + } } static void --------------010804090509030701030106--