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
6edf3d3b
Commit
6edf3d3b
authored
Feb 05, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Feb 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Print a warning for thread rename exceptions.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ac14ce8c
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
9 deletions
+26
-9
signal_arm.c
dlls/ntdll/signal_arm.c
+4
-0
signal_arm64.c
dlls/ntdll/signal_arm64.c
+4
-0
signal_i386.c
dlls/ntdll/signal_i386.c
+4
-0
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+4
-0
exception.h
include/wine/exception.h
+6
-0
debugger.h
programs/winedbg/debugger.h
+0
-6
gdbproxy.c
programs/winedbg/gdbproxy.c
+3
-2
tgt_active.c
programs/winedbg/tgt_active.c
+1
-1
No files found.
dlls/ntdll/signal_arm.c
View file @
6edf3d3b
...
...
@@ -160,6 +160,10 @@ NTSTATUS WINAPI KiUserExceptionDispatcher( EXCEPTION_RECORD *rec, CONTEXT *conte
rec
->
ExceptionAddress
,
(
char
*
)
rec
->
ExceptionInformation
[
0
],
rec
->
ExceptionInformation
[
1
]
);
}
else
if
(
rec
->
ExceptionCode
==
EXCEPTION_WINE_NAME_THREAD
&&
rec
->
ExceptionInformation
[
0
]
==
0x1000
)
{
WARN
(
"Thread %04x renamed to %s
\n
"
,
(
DWORD
)
rec
->
ExceptionInformation
[
2
],
debugstr_a
((
char
*
)
rec
->
ExceptionInformation
[
1
])
);
}
else
{
TRACE
(
" r0=%08x r1=%08x r2=%08x r3=%08x r4=%08x r5=%08x
\n
"
,
...
...
dlls/ntdll/signal_arm64.c
View file @
6edf3d3b
...
...
@@ -501,6 +501,10 @@ NTSTATUS WINAPI KiUserExceptionDispatcher( EXCEPTION_RECORD *rec, CONTEXT *conte
rec
->
ExceptionAddress
,
(
char
*
)
rec
->
ExceptionInformation
[
0
],
rec
->
ExceptionInformation
[
1
]
);
}
else
if
(
rec
->
ExceptionCode
==
EXCEPTION_WINE_NAME_THREAD
&&
rec
->
ExceptionInformation
[
0
]
==
0x1000
)
{
WARN
(
"Thread %04x renamed to %s
\n
"
,
(
DWORD
)
rec
->
ExceptionInformation
[
2
],
debugstr_a
((
char
*
)
rec
->
ExceptionInformation
[
1
])
);
}
else
{
TRACE
(
" x0=%016lx x1=%016lx x2=%016lx x3=%016lx
\n
"
,
...
...
dlls/ntdll/signal_i386.c
View file @
6edf3d3b
...
...
@@ -192,6 +192,10 @@ NTSTATUS WINAPI dispatch_exception( EXCEPTION_RECORD *rec, CONTEXT *context )
rec
->
ExceptionAddress
,
(
char
*
)
rec
->
ExceptionInformation
[
0
],
rec
->
ExceptionInformation
[
1
]
);
}
else
if
(
rec
->
ExceptionCode
==
EXCEPTION_WINE_NAME_THREAD
&&
rec
->
ExceptionInformation
[
0
]
==
0x1000
)
{
WARN
(
"Thread %04x renamed to %s
\n
"
,
(
DWORD
)
rec
->
ExceptionInformation
[
2
],
debugstr_a
((
char
*
)
rec
->
ExceptionInformation
[
1
])
);
}
else
{
TRACE
(
" eax=%08x ebx=%08x ecx=%08x edx=%08x esi=%08x edi=%08x
\n
"
,
...
...
dlls/ntdll/signal_x86_64.c
View file @
6edf3d3b
...
...
@@ -538,6 +538,10 @@ NTSTATUS WINAPI dispatch_exception( EXCEPTION_RECORD *rec, CONTEXT *context )
rec
->
ExceptionAddress
,
(
char
*
)
rec
->
ExceptionInformation
[
0
],
rec
->
ExceptionInformation
[
1
]
);
}
else
if
(
rec
->
ExceptionCode
==
EXCEPTION_WINE_NAME_THREAD
&&
rec
->
ExceptionInformation
[
0
]
==
0x1000
)
{
WARN
(
"Thread %04x renamed to %s
\n
"
,
(
DWORD
)
rec
->
ExceptionInformation
[
2
],
debugstr_a
((
char
*
)
rec
->
ExceptionInformation
[
1
])
);
}
else
{
TRACE
(
" rax=%016lx rbx=%016lx rcx=%016lx rdx=%016lx
\n
"
,
...
...
include/wine/exception.h
View file @
6edf3d3b
...
...
@@ -302,6 +302,12 @@ static inline EXCEPTION_REGISTRATION_RECORD *__wine_get_frame(void)
#define EXCEPTION_WINE_STUB 0x80000100
/* stub entry point called */
#define EXCEPTION_WINE_ASSERTION 0x80000101
/* assertion failed */
/* 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_WINE_NAME_THREAD 0x406D1388
#ifdef __cplusplus
}
#endif
...
...
programs/winedbg/debugger.h
View file @
6edf3d3b
...
...
@@ -155,12 +155,6 @@ struct dbg_breakpoint
#define CXX_EXCEPTION 0xe06d7363
#define CXX_FRAME_MAGIC 0x19930520
/* 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
{
...
...
programs/winedbg/gdbproxy.c
View file @
6edf3d3b
...
...
@@ -63,6 +63,7 @@
#include "windef.h"
#include "winbase.h"
#include "tlhelp32.h"
#include "wine/exception.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
winedbg
);
...
...
@@ -349,7 +350,7 @@ static unsigned char signal_from_debug_event(DEBUG_EVENT* de)
return
SIGALRM
;
/* should not be here */
case
EXCEPTION_INVALID_HANDLE
:
case
EXCEPTION_NAME_THREAD
:
case
EXCEPTION_
WINE_
NAME_THREAD
:
return
SIGTRAP
;
default:
ERR
(
"Unknown exception code 0x%08x
\n
"
,
ec
);
...
...
@@ -363,7 +364,7 @@ static BOOL handle_exception(struct gdb_context* gdbctx, EXCEPTION_DEBUG_INFO* e
switch
(
rec
->
ExceptionCode
)
{
case
EXCEPTION_NAME_THREAD
:
case
EXCEPTION_
WINE_
NAME_THREAD
:
{
const
THREADNAME_INFO
*
threadname
=
(
const
THREADNAME_INFO
*
)
rec
->
ExceptionInformation
;
struct
dbg_thread
*
thread
;
...
...
programs/winedbg/tgt_active.c
View file @
6edf3d3b
...
...
@@ -246,7 +246,7 @@ static DWORD dbg_handle_exception(const EXCEPTION_RECORD* rec, BOOL first_chance
case
EXCEPTION_SINGLE_STEP
:
is_debug
=
TRUE
;
break
;
case
EXCEPTION_NAME_THREAD
:
case
EXCEPTION_
WINE_
NAME_THREAD
:
pThreadName
=
(
const
THREADNAME_INFO
*
)(
rec
->
ExceptionInformation
);
if
(
pThreadName
->
dwThreadID
==
-
1
)
pThread
=
dbg_curr_thread
;
...
...
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