diff options
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/nat/windows-nat.c | 5 | ||||
-rw-r--r-- | gdb/nat/windows-nat.h | 2 | ||||
-rw-r--r-- | gdbserver/ChangeLog | 4 | ||||
-rw-r--r-- | gdbserver/win32-low.cc | 1 |
5 files changed, 17 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 83aa877..91f84c6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2020-04-08 Tom Tromey <tromey@adacore.com> + * nat/windows-nat.h (struct windows_thread_info): Declare + destructor. + * nat/windows-nat.c (~windows_thread_info): New. + +2020-04-08 Tom Tromey <tromey@adacore.com> + PR gdb/22992 * windows-nat.c (current_event): Update comment. (last_wait_event, desired_stop_thread_id): New globals. diff --git a/gdb/nat/windows-nat.c b/gdb/nat/windows-nat.c index 767ed8c..ca3e308 100644 --- a/gdb/nat/windows-nat.c +++ b/gdb/nat/windows-nat.c @@ -19,6 +19,11 @@ #include "gdbsupport/common-defs.h" #include "nat/windows-nat.h" +windows_thread_info::~windows_thread_info () +{ + CloseHandle (h); +} + void windows_thread_info::suspend () { diff --git a/gdb/nat/windows-nat.h b/gdb/nat/windows-nat.h index 224ae5c..ccdf207 100644 --- a/gdb/nat/windows-nat.h +++ b/gdb/nat/windows-nat.h @@ -32,6 +32,8 @@ struct windows_thread_info { } + ~windows_thread_info (); + DISABLE_COPY_AND_ASSIGN (windows_thread_info); /* Ensure that this thread has been suspended. */ diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog index 29d1760..e727413 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -1,5 +1,9 @@ 2020-04-08 Tom Tromey <tromey@adacore.com> + * win32-low.c (delete_thread_info): Don't call CloseHandle. + +2020-04-08 Tom Tromey <tromey@adacore.com> + * win32-low.c (win32_require_context, suspend_one_thread): Use windows_thread_info::suspend. (continue_one_thread): Use windows_thread_info::resume. diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc index 7cad640..c642d47 100644 --- a/gdbserver/win32-low.cc +++ b/gdbserver/win32-low.cc @@ -218,7 +218,6 @@ delete_thread_info (thread_info *thread) windows_thread_info *th = (windows_thread_info *) thread_target_data (thread); remove_thread (thread); - CloseHandle (th->h); delete th; } |