aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/windows-nat.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bfc6a0e..c9f527c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2015-06-03 Jon Turney <jon.turney@dronecode.org.uk>
+ * windows-nat.c (thread_rec): Also ignore ERROR_INVALID_HANDLE
+ from SuspendThread().
+
+2015-06-03 Jon Turney <jon.turney@dronecode.org.uk>
+
* windows-nat.c (handle_output_debug_string): Trim trailing '\n'
from OutputDebugString.
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 851eb51..8a42511 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -310,8 +310,11 @@ thread_rec (DWORD id, int get_context)
/* We get Access Denied (5) when trying to suspend
threads that Windows started on behalf of the
debuggee, usually when those threads are just
- about to exit. */
- if (err != ERROR_ACCESS_DENIED)
+ about to exit.
+ We can get Invalid Handle (6) if the main thread
+ has exited. */
+ if (err != ERROR_INVALID_HANDLE
+ && err != ERROR_ACCESS_DENIED)
warning (_("SuspendThread (tid=0x%x) failed."
" (winerr %u)"),
(unsigned) id, (unsigned) err);