This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/3] Replace TUI's select_frame hook (PR tui/13378)
- From: Pedro Alves <palves at redhat dot com>
- To: Patrick Palka <patrick at parcs dot ath dot cx>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 30 Jun 2015 18:32:08 +0100
- Subject: Re: [PATCH 3/3] Replace TUI's select_frame hook (PR tui/13378)
- Authentication-results: sourceware.org; auth=none
- References: <5592B9F9 dot 2090208 at redhat dot com> <1435682400-7595-1-git-send-email-patrick at parcs dot ath dot cx> <5592CCC7 dot 5080101 at redhat dot com> <CA+C-WL9t6hLTzAENE+UopQFnrYYvEvYq+DgbEQxxow36FoAmug at mail dot gmail dot com>
On 06/30/2015 06:10 PM, Patrick Palka wrote:
>> Hmm, what about when the user changes registers with "print $rax = 1" etc.?
>> Do we end up with stale contents?
>
> Apparently not, thanks to our deprecated_register_changed_hook called
> from value_assign. So many hooks!
Phew! And luckily there's an equivalent registers_changed observer
we could use instead too.
Patch is OK, just please mention tui_register_changed_hook ...
> +/* Observer for the before_prompt notification. */
> +
> +static void
> +tui_before_prompt (const char *current_gdb_prompt)
> +{
> + /* This refresh is intended to catch changes to the selected frame following
> + a call to "up", "down" or "frame". As such we don't necessarily want to
> + refresh registers here as they could not have changed. Registers will be
> + refreshed after a normal stop. */
... here too.
Awesome. Glad that this is finally fixed.
Thanks,
Pedro Alves