This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] windows: Use ptid from regcache in register fetch/store
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Tue, 20 Jun 2017 17:35:45 -0400
- Subject: [binutils-gdb] windows: Use ptid from regcache in register fetch/store
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 3de88e9afbf0d8d10a8c4ce1415c219120e0a0c1 ***
Author: Simon Marchi <simon.marchi@ericsson.com>
Branch: master
Commit: 3de88e9afbf0d8d10a8c4ce1415c219120e0a0c1
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.