Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f552359c
Commit
f552359c
authored
Apr 09, 2001
by
James Hatheway
Committed by
Alexandre Julliard
Apr 09, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify debugger to understand special undocumented "Name Thread"
exception from MS VC6.
parent
6df245dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
debugger.h
debugger/debugger.h
+18
-0
winedbg.c
debugger/winedbg.c
+18
-2
No files found.
debugger/debugger.h
View file @
f552359c
...
...
@@ -150,6 +150,23 @@ enum dbg_mode
MODE_INVALID
,
MODE_16
,
MODE_32
,
MODE_VM86
};
/* Wine extension; Windows doesn't have a name for this code. This is an
undocumented exception understood by MS VC debugger, allowing the program
to name a particular thread. Search google.com or deja.com for "0x406d1388"
for more info. */
#define EXCEPTION_NAME_THREAD 0x406D1388
/* Helper structure */
typedef
struct
tagTHREADNAME_INFO
{
DWORD
dwType
;
/* Must be 0x1000 */
LPCTSTR
szName
;
/* Pointer to name - limited to 9 bytes (8 characters + terminator) */
DWORD
dwThreadID
;
/* Thread ID (-1 = caller thread) */
DWORD
dwFlags
;
/* Reserved for future use. Must be zero. */
}
THREADNAME_INFO
;
typedef
struct
tagDBG_THREAD
{
struct
tagDBG_PROCESS
*
process
;
HANDLE
handle
;
...
...
@@ -161,6 +178,7 @@ typedef struct tagDBG_THREAD {
enum
exec_mode
dbg_exec_mode
;
int
dbg_exec_count
;
DBG_BREAKPOINT
stepOverBP
;
char
name
[
9
];
struct
tagDBG_THREAD
*
next
;
struct
tagDBG_THREAD
*
prev
;
}
DBG_THREAD
;
...
...
debugger/winedbg.c
View file @
f552359c
...
...
@@ -377,8 +377,11 @@ static DWORD DEBUG_ExceptionEpilog(void)
static
BOOL
DEBUG_HandleException
(
EXCEPTION_RECORD
*
rec
,
BOOL
first_chance
,
BOOL
force
,
LPDWORD
cont
)
{
BOOL
is_debug
=
FALSE
;
BOOL
ret
=
TRUE
;
BOOL
is_debug
=
FALSE
;
BOOL
ret
=
TRUE
;
THREADNAME_INFO
*
pThreadName
;
DBG_THREAD
*
pThread
;
*
cont
=
DBG_CONTINUE
;
...
...
@@ -388,6 +391,19 @@ static BOOL DEBUG_HandleException(EXCEPTION_RECORD *rec, BOOL first_chance, BOOL
case
EXCEPTION_SINGLE_STEP
:
is_debug
=
TRUE
;
break
;
case
EXCEPTION_NAME_THREAD
:
pThreadName
=
(
THREADNAME_INFO
*
)(
rec
->
ExceptionInformation
);
if
(
pThreadName
->
dwThreadID
==
-
1
)
pThread
=
DEBUG_CurrThread
;
else
pThread
=
DEBUG_GetThread
(
DEBUG_CurrProcess
,
pThreadName
->
dwThreadID
);
if
(
ReadProcessMemory
(
DEBUG_CurrThread
->
process
->
handle
,
pThreadName
->
szName
,
pThread
->
name
,
9
,
NULL
))
DEBUG_Printf
(
DBG_CHN_MESG
,
"Thread ID=0x%lx renamed using MS VC6 extension (name==
\"
%s
\"
)
\n
"
,
pThread
->
tid
,
pThread
->
name
);
return
TRUE
;
}
if
(
first_chance
&&
!
force
&&
!
DBG_IVAR
(
BreakOnFirstChance
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment