This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [commit/windows] Add thread ID in SuspendThread error warning message.


> 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
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;
 		  }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]