windows: Don't use current_thread for register fetch/store
The windows_fetch_inferior_registers function sets current_thread then
calls do_windows_fetch_inferior_registers, which reads current_thread.
This very much looks like passing a parameter through a global variable.
I think it would be more straightforward to pass the thread as a
parameter.
It will also fit better with the following patches, which pass a ptid to
the register fetch/store target methods.
I don't have access to a Windows development environment, so I couldn't
even build-test this. Could somebody try it to make sure it doesn't
break everything?
gdb/ChangeLog:
* windows-nat.c (do_windows_fetch_inferior_registers): Add
windows_thread_info parameter and use it instead of
current_thread.
(windows_fetch_inferior_registers): Don't set current_thread,
pass the thread to do_windows_fetch_inferior_registers.
(do_windows_store_inferior_registers): Add windows_thread_info
parameter and use it instead of current_thread.
(windows_store_inferior_registers): Don't set current_thread,
pass the thread to do_windows_store_inferior_registers.