This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fix list/edit command in hook-stop


> Date: Tue, 28 Feb 2006 10:30:35 -0600
> From: Jason Kraftcheck <kraftche@cae.wisc.edu>
> CC: Eli Zaretskii <eliz@gnu.org>
> 
> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]