From 3c76026df83bed7d97ed45e5b906b679a154b076 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 8 Apr 2020 14:33:35 -0600 Subject: Share some Windows-related globals This moves some Windows-related globals into nat/windows-nat.c, sharing them between gdb and gdbserver. gdb/ChangeLog 2020-04-08 Tom Tromey * windows-nat.c (current_process_handle, current_process_id) (main_thread_id, last_sig, current_event, last_wait_event) (current_windows_thread, desired_stop_thread_id, pending_stops) (struct pending_stop, siginfo_er): Move to nat/windows-nat.c. (display_selectors, fake_create_process) (get_windows_debug_event): Update. * nat/windows-nat.h (current_process_handle, current_process_id) (main_thread_id, last_sig, current_event, last_wait_event) (current_windows_thread, desired_stop_thread_id, pending_stops) (struct pending_stop, siginfo_er): Move from windows-nat.c. * nat/windows-nat.c (current_process_handle, current_process_id) (main_thread_id, last_sig, current_event, last_wait_event) (current_windows_thread, desired_stop_thread_id, pending_stops) (siginfo_er): New globals. Move from windows-nat.c. gdbserver/ChangeLog 2020-04-08 Tom Tromey * win32-low.c (current_process_handle, current_process_id) (main_thread_id, last_sig, current_event, siginfo_er): Move to nat/windows-nat.c. --- gdbserver/ChangeLog | 6 ++++++ gdbserver/win32-low.cc | 8 -------- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'gdbserver') diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog index c6ad533..ce547c1 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -1,5 +1,11 @@ 2020-04-08 Tom Tromey + * win32-low.c (current_process_handle, current_process_id) + (main_thread_id, last_sig, current_event, siginfo_er): Move to + nat/windows-nat.c. + +2020-04-08 Tom Tromey + * win32-low.c (get_image_name): Remove. (handle_load_dll): Update. diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc index 810896e..7060b6d 100644 --- a/gdbserver/win32-low.cc +++ b/gdbserver/win32-low.cc @@ -74,14 +74,6 @@ int using_threads = 1; /* Globals. */ static int attaching = 0; -static HANDLE current_process_handle = NULL; -static DWORD current_process_id = 0; -static DWORD main_thread_id = 0; -static EXCEPTION_RECORD siginfo_er; /* Contents of $_siginfo */ -static enum gdb_signal last_sig = GDB_SIGNAL_0; - -/* The current debug event from WaitForDebugEvent. */ -static DEBUG_EVENT current_event; /* A status that hasn't been reported to the core yet, and so win32_wait should return it next, instead of fetching the next -- cgit v1.1