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]

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


> 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


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