This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v4 1/4] gdbserver: Rephrase loops in regsets_fetch/store_inferior_registers
- From: Pedro Alves <palves at redhat dot com>
- To: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>, gdb-patches at sourceware dot org
- Date: Fri, 12 Dec 2014 12:04:37 +0000
- Subject: Re: [PATCH v4 1/4] gdbserver: Rephrase loops in regsets_fetch/store_inferior_registers
- Authentication-results: sourceware.org; auth=none
- References: <1418379431-14407-1-git-send-email-arnez at linux dot vnet dot ibm dot com> <1418379431-14407-2-git-send-email-arnez at linux dot vnet dot ibm dot com>
On 12/12/2014 10:16 AM, Andreas Arnez wrote:
> Replace the while-loops in linux-low.c that iterate over regsets by
> for-loops. This makes it clearer what is iterated over. Also, since
> "continue" now moves on to the next iteration without having to
> increment the regset pointer first, the code is slightly reduced.
>
> In case of EIO the old code did not increment the regset pointer, but
> iterated over the same (now disabled) regset again. This extra
> iteration is now avoided.
Nice. Looks good to me.
Thanks,
Pedro Alves