diff options
author | Joel Brobecker <brobecker@gnat.com> | 2013-06-11 10:20:11 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2013-06-11 10:20:11 +0000 |
commit | 6776fcaed605fcc6835dc1d7add224bda852fb78 (patch) | |
tree | 7902357e09807653f5a57160e82a9707eae39850 /gdb | |
parent | 3a433e6f35874b7ba61ed048365ca6a9dd71fe42 (diff) | |
download | gdb-6776fcaed605fcc6835dc1d7add224bda852fb78.tar.gz |
windows: Add thread ID in SuspendThread error warning message.
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/windows-nat.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 493da1d6bc2..2fb7ac8ff5f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-06-11 Joel Brobecker <brobecker@adacore.com> + + * window-nat.c (thread_rec): Add thread ID in SuspendThread + warning message. + 2013-06-08 Pedro Alves <pedro@codesourcery.com> Yao Qi <yao@codesourcery.com> diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 8320d27ae3e..66c44eb7f31 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; |