From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3011 invoked by alias); 22 Apr 2015 14:10:07 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 2999 invoked by uid 89); 22 Apr 2015 14:10:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 22 Apr 2015 14:10:05 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2C395D3A72; Wed, 22 Apr 2015 10:10:03 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id QNtnjPcKkozb; Wed, 22 Apr 2015 10:10:03 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id EC8DCD3A56; Wed, 22 Apr 2015 10:10:01 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 5415640EAD; Wed, 22 Apr 2015 07:10:02 -0700 (PDT) Date: Wed, 22 Apr 2015 14:10:00 -0000 From: Joel Brobecker To: Jon Turney Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 4/5] windows-nat: Report an error if ContinueDebugEvent() fails Message-ID: <20150422141002.GG4764@adacore.com> References: <1429009382-21040-1-git-send-email-jon.turney@dronecode.org.uk> <1429212209-20548-1-git-send-email-jon.turney@dronecode.org.uk> <1429212209-20548-5-git-send-email-jon.turney@dronecode.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1429212209-20548-5-git-send-email-jon.turney@dronecode.org.uk> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-04/txt/msg00821.txt.bz2 > 2015-04-16 Jon Turney > > * 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