[RFA] PR python/13598 - add before_prompt event

Tom Tromey tom@tromey.com
Sun Oct 9 17:23:00 GMT 2016


>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:

Pedro> The TUI uses this approach too nowadays.

Tom> Thanks for mentioning that.  I think it's another argument for accepting
Tom> this patch.

Hi!

I'd like this patch to be reconsidered for approval.

Today I tried rewriting this patch to use the new
user_selected_context_changed observer.

However, this runs into problems.

First, this observer is not notified when a breakpoint is hit.
It seems to me like it ought to be.

One idea is to attach a second handler to the "stop" event.  However,
stop events are fired too often -- in particular if you set a breakpoint
and put commands like this:

  silent
  cont

... the "stop" event will be fired for every breakpoint hit -- even
though from a "user" point of view this isn't stopping.

Given that the TUI uses the approach given in the before_prompt patch,
and given that there haven't been any negative comments on the patch
itself, I'd like to suggest approving this patch.  As noted elsewhere,
acceptance of this patch does not prevent inclusion of any future event.

thanks,
Tom



More information about the Gdb-patches mailing list