From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18225 invoked by alias); 28 Feb 2006 20:09:24 -0000 Received: (qmail 18217 invoked by uid 22791); 28 Feb 2006 20:09:23 -0000 X-Spam-Check-By: sourceware.org Received: from gandalf.inter.net.il (HELO gandalf.inter.net.il) (192.114.186.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 28 Feb 2006 20:09:21 +0000 Received: from nitzan.inter.net.il (nitzan.inter.net.il [192.114.186.20]) by gandalf.inter.net.il (MOS 3.7.1-GA) with ESMTP id IAA09311; Tue, 28 Feb 2006 22:08:39 +0200 (IST) Received: from HOME-C4E4A596F7 (IGLD-80-230-46-240.inter.net.il [80.230.46.240]) by nitzan.inter.net.il (MOS 3.7.3-GA) with ESMTP id CUN09065 (AUTH halo1); Tue, 28 Feb 2006 22:08:37 +0200 (IST) Date: Tue, 28 Feb 2006 22:33:00 -0000 Message-Id: From: Eli Zaretskii To: Jason Kraftcheck CC: gdb-patches@sources.redhat.com In-reply-to: <44047AAB.4070102@cae.wisc.edu> (message from Jason Kraftcheck on Tue, 28 Feb 2006 10:30:35 -0600) Subject: Re: fix list/edit command in hook-stop Reply-to: Eli Zaretskii References: <43FDFCDE.9090603@cae.wisc.edu> <20060223210220.GC2353@nevyn.them.org> <43FE336D.1010502@cae.wisc.edu> <44047AAB.4070102@cae.wisc.edu> 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/msg00512.txt.bz2 > Date: Tue, 28 Feb 2006 10:30:35 -0600 > From: Jason Kraftcheck > CC: Eli Zaretskii > > Eli Zaretskii wrote: > ... > > > > I'd suggest a comment here explaining why set_current_sal_from_frame > > is called. > > OK. > [...] > + /* Set current sal for use by edit or list commands if > + called from within hook-stop */ > + if (target_has_stack) > + set_current_sal_from_frame (get_current_frame (), 1); > + catch_errors (hook_stop_stub, stop_command, > + "Error while running hook_stop:\n", RETURN_MASK_ALL); > + } Thanks. However, I thought we should explain why set_current_sal_from_frame is called here. I believe the reason is that without the call, the current sal will not be up to date if `edit' or `list' are called inside a hook-stop.