[PATCH 2/4] winedbg: Enlarge thread->name to 64 bytes.

Brendan Shanks bshanks at codeweavers.com
Tue Mar 15 14:05:15 CDT 2022


Signed-off-by: Brendan Shanks <bshanks at codeweavers.com>
---

I don't believe the 9 character limit has been relevant since MSVC 6.

Current applications use much longer thread names (like
'ThreadPoolSingleThreadCOMSTASharedForegroundBlocking1' in Chromium).

If memory usage is a concern, thread->name could be dynamically allocated instead.

 programs/winedbg/debugger.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/programs/winedbg/debugger.h b/programs/winedbg/debugger.h
index 0cc2f8b7a6c..c528dd97674 100644
--- a/programs/winedbg/debugger.h
+++ b/programs/winedbg/debugger.h
@@ -182,7 +182,7 @@ struct dbg_breakpoint
 typedef struct tagTHREADNAME_INFO
 {
    DWORD   dwType;     /* Must be 0x1000 */
-   LPCSTR  szName;     /* Pointer to name - limited to 9 bytes (8 characters + terminator) */
+   LPCSTR  szName;     /* Pointer to name (in user addr space). */
    DWORD   dwThreadID; /* Thread ID (-1 = caller thread) */
    DWORD   dwFlags;    /* Reserved for future use.  Must be zero. */
 } THREADNAME_INFO;
@@ -205,7 +205,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[64];
     BOOL                        in_exception;   /* TRUE if thread stopped with an exception */
     BOOL                        first_chance;   /* TRUE if thread stopped with a first chance exception
                                                  *      - only valid when in_exception is TRUE
-- 
2.34.1




More information about the wine-devel mailing list