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


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


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