From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23500 invoked by alias); 11 Jun 2013 11:06:23 -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 23434 invoked by uid 89); 11 Jun 2013 11:06:18 -0000 X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO 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 11:06:15 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 1C4542EAA9; Tue, 11 Jun 2013 07:06:14 -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 XtYSsd65nBrM; Tue, 11 Jun 2013 07:06:14 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id DB01C2EAA7; Tue, 11 Jun 2013 07:06:13 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 7772BC2B35; Tue, 11 Jun 2013 15:06:12 +0400 (RET) Date: Tue, 11 Jun 2013 11:07:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [commit/windows] Add thread ID in SuspendThread error warning message. Message-ID: <20130611110612.GM3969@adacore.com> References: <1370946106-7883-1-git-send-email-brobecker@adacore.com> <51B70097.5030908@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline In-Reply-To: <51B70097.5030908@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Found: No X-SW-Source: 2013-06/txt/msg00243.txt.bz2 --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 757 > On 06/11/2013 11:21 AM, Joel Brobecker wrote: > > DWORD err = GetLastError (); > > - warning (_("SuspendThread failed. (winerr %u)"), > > - (unsigned) err); > > + warning (_("SuspendThread (tid=0x%x) failed." > > + " (winerr %d)"), > > This reverted part of a previous change (winerr %u -> winerr %d). Gasp!!! Thanks for spotting that - I did do a word-by-word diff with git, and yet missed it :-(. > > + (unsigned) id, (unsigned) err); > > return NULL; Fixed thusly. Re-checked with word-by-word diff, and hopefully OK, this time. gdb/ChangeLog: * windows-nat.c (thread_rec): Revert format used to print error code returned by SuspendThread from %d back to %u. Thanks again, -- Joel --bp/iNruPH9dso1Pn Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="windows-nat-thread-rec-winerr-format.diff" Content-length: 1480 commit b6a022d0505c5ca87969b8e00077bb33adc33095 Author: Joel Brobecker Date: Tue Jun 11 12:56:34 2013 +0200 [windows] Fix accidental change of %u -> %d in SuspendThread warning. While enhancing the warning printed in when SuspendThread fails, I accidently changed the format used to print the error code from %u to %d. This patch reverts it back. gdb/ChangeLog: * windows-nat.c (thread_rec): Revert format used to print error code returned by SuspendThread from %d back to %u. diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fc0508e..f8b9386 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2013-06-11 Joel Brobecker + * windows-nat.c (thread_rec): Revert format used to print + error code returned by SuspendThread from %d back to %u. + +2013-06-11 Joel Brobecker + * windows-nat.c (windows_continue): Add "0x" prefix for thread ID in debug trace. (get_windows_debug_event): Likewise, for all debug traces. diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index e0bb719..b30f425 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -312,7 +312,7 @@ thread_rec (DWORD id, int get_context) { DWORD err = GetLastError (); warning (_("SuspendThread (tid=0x%x) failed." - " (winerr %d)"), + " (winerr %u)"), (unsigned) id, (unsigned) err); return NULL; } --bp/iNruPH9dso1Pn--