This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/5] windows-nat: Report an error if ContinueDebugEvent() fails
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Jon Turney <jon dot turney at dronecode dot org dot uk>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 22 Apr 2015 07:10:02 -0700
- Subject: Re: [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> <1429212209-20548-5-git-send-email-jon dot turney at dronecode dot org dot uk>
> 2015-04-16 Jon Turney <jon.turney@dronecode.org.uk>
>
> * windows-nat.c (windows_continue): Report an error if
> ContinueDebugEvent() fails.
Mostly OK, except that I'd like the error message to be a little
more user-friendly. Can you use something like:
Failed to resume program execution (ContinueDebugEvent failed, error %u)
No need for the "()", use "call to ContinueDebugEvent" instead.
But before you push, would you mind ammending this commit's revision
history to include the info you provided in email 0/5? In particular,
I would just say something like this:
| windows-nat: Report an error if ContinueDebugEvent fails
|
| Using the 'catch-signal' test from the testsuite, on x86_64 Cygwin:
|
| $ ./gdb testsuite/outputs/gdb.base/catch-signal/catch-signal.exe
| [...]
| (gdb) catch signal
| Catchpoint 1 (standard signals)
| (gdb) r
| [...]
| Catchpoint 1 (signal SIGHUP), main () at
| ../../../gdb/testsuite/gdb.base/catch-signal.c:40
| 40 raise (SIGHUP); /* second HUP */
| (gdb) c
| Continuing.
| [hangs]
|
| [say what happens here, and what you are doing - in other words,
| the call to ContinueDebugEvent is failing because we're trying
| to resume the wrong thread, causing GDB to wait forever for another
| event that will never come; and you are not trying to fix the problem
| in this patch, just add error handling]
|
| With this patch applied, resuming the execution of the program
| now yields:
|
| (gdb) c
| Continuing.
| main () at ../../../gdb/testsuite/gdb.base/catch-signal.c:40
| 40 raise (SIGHUP); /* second HUP */
| ContinueDebugEvent failed, GetLastError = 87 <<<<<---- **UPDATE**
|
| [ChangeLog]
Thanks!
--
Joel