This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/2] gdb: Add 'tui reg prev' command.
- From: Pedro Alves <palves at redhat dot com>
- To: Andrew Burgess <andrew dot burgess at embecosm dot com>, gdb-patches at sourceware dot org
- Date: Fri, 22 May 2015 18:05:59 +0100
- Subject: Re: [PATCH 1/2] gdb: Add 'tui reg prev' command.
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1432246159 dot git dot andrew dot burgess at embecosm dot com> <dca46b0276e36ec42116d95aa850de38978f3b70 dot 1432246159 dot git dot andrew dot burgess at embecosm dot com> <555E8104 dot 9030305 at redhat dot com> <20150522163739 dot GM2880 at embecosm dot com>
On 05/22/2015 05:37 PM, Andrew Burgess wrote:
> New version. I've addressed your comments from the first review. The
> reggroup_prev iterator has been fixed along the lines you suggested.
>
Great, thanks.
> +/* Implementation of the "tui reg prev" command. Cycle the register group
> + displayed in the tui REG window, moving backwards through the list of
> + available register groups. */
> +
> +static void
> +tui_reg_prev_command (char *arg, int from_tty)
> +{
> + struct gdbarch *gdbarch = get_current_arch ();
> +
> + if (TUI_DATA_WIN != NULL)
> + {
> + struct reggroup *group
> + = TUI_DATA_WIN->detail.data_display_info.current_group;
> +
> + group = reggroup_prev (gdbarch, group);
> + if (group == NULL)
> + group = reggroup_prev (gdbarch, NULL);
> +
> + if (group)
group != NULL.
> + tui_show_registers (group);
Indentation looks odd here.
Otherwise OK.
Thanks,
Pedro Alves