[PATCH v4 1/4] gdbserver: Rephrase loops in regsets_fetch/store_inferior_registers

Pedro Alves palves@redhat.com
Fri Dec 12 12:04:00 GMT 2014


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



More information about the Gdb-patches mailing list