windows: Use ptid from regcache in register fetch/store
authorSimon Marchi <simon.marchi@ericsson.com>
Tue, 21 Mar 2017 15:35:54 +0000 (11:35 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Tue, 21 Mar 2017 15:35:54 +0000 (11:35 -0400)
commit3de88e9afbf0d8d10a8c4ce1415c219120e0a0c1
treeb1f290b954e78896ff33a2f6ebe354e05fae4d7b
parent0e7b8f61069f1219ca53a9dd927ba55c9a7eefd4
windows: Use ptid from regcache in register fetch/store

Use the ptid from the regcache so we don't depend on the current value
of the inferior_ptid global.

Also, change how the current thread is passed to sub-functions.  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.

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.  Use
ptid from regcache instead of inferior_ptid.
(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.  Use
ptid from regcache instead of inferior_ptid.
gdb/ChangeLog
gdb/windows-nat.c
This page took 0.02586 seconds and 4 git commands to generate.