binutils-gdb/gdb/nat
Pedro Alves 50838d1be7 Don't write to inferior_ptid in windows-nat.c, part II
Writing to inferior_ptid in
windows_nat_target::get_windows_debug_event is just incorrect and not
necessary.  We'll report the event to GDB's core, which then takes
care of switching inferior_ptid / current thread.

Related (see windows_nat_target::get_windows_debug_event), there's
also a "current_windows_thread" global that is just begging to get out
of sync with core GDB's current thread.  This patch removes it.
gdbserver already does not have an equivalent global in win32-low.cc.

gdb/ChangeLog:
2020-06-18  Pedro Alves  <palves@redhat.com>

	* nat/windows-nat.c (current_windows_thread): Remove.
	* nat/windows-nat.h (current_windows_thread): Remove.
	* windows-nat.c (windows_nat_target::stopped_by_sw_breakpoint):
	Adjust.
	(display_selectors): Adjust to fetch the current
	windows_thread_info based on inferior_ptid.
	(fake_create_process): No longer write to current_windows_thread.
	(windows_nat_target::get_windows_debug_event):
	Don't set inferior_ptid or current_windows_thread.
	(windows_nat_target::wait): Adjust to not rely on
	current_windows_thread.
	(do_initial_windows_stuff): Now a method of windows_nat_target.
	Switch to the last_ptid thread.
	(windows_nat_target::attach): Adjust.
	(windows_nat_target::detach): Use switch_to_no_thread instead of
	writing to inferior_ptid directly.
	(windows_nat_target::create_inferior): Adjust.
2020-06-18 23:17:01 +01:00
..
aarch64-linux-hw-point.c
aarch64-linux-hw-point.h
aarch64-linux.c
aarch64-linux.h
aarch64-sve-linux-ptrace.c
aarch64-sve-linux-ptrace.h
aarch64-sve-linux-sigcontext.h
amd64-linux-siginfo.c
amd64-linux-siginfo.h
fork-inferior.c
fork-inferior.h
gdb_ptrace.h gdb: remove HAVE_DECL_PTRACE 2020-03-20 11:57:49 -04:00
gdb_thread_db.h
glibc_thread_db.h
linux-btrace.c Disable record btrace bts support for AMD processors 2020-05-14 17:56:33 -07:00
linux-btrace.h
linux-namespaces.c
linux-namespaces.h
linux-nat.h
linux-osdata.c
linux-osdata.h
linux-personality.c
linux-personality.h
linux-procfs.c
linux-procfs.h
linux-ptrace.c
linux-ptrace.h
linux-waitpid.c
linux-waitpid.h
mips-linux-watch.c
mips-linux-watch.h
ppc-linux.c
ppc-linux.h
riscv-linux-tdesc.c
riscv-linux-tdesc.h
windows-nat.c Don't write to inferior_ptid in windows-nat.c, part II 2020-06-18 23:17:01 +01:00
windows-nat.h Don't write to inferior_ptid in windows-nat.c, part II 2020-06-18 23:17:01 +01:00
x86-cpuid.h
x86-dregs.c
x86-dregs.h
x86-gcc-cpuid.h
x86-linux-dregs.c
x86-linux-dregs.h
x86-linux.c
x86-linux.h