From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tom@tromey.com>, Matt Rice <ratmice@gmail.com>
Cc: Yao Qi <qiyaoltc@gmail.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [RFA] PR python/13598 - add before_prompt event
Date: Wed, 03 Aug 2016 16:16:00 -0000 [thread overview]
Message-ID: <c25e3f6c-ebc5-3a00-cace-ebef0123df74@redhat.com> (raw)
In-Reply-To: <87r3allziy.fsf@tromey.com>
On 07/23/2016 06:00 AM, Tom Tromey 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.
>
> Right now my GUI uses this event to react appropriately when the user
> types "up" or "down".
The TUI uses this approach too nowadays.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
commit 0986c744dfecb8177de90020646090e9ed23cfe7
Author: Patrick Palka <patrick@parcs.ath.cx>
AuthorDate: Tue Jun 30 13:56:49 2015 -0400
Replace TUI's select_frame hook (PR tui/13378)
The select_frame hook is used by TUI to update TUI's frame and register
information following changes to the selected frame. The problem with
this hook is that it gets called after every single frame change, even
if the frame change is only temporary or internal. This is the primary
cause of flickering and slowdown when running the inferior under TUI
with conditional breakpoints set. Internal GDB events are the source of
many calls to select_frame and these internal events are triggered
frequently, especially when a few conditional breakpoints are set.
This patch removes the select_frame hook altogether and instead makes
the frame and register information get updated in two key places (using
observers): after an inferior stops, and right before displaying a
prompt. The latter hook covers the case when frame information must be
updated following a call to "up", "down" or "frame", and the former
covers the case when frame and register information must be updated
after a call to "continue", "step", etc. or after the inferior stops in
async execution mode. Together these hooks should cover all the cases
when frame information ought to be refreshed (and when the relevant
windows ought to be subsequently updated).
[...]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks,
Pedro Alves
next prev parent reply other threads:[~2016-08-03 16:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-21 5:01 Tom Tromey
2016-05-21 6:54 ` Eli Zaretskii
2016-07-22 9:34 ` Phil Muldoon
2016-07-22 10:01 ` Yao Qi
2016-07-22 10:22 ` Matt Rice
2016-07-23 5:00 ` Tom Tromey
2016-08-03 8:33 ` Yao Qi
2016-08-03 16:08 ` Tom Tromey
2016-08-03 16:16 ` Pedro Alves [this message]
2016-08-04 20:34 ` Tom Tromey
2016-08-05 17:30 ` Pedro Alves
2016-10-09 17:23 ` Tom Tromey
2016-07-22 13:28 ` Phil Muldoon
2017-02-11 15:33 ` Tom Tromey
2017-02-12 23:02 ` Yao Qi
2017-02-14 18:03 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c25e3f6c-ebc5-3a00-cace-ebef0123df74@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.com \
--cc=ratmice@gmail.com \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox