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
e09dde5c
Commit
e09dde5c
authored
Aug 17, 2023
by
Eric Pouech
Committed by
Alexandre Julliard
Aug 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Implement WaitForDebugEventEx().
Signed-off-by:
Eric Pouech
<
epouech@codeweavers.com
>
parent
090fb2cc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
2 deletions
+38
-2
kernel32.spec
dlls/kernel32/kernel32.spec
+1
-0
kernelbase.spec
dlls/kernelbase/kernelbase.spec
+1
-1
sync.c
dlls/kernelbase/sync.c
+28
-0
process.c
dlls/ntdll/process.c
+7
-0
exception.c
dlls/ntdll/tests/exception.c
+0
-1
winbase.h
include/winbase.h
+1
-0
No files found.
dlls/kernel32/kernel32.spec
View file @
e09dde5c
...
...
@@ -1604,6 +1604,7 @@
@ stdcall WTSGetActiveConsoleSessionId()
@ stdcall -import WaitCommEvent(long ptr ptr)
@ stdcall -import WaitForDebugEvent(ptr long)
@ stdcall -import WaitForDebugEventEx(ptr long)
@ stdcall -import WaitForMultipleObjects(long ptr long long)
@ stdcall -import WaitForMultipleObjectsEx(long ptr long long long)
@ stdcall -import WaitForSingleObject(long long)
...
...
dlls/kernelbase/kernelbase.spec
View file @
e09dde5c
...
...
@@ -1729,7 +1729,7 @@
# @ stub WTSIsServerContainer
@ stdcall WaitCommEvent(long ptr ptr)
@ stdcall WaitForDebugEvent(ptr long)
# @ stub WaitForDebugEventEx
@ stdcall WaitForDebugEventEx(ptr long)
# @ stub WaitForMachinePolicyForegroundProcessingInternal
@ stdcall WaitForMultipleObjects(long ptr long long)
@ stdcall WaitForMultipleObjectsEx(long ptr long long long)
...
...
dlls/kernelbase/sync.c
View file @
e09dde5c
...
...
@@ -428,6 +428,34 @@ BOOL WINAPI DECLSPEC_HOTPATCH WaitForDebugEvent( DEBUG_EVENT *event, DWORD timeo
}
}
/******************************************************************************
* WaitForDebugEventEx (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
WaitForDebugEventEx
(
DEBUG_EVENT
*
event
,
DWORD
timeout
)
{
NTSTATUS
status
;
LARGE_INTEGER
time
;
DBGUI_WAIT_STATE_CHANGE
state
;
for
(;;)
{
status
=
DbgUiWaitStateChange
(
&
state
,
get_nt_timeout
(
&
time
,
timeout
)
);
switch
(
status
)
{
case
STATUS_SUCCESS
:
DbgUiConvertStateChangeStructure
(
&
state
,
event
);
return
TRUE
;
case
STATUS_USER_APC
:
continue
;
case
STATUS_TIMEOUT
:
SetLastError
(
ERROR_SEM_TIMEOUT
);
return
FALSE
;
default:
return
set_ntstatus
(
status
);
}
}
}
/***********************************************************************
* WaitOnAddress (kernelbase.@)
...
...
dlls/ntdll/process.c
View file @
e09dde5c
...
...
@@ -511,6 +511,13 @@ NTSTATUS WINAPI DbgUiConvertStateChangeStructure( DBGUI_WAIT_STATE_CHANGE *state
event
->
u
.
DebugString
.
fUnicode
=
FALSE
;
event
->
u
.
DebugString
.
nDebugStringLength
=
info
->
ExceptionRecord
.
ExceptionInformation
[
0
];
}
else
if
(
code
==
DBG_PRINTEXCEPTION_WIDE_C
&&
info
->
ExceptionRecord
.
NumberParameters
>=
2
)
{
event
->
dwDebugEventCode
=
OUTPUT_DEBUG_STRING_EVENT
;
event
->
u
.
DebugString
.
lpDebugStringData
=
(
void
*
)
info
->
ExceptionRecord
.
ExceptionInformation
[
1
];
event
->
u
.
DebugString
.
fUnicode
=
TRUE
;
event
->
u
.
DebugString
.
nDebugStringLength
=
info
->
ExceptionRecord
.
ExceptionInformation
[
0
];
}
else
if
(
code
==
DBG_RIPEXCEPTION
&&
info
->
ExceptionRecord
.
NumberParameters
>=
2
)
{
event
->
dwDebugEventCode
=
RIP_EVENT
;
...
...
dlls/ntdll/tests/exception.c
View file @
e09dde5c
...
...
@@ -8740,7 +8740,6 @@ static void test_outputdebugstring(BOOL unicode, DWORD numexc_ansi, BOOL todo_an
ok
(
outputdebugstring_exceptions_ansi
==
numexc_ansi
,
"OutputDebugString%c generated %ld ansi exceptions, expected %ld
\n
"
,
unicode
?
'W'
:
'A'
,
outputdebugstring_exceptions_ansi
,
numexc_ansi
);
todo_wine_if
(
unicode
&&
numexc_unicode_low
)
ok
(
outputdebugstring_exceptions_unicode
>=
numexc_unicode_low
&&
outputdebugstring_exceptions_unicode
<=
numexc_unicode_high
,
"OutputDebugString%c generated %lu unicode exceptions, expected %ld-%ld
\n
"
,
...
...
include/winbase.h
View file @
e09dde5c
...
...
@@ -2817,6 +2817,7 @@ WINBASEAPI BOOL WINAPI VirtualUnlock(LPVOID,SIZE_T);
WINBASEAPI
DWORD
WINAPI
WTSGetActiveConsoleSessionId
(
void
);
WINBASEAPI
BOOL
WINAPI
WaitCommEvent
(
HANDLE
,
LPDWORD
,
LPOVERLAPPED
);
WINBASEAPI
BOOL
WINAPI
WaitForDebugEvent
(
LPDEBUG_EVENT
,
DWORD
);
WINBASEAPI
BOOL
WINAPI
WaitForDebugEventEx
(
LPDEBUG_EVENT
,
DWORD
);
WINBASEAPI
DWORD
WINAPI
WaitForMultipleObjects
(
DWORD
,
const
HANDLE
*
,
BOOL
,
DWORD
);
WINBASEAPI
DWORD
WINAPI
WaitForMultipleObjectsEx
(
DWORD
,
const
HANDLE
*
,
BOOL
,
DWORD
,
BOOL
);
WINBASEAPI
DWORD
WINAPI
WaitForSingleObject
(
HANDLE
,
DWORD
);
...
...
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