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: Yao Qi <qiyaoltc at gmail dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: Matt Rice <ratmice at gmail dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 3 Aug 2016 09:33:23 +0100
- 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>
On Sat, Jul 23, 2016 at 6:00 AM, Tom Tromey <tom@tromey.com> wrote:
>>>>>> "Matt" == Matt Rice <ratmice@gmail.com> writes:
>
> Matt> In particular it's just a nice time to take a snapshot of some
> Matt> otherwise obtainable property from gdb right before control is handed
> Matt> back to the user.
>
> Yes, this is exactly why I added this.
>
> My original motivation was to get a notification when the selected frame
> changed. However, this happens a lot, sometimes temporarily. And, I
> wasn't interested in temporary frame changes -- just "final" changes,
> such as just after a command has completed and just before the prompt is
> displayed... which led to this approach.
If you are interested in changes in selected frames, we can add a python event
selected_frame_changed. However, as a python api, the event should be
general enough, IOW, your tool isn't interested in temporary frame changes,
but other python users may be interested in _all_ selected frame changes.
--
Yao (齐尧)