This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 4/5] windows-nat: Report an error if ContinueDebugEvent() fails
- From: Jon Turney <jon dot turney at dronecode dot org dot uk>
- To: gdb-patches at sourceware dot org
- Cc: Jon Turney <jon dot turney at dronecode dot org dot uk>
- Date: Thu, 16 Apr 2015 20:23:28 +0100
- Subject: [PATCH 4/5] windows-nat: Report an error if ContinueDebugEvent() fails
- Authentication-results: sourceware.org; auth=none
- References: <1429009382-21040-1-git-send-email-jon dot turney at dronecode dot org dot uk> <1429212209-20548-1-git-send-email-jon dot turney at dronecode dot org dot uk>
Using error() seems appropriate here, if ContinueDebugEvent() fails, the
inferior is in an unknown state and we will probably not be debugging anymore...
gdb/ChangeLog:
2015-04-16 Jon Turney <jon.turney@dronecode.org.uk>
* windows-nat.c (windows_continue): Report an error if
ContinueDebugEvent() fails.
---
gdb/ChangeLog | 5 +++++
gdb/windows-nat.c | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 05e4cee..94d295e 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -1160,6 +1160,10 @@ windows_continue (DWORD continue_status, int id, int killed)
current_event.dwThreadId,
continue_status);
+ if (!res)
+ error (_("ContinueDebugEvent failed, GetLastError = %u"),
+ (unsigned) GetLastError ());
+
debug_registers_changed = 0;
return res;
}
--
2.1.4