aboutsummaryrefslogtreecommitdiff
path: root/gdb/windows-nat.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2013-06-11 10:20:11 +0000
committerJoel Brobecker <brobecker@gnat.com>2013-06-11 10:20:11 +0000
commit80e88e1aa2da7e516cfb7148fdd5d8777c2991dd (patch)
treece412f062df57a92cb9571f67fcb3348f66e6307 /gdb/windows-nat.c
parent3368874f758405fa20d779077d66dc62095e9d0a (diff)
downloadgdb-80e88e1aa2da7e516cfb7148fdd5d8777c2991dd.zip
gdb-80e88e1aa2da7e516cfb7148fdd5d8777c2991dd.tar.gz
gdb-80e88e1aa2da7e516cfb7148fdd5d8777c2991dd.tar.bz2
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/windows-nat.c')
-rw-r--r--gdb/windows-nat.c5
1 files changed, 3 insertions, 2 deletions
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;