From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29598 invoked by alias); 11 Jun 2013 10:21:54 -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 29577 invoked by uid 89); 11 Jun 2013 10:21:51 -0000 X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.1 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 11 Jun 2013 10:21:50 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 37AE22EDF2 for ; Tue, 11 Jun 2013 06:21:49 -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 YPtEZ84V3RWc for ; Tue, 11 Jun 2013 06:21:49 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id EA86A2E3EB for ; Tue, 11 Jun 2013 06:21:48 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 93028C2B35; Tue, 11 Jun 2013 14:21:47 +0400 (RET) From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [commit/windows] Add thread ID in SuspendThread error warning message. Date: Tue, 11 Jun 2013 10:22:00 -0000 Message-Id: <1370946106-7883-1-git-send-email-brobecker@adacore.com> X-SW-Source: 2013-06/txt/msg00238.txt.bz2 From: brobecke Hello, This patch adds the thread ID to a warning printed when a call to SuspendThread fails. It will help investigate issues, particularly when correlated with the various debug traces provided by the windows-nat module. For the record, the output has been changed from... warning: SuspendThread failed. (winerr 6) ... to ... warning: SuspendThread (tid=0x720) failed. (winerr 6) gdb/ChangeLog: * window-nat.c (thread_rec): Add thread ID in SuspendThread warning message. Tested on x86-windows, and checked in. --- gdb/ChangeLog | 5 +++++ gdb/windows-nat.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 493da1d..2fb7ac8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-06-11 Joel Brobecker + + * window-nat.c (thread_rec): Add thread ID in SuspendThread + warning message. + 2013-06-08 Pedro Alves Yao Qi diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 8320d27..66c44eb 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -311,8 +311,9 @@ thread_rec (DWORD id, int get_context) if (SuspendThread (th->h) == (DWORD) -1) { DWORD err = GetLastError (); - warning (_("SuspendThread failed. (winerr %u)"), - (unsigned) err); + warning (_("SuspendThread (tid=0x%x) failed." + " (winerr %d)"), + (unsigned) id, (unsigned) err); return NULL; } th->suspended = 1; -- 1.7.10.4