From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20196 invoked by alias); 23 Feb 2006 21:02:24 -0000 Received: (qmail 20188 invoked by uid 22791); 23 Feb 2006 21:02:23 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 23 Feb 2006 21:02:23 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FCNbR-0000fT-0A; Thu, 23 Feb 2006 16:02:21 -0500 Date: Thu, 23 Feb 2006 21:13:00 -0000 From: Daniel Jacobowitz To: Jason Kraftcheck Cc: gdb-patches@sources.redhat.com Subject: Re: fix list/edit command in hook-stop Message-ID: <20060223210220.GC2353@nevyn.them.org> Mail-Followup-To: Jason Kraftcheck , gdb-patches@sources.redhat.com References: <43FDFCDE.9090603@cae.wisc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43FDFCDE.9090603@cae.wisc.edu> User-Agent: Mutt/1.5.8i 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: 2006-02/txt/msg00442.txt.bz2 On Thu, Feb 23, 2006 at 12:20:14PM -0600, Jason Kraftcheck wrote: > An 'edit' or 'list' command in hook-stop doesn't work because the > current sal isn't updated until after hook-stop is run. The following > trivial change moves the invocation of hook-stop later in normal_stop. > This won't fix the problem in all cases, as the sal is apparently only > updated if print_stack_frame is called. But it doesn't hurt anything > and works more often than without the change. > > > 2006-02-23 Jason Kraftcheck > > * infrun.c (normal_stop): call hook-stop handler later, after > current sal has been set. >From the manual: In addition, a pseudo-command, `stop' exists. Defining (`hook-stop') makes the associated commands execute every time execution stops in your program: before breakpoint commands are run, displays are printed, or the stack frame is printed. Your patch would change that; a stop hook which conditionally continued would now be noisy instead of silent, so I don't think this is a good change. Can you just update the sal explicitly, instead of moving things around? -- Daniel Jacobowitz CodeSourcery