From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1120 invoked by alias); 31 Aug 2010 19:29:56 -0000 Received: (qmail 1105 invoked by uid 22791); 31 Aug 2010 19:29:56 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Aug 2010 19:29:51 +0000 Received: (qmail 6065 invoked from network); 31 Aug 2010 19:29:50 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 31 Aug 2010 19:29:50 -0000 From: Pedro Alves To: Michael Snyder Subject: Re: Different output from -gdb-show than show Date: Tue, 31 Aug 2010 19:29:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.33-29-realtime; KDE/4.4.2; x86_64; ; ) Cc: "gdb@sourceware.org" , Marc Khouzam References: <201008312007.57425.pedro@codesourcery.com> <4C7D5397.4000809@vmware.com> In-Reply-To: <4C7D5397.4000809@vmware.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201008312029.48109.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: 2010-08/txt/msg00181.txt.bz2 On Tuesday 31 August 2010 20:10:15, Michael Snyder wrote: > >> 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. A pointer to it is passed to add_setshow_enum_cmd: add_setshow_enum_cmd ("exec-direction", class_run, exec_direction_names, &exec_direction, _("Set direction of execution.\n\ Options are 'forward' or 'reverse'."), _("Show direction of execution (forward/reverse)."), _("Tells gdb whether to execute forward or backward."), set_exec_direction_func, show_exec_direction_func, &setlist, &showlist); "-gdb-show exec-direction" does not call the set callback, it prints the command's control enum value directly. (gdb) show exec-direction Forward. (gdb) interpreter-exec mi "-gdb-show exec-direction" ^done,value="forward" (gdb) Note "Forward." vs "forward". > 2010-08-31 Michael Snyder > > * infrun.c (set_exec_direction_func): Error out if target does not > support reverse execution. Okay. -- Pedro Alves