This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]