winedbg: Support longer thread names
Erich Hoover
ehoover at mines.edu
Sat Mar 10 15:06:31 CST 2007
Skipped content of type multipart/alternative-------------- next part --------------
From 36172f55b5af14214ba157bfbd97d9b706c1986a Mon Sep 17 00:00:00 2001
From: Erich Hoover <ehoover at mediaserver.(none)>
Date: Sat, 10 Mar 2007 13:56:07 -0700
Subject: winedbg: Support longer thread names
---
programs/winedbg/debugger.h | 2 +-
programs/winedbg/tgt_active.c | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/programs/winedbg/debugger.h b/programs/winedbg/debugger.h
index 3ad2bd3..0ad8293 100644
--- a/programs/winedbg/debugger.h
+++ b/programs/winedbg/debugger.h
@@ -167,7 +167,7 @@ struct dbg_thread
ADDRESS_MODE addr_mode; /* mode */
int stopped_xpoint; /* xpoint on which the thread has stopped (-1 if none) */
struct dbg_breakpoint step_over_bp;
- char name[9];
+ char name[100];
struct dbg_thread* next;
struct dbg_thread* prev;
BOOL in_exception; /* TRUE if thread stopped with an exception */
diff --git a/programs/winedbg/tgt_active.c b/programs/winedbg/tgt_active.c
index 21e8966..103bf09 100644
--- a/programs/winedbg/tgt_active.c
+++ b/programs/winedbg/tgt_active.c
@@ -261,9 +261,14 @@ static DWORD dbg_handle_exception(const
dbg_printf("Thread ID=%04x not in our list of threads -> can't rename\n", pThreadName->dwThreadID);
return DBG_CONTINUE;
}
- if (dbg_read_memory(pThreadName->szName, pThread->name, 9))
+ if (dbg_read_memory(pThreadName->szName, pThread->name, sizeof(pThread->name)))
+ {
+ pThread->name[sizeof(pThread->name)-1] = '\0';
dbg_printf("Thread ID=%04x renamed using MS VC6 extension (name==\"%s\")\n",
pThread->tid, pThread->name);
+ }
+ else
+ dbg_printf("Failed to rename Thread ID=%04x.\n", pThread->tid);
return DBG_CONTINUE;
}
--
1.4.1
More information about the wine-patches
mailing list