Minor reorganization of fetch_registers/store_registers in windows-nat.c
This patch is a small reorganizational patch that splits
do_windows_fetch_inferior_registers into two parts:
(a) One part that first reloads the thread's context when needed,
and then decides based on the given register number whether
one register needs to be fetched or all of them.
This part is moved to windows_nat_target::fetch_registers.
(b) The rest of the code, which actually fetches the register value
and supplies it to the regcache.
A similar treatment is applied to do_windows_store_inferior_registers.
This change is preparation work for changing the way we calculate
the location of a given register in the thread context structure,
and should be a no op.
gdb/ChangeLog:
* windows-nat.c (do_windows_fetch_inferior_registers): Rename
to windows_fetch_one_register, and only handle the case of
fetching one register. Move the code that reloads the context
and iterates over all registers if R is negative to...
(windows_nat_target::fetch_registers): ... here.
(do_windows_store_inferior_registers): Rename to
windows_store_one_register, and only handle the case of storing
one register. Move the code that handles the case where r is
negative to...
(windows_nat_target::store_registers) ... here.
Tested on x86-windows and x86_64-windows using AdaCore's testsuite.