This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] PR python/13598 - add before_prompt event
- From: Tom Tromey <tom at tromey dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: Pedro Alves <palves at redhat dot com>, Matt Rice <ratmice at gmail dot com>, Yao Qi <qiyaoltc at gmail dot com>, "gdb-patches\@sourceware.org" <gdb-patches at sourceware dot org>
- Date: Sun, 09 Oct 2016 11:23:24 -0600
- Subject: Re: [RFA] PR python/13598 - add before_prompt event
- Authentication-results: sourceware.org; auth=none
- References: <1463806850-11001-1-git-send-email-tom@tromey.com> <CAH=s-PN=rQG=nxyB=YUPoDU4mSN6shAUskBUw8UmeJfm2UcLTw@mail.gmail.com> <CACTLOFqA-ZFfik=umzqsKy49bQr_OMzYjj6-m3o_MeqFzmd4Cg@mail.gmail.com> <87r3allziy.fsf@tromey.com> <c25e3f6c-ebc5-3a00-cace-ebef0123df74@redhat.com> <8737mkz325.fsf@tromey.com>
>>>>> "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