Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [commit/windows] Add thread ID in SuspendThread error warning message.
Date: Tue, 11 Jun 2013 11:07:00 -0000	[thread overview]
Message-ID: <20130611110612.GM3969@adacore.com> (raw)
In-Reply-To: <51B70097.5030908@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

> 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

[-- Attachment #2: windows-nat-thread-rec-winerr-format.diff --]
[-- Type: text/x-diff, Size: 1480 bytes --]

commit b6a022d0505c5ca87969b8e00077bb33adc33095
Author: Joel Brobecker <brobecker@adacore.com>
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  <brobecker@adacore.com>
 
+	* 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  <brobecker@adacore.com>
+
 	* 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;
 		  }

  reply	other threads:[~2013-06-11 11:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-11 10:22 Joel Brobecker
2013-06-11 10:50 ` Pedro Alves
2013-06-11 11:07   ` Joel Brobecker [this message]
2013-06-11 13:25     ` Pedro Alves
2013-06-11 16:27 ` Eli Zaretskii
2013-06-11 16:38   ` Joel Brobecker
2013-06-11 17:40     ` Eli Zaretskii
2013-06-18 18:09       ` Christopher Faylor
2013-06-19  1:57         ` Joel Brobecker
2013-06-20 18:51           ` Christopher Faylor
2013-06-24 23:45             ` Joel Brobecker
2013-06-25 21:13               ` Christopher Faylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130611110612.GM3969@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox