gdbserver: introduce and use regcache::set_register_status

Introduce and use a setter method in regcache to set the status of a
register.  There already exists get_register_status.  So, it made
sense to add the setter to control access to the register_status
field.

In two places, we also do cosmetic improvements to for-loops.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
2 files changed