This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: fix list/edit command in hook-stop
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jason Kraftcheck <kraftche at cae dot wisc dot edu>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 23 Feb 2006 16:02:20 -0500
- Subject: Re: fix list/edit command in hook-stop
- References: <43FDFCDE.9090603@cae.wisc.edu>
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 <kraftche@cae.wisc.edu>
>
> * 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