This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 4/5] windows-nat: Report an error if ContinueDebugEvent() fails


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]