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
15fa6111
Commit
15fa6111
authored
Jun 19, 2014
by
Sebastian Lackner
Committed by
Alexandre Julliard
Jun 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Process OutputDebugString events like regular exceptions.
parent
457f6af0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
21 deletions
+13
-21
debugger.c
dlls/kernel32/debugger.c
+13
-21
No files found.
dlls/kernel32/debugger.c
View file @
15fa6111
...
@@ -77,6 +77,14 @@ BOOL WINAPI WaitForDebugEvent(
...
@@ -77,6 +77,14 @@ BOOL WINAPI WaitForDebugEvent(
switch
(
data
.
code
)
switch
(
data
.
code
)
{
{
case
EXCEPTION_DEBUG_EVENT
:
case
EXCEPTION_DEBUG_EVENT
:
if
(
data
.
exception
.
exc_code
==
DBG_PRINTEXCEPTION_C
&&
data
.
exception
.
nb_params
>=
2
)
{
event
->
dwDebugEventCode
=
OUTPUT_DEBUG_STRING_EVENT
;
event
->
u
.
DebugString
.
lpDebugStringData
=
wine_server_get_ptr
(
data
.
exception
.
params
[
1
]
);
event
->
u
.
DebugString
.
fUnicode
=
FALSE
;
event
->
u
.
DebugString
.
nDebugStringLength
=
data
.
exception
.
params
[
0
];
break
;
}
event
->
u
.
Exception
.
dwFirstChance
=
data
.
exception
.
first
;
event
->
u
.
Exception
.
dwFirstChance
=
data
.
exception
.
first
;
event
->
u
.
Exception
.
ExceptionRecord
.
ExceptionCode
=
data
.
exception
.
exc_code
;
event
->
u
.
Exception
.
ExceptionRecord
.
ExceptionCode
=
data
.
exception
.
exc_code
;
event
->
u
.
Exception
.
ExceptionRecord
.
ExceptionFlags
=
data
.
exception
.
flags
;
event
->
u
.
Exception
.
ExceptionRecord
.
ExceptionFlags
=
data
.
exception
.
flags
;
...
@@ -120,11 +128,6 @@ BOOL WINAPI WaitForDebugEvent(
...
@@ -120,11 +128,6 @@ BOOL WINAPI WaitForDebugEvent(
case
UNLOAD_DLL_DEBUG_EVENT
:
case
UNLOAD_DLL_DEBUG_EVENT
:
event
->
u
.
UnloadDll
.
lpBaseOfDll
=
wine_server_get_ptr
(
data
.
unload_dll
.
base
);
event
->
u
.
UnloadDll
.
lpBaseOfDll
=
wine_server_get_ptr
(
data
.
unload_dll
.
base
);
break
;
break
;
case
OUTPUT_DEBUG_STRING_EVENT
:
event
->
u
.
DebugString
.
lpDebugStringData
=
wine_server_get_ptr
(
data
.
output_string
.
string
);
event
->
u
.
DebugString
.
fUnicode
=
FALSE
;
event
->
u
.
DebugString
.
nDebugStringLength
=
data
.
output_string
.
length
;
break
;
case
RIP_EVENT
:
case
RIP_EVENT
:
event
->
u
.
RipInfo
.
dwError
=
data
.
rip_info
.
error
;
event
->
u
.
RipInfo
.
dwError
=
data
.
rip_info
.
error
;
event
->
u
.
RipInfo
.
dwType
=
data
.
rip_info
.
type
;
event
->
u
.
RipInfo
.
dwType
=
data
.
rip_info
.
type
;
...
@@ -251,10 +254,12 @@ void WINAPI OutputDebugStringA( LPCSTR str )
...
@@ -251,10 +254,12 @@ void WINAPI OutputDebugStringA( LPCSTR str )
{
{
static
HANDLE
DBWinMutex
=
NULL
;
static
HANDLE
DBWinMutex
=
NULL
;
static
BOOL
mutex_inited
=
FALSE
;
static
BOOL
mutex_inited
=
FALSE
;
BOOL
caught_by_dbg
=
TRUE
;
if
(
!
str
)
str
=
""
;
if
(
!
str
)
str
=
""
;
WARN
(
"%s
\n
"
,
debugstr_a
(
str
));
/* raise
fake exception to make copy protections happy
*/
/* raise
exception, WaitForDebugEvent() will generate a corresponding debug event
*/
__TRY
__TRY
{
{
ULONG_PTR
args
[
2
];
ULONG_PTR
args
[
2
];
...
@@ -264,25 +269,12 @@ void WINAPI OutputDebugStringA( LPCSTR str )
...
@@ -264,25 +269,12 @@ void WINAPI OutputDebugStringA( LPCSTR str )
}
}
__EXCEPT
(
debug_exception_handler
)
__EXCEPT
(
debug_exception_handler
)
{
{
caught_by_dbg
=
FALSE
;
}
}
__ENDTRY
__ENDTRY
if
(
caught_by_dbg
)
return
;
/* send string to attached debugger */
/* FIXME should only send to debugger if exception is not caught by user-mode application */
SERVER_START_REQ
(
output_debug_string
)
{
req
->
string
=
wine_server_client_ptr
(
str
);
req
->
length
=
strlen
(
str
)
+
1
;
wine_server_call
(
req
);
}
SERVER_END_REQ
;
WARN
(
"%s
\n
"
,
debugstr_a
(
str
));
/* send string to a system-wide monitor */
/* send string to a system-wide monitor */
/* FIXME should only send to monitor if no debuggers are attached */
if
(
!
mutex_inited
)
if
(
!
mutex_inited
)
{
{
/* first call to OutputDebugString, initialize mutex handle */
/* first call to OutputDebugString, initialize mutex handle */
...
...
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