diff options
author | Tom Tromey <tromey@adacore.com> | 2020-04-08 14:33:35 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-04-08 14:47:58 -0600 |
commit | 65bafd5b156bcb4f308f304e55a03e13f4eb2bed (patch) | |
tree | 3107d5662dc2b243e0a142a5b2d6082cb33131ea /gdb/nat | |
parent | 0a4afda3c63687cc5cbbdae78850ee66967cd648 (diff) | |
download | gdb-65bafd5b156bcb4f308f304e55a03e13f4eb2bed.zip gdb-65bafd5b156bcb4f308f304e55a03e13f4eb2bed.tar.gz gdb-65bafd5b156bcb4f308f304e55a03e13f4eb2bed.tar.bz2 |
Call CloseHandle from ~windows_thread_info
Add a destructor to windows_thread_info that calls CloseHandle.
gdb/ChangeLog
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.
gdbserver/ChangeLog
2020-04-08 Tom Tromey <tromey@adacore.com>
* win32-low.c (delete_thread_info): Don't call CloseHandle.
Diffstat (limited to 'gdb/nat')
-rw-r--r-- | gdb/nat/windows-nat.c | 5 | ||||
-rw-r--r-- | gdb/nat/windows-nat.h | 2 |
2 files changed, 7 insertions, 0 deletions
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. */ |