mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-01 01:45:51 +08:00
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.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
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>
|
2020-04-08 Tom Tromey <tromey@adacore.com>
|
||||||
|
|
||||||
PR gdb/22992
|
PR gdb/22992
|
||||||
|
@ -19,6 +19,11 @@
|
|||||||
#include "gdbsupport/common-defs.h"
|
#include "gdbsupport/common-defs.h"
|
||||||
#include "nat/windows-nat.h"
|
#include "nat/windows-nat.h"
|
||||||
|
|
||||||
|
windows_thread_info::~windows_thread_info ()
|
||||||
|
{
|
||||||
|
CloseHandle (h);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
windows_thread_info::suspend ()
|
windows_thread_info::suspend ()
|
||||||
{
|
{
|
||||||
|
@ -32,6 +32,8 @@ struct windows_thread_info
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~windows_thread_info ();
|
||||||
|
|
||||||
DISABLE_COPY_AND_ASSIGN (windows_thread_info);
|
DISABLE_COPY_AND_ASSIGN (windows_thread_info);
|
||||||
|
|
||||||
/* Ensure that this thread has been suspended. */
|
/* Ensure that this thread has been suspended. */
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
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>
|
2020-04-08 Tom Tromey <tromey@adacore.com>
|
||||||
|
|
||||||
* win32-low.c (win32_require_context, suspend_one_thread): Use
|
* win32-low.c (win32_require_context, suspend_one_thread): Use
|
||||||
|
@ -218,7 +218,6 @@ delete_thread_info (thread_info *thread)
|
|||||||
windows_thread_info *th = (windows_thread_info *) thread_target_data (thread);
|
windows_thread_info *th = (windows_thread_info *) thread_target_data (thread);
|
||||||
|
|
||||||
remove_thread (thread);
|
remove_thread (thread);
|
||||||
CloseHandle (th->h);
|
|
||||||
delete th;
|
delete th;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user