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: Patrick Palka <patrick at parcs dot ath dot cx>
- To: Pedro Alves <palves at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 30 Jun 2015 13:49:20 -0400
- 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> <5592D298 dot 6090804 at redhat dot com>
On Tue, Jun 30, 2015 at 1:32 PM, Pedro Alves <palves@redhat.com> wrote:
> 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.
How convenient.
>
> 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.
Me too. The results are quite nice. TUI is silky smooth.
>
> Thanks,
> Pedro Alves
>