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: Matt Rice <ratmice at gmail dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, Tom Tromey <tom at tromey dot com>, "gdb-patches\@sourceware.org" <gdb-patches at sourceware dot org>
- Date: Fri, 22 Jul 2016 23:00:21 -0600
- Subject: Re: [RFA] PR python/13598 - add before_prompt event
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com> <CAH=s-PN=rQG=nxyB=YUPoDU4mSN6shAUskBUw8UmeJfm2UcLTw@mail.gmail.com> <CACTLOFqA-ZFfik=umzqsKy49bQr_OMzYjj6-m3o_MeqFzmd4Cg@mail.gmail.com>
>>>>> "Matt" == Matt Rice <firstname.lastname@example.org> 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.
Right now my GUI uses this event to react appropriately when the user
types "up" or "down".