From patchwork Thu Apr 16 19:23:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Turney X-Patchwork-Id: 6267 Received: (qmail 85202 invoked by alias); 16 Apr 2015 19:24:01 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 85131 invoked by uid 89); 16 Apr 2015 19:24:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL, BAYES_50, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 X-HELO: rgout06.bt.lon5.cpcloud.co.uk Received: from rgout06.bt.lon5.cpcloud.co.uk (HELO rgout06.bt.lon5.cpcloud.co.uk) (65.20.0.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 16 Apr 2015 19:24:00 +0000 X-OWM-Source-IP: 31.51.207.104(GB) X-OWM-Env-Sender: jonturney@btinternet.com X-CTCH-RefID: str=0001.0A090204.55300C4F.00C4, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-Junkmail-Premium-Raw: score=27/50, refid=2.7.2:2015.3.30.162421:17:27.888, ip=31.51.207.104, rules=__HAS_FROM, __TO_MALFORMED_2, __TO_NO_NAME, __SUBJ_ALPHA_END, __HAS_MSGID, __SANE_MSGID, __HAS_X_MAILER, __IN_REP_TO, __REFERENCES, __ANY_URI, __URI_NO_WWW, __URI_NO_PATH, __FRAUD_BADTHINGS, __SUBJ_ALPHA_NEGATE, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_800_899, __MIME_TEXT_ONLY, RDNS_GENERIC_POOLED, __URI_NS, SXL_IP_DYNAMIC[104.207.51.31.fur], HTML_00_01, HTML_00_10, BODY_SIZE_5000_LESS, RDNS_SUSP_GENERIC, BODY_SIZE_1000_LESS, RDNS_SUSP, BODY_SIZE_2000_LESS, BODY_SIZE_7000_LESS, REFERENCES X-CTCH-Spam: Unknown Received: from localhost.localdomain (31.51.207.104) by rgout06.bt.lon5.cpcloud.co.uk (8.6.122.06) (authenticated as jonturney@btinternet.com) id 5515161402614932; Thu, 16 Apr 2015 20:23:59 +0100 From: Jon Turney To: gdb-patches@sourceware.org Cc: Jon Turney Subject: [PATCH 4/5] windows-nat: Report an error if ContinueDebugEvent() fails Date: Thu, 16 Apr 2015 20:23:28 +0100 Message-Id: <1429212209-20548-5-git-send-email-jon.turney@dronecode.org.uk> In-Reply-To: <1429212209-20548-1-git-send-email-jon.turney@dronecode.org.uk> References: <1429009382-21040-1-git-send-email-jon.turney@dronecode.org.uk> <1429212209-20548-1-git-send-email-jon.turney@dronecode.org.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 * 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; }