gdbserver: Rephrase loops in regsets_fetch/store_inferior_registers
authorAndreas Arnez <arnez@linux.vnet.ibm.com>
Fri, 12 Dec 2014 13:14:20 +0000 (14:14 +0100)
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Fri, 12 Dec 2014 13:15:06 +0000 (14:15 +0100)
commit28eef6727d3cd4461091a752c19c418d1bf3bcb7
treee7948652075691892f4f768dfcef4610f92916f5
parent6cabe1ea460c54c17ac877b2541eccf91d6b4b9c
gdbserver: Rephrase loops in regsets_fetch/store_inferior_registers

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.

gdb/gdbserver/ChangeLog:

* linux-low.c (regsets_fetch_inferior_registers): Rephrase
while-loop as for-loop.
(regsets_store_inferior_registers): Likewise.
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-low.c