This is the mail archive of the
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: <firstname.lastname@example.org> <CAH=s-PN=rQG=nxyB=YUPoDU4mSN6shAUskBUw8UmeJfm2UcLTw@mail.gmail.com> <CACTLOFqA-ZFfik=umzqsKy49bQr_OMzYjj6-m3o_MeqFzmd4Cg@mail.gmail.com> <email@example.com> <firstname.lastname@example.org> <email@example.com>
>>>>> "Tom" == Tom Tromey <firstname.lastname@example.org> 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.
I'd like this patch to be reconsidered for approval.
Today I tried rewriting this patch to use the new
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:
... 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.