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
b56a4b3e
Commit
b56a4b3e
authored
Aug 17, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement KiUserCallbackDispatcher().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
daa1886a
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
55 additions
and
5 deletions
+55
-5
loader.c
dlls/ntdll/loader.c
+1
-1
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-1
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+1
-0
signal_arm.c
dlls/ntdll/signal_arm.c
+11
-0
signal_arm64.c
dlls/ntdll/signal_arm64.c
+11
-0
signal_i386.c
dlls/ntdll/signal_i386.c
+11
-0
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+13
-0
wow64.c
dlls/ntdll/tests/wow64.c
+1
-1
loader.c
dlls/ntdll/unix/loader.c
+3
-1
unix_private.h
dlls/ntdll/unix/unix_private.h
+2
-1
No files found.
dlls/ntdll/loader.c
View file @
b56a4b3e
...
...
@@ -3767,7 +3767,7 @@ static void init_wow64( CONTEXT *context )
SET_INIT_BLOCK
(
LdrInitializeThunk
);
SET_INIT_BLOCK
(
LdrSystemDllInitBlock
);
SET_INIT_BLOCK
(
RtlUserThreadStart
);
/* SET_INIT_BLOCK( KiUserCallbackDispatcher ); */
SET_INIT_BLOCK
(
KiUserCallbackDispatcher
);
/* SET_INIT_BLOCK( RtlpQueryProcessDebugInformationRemote ); */
/* SET_INIT_BLOCK( RtlpFreezeTimeBias ); */
/* LdrSystemDllInitBlock.ntdll_handle */
...
...
dlls/ntdll/ntdll.spec
View file @
b56a4b3e
...
...
@@ -68,7 +68,7 @@
# @ stub KiIntSystemCall
@ stdcall -norelay KiRaiseUserExceptionDispatcher()
@ stdcall -norelay KiUserApcDispatcher(ptr long long long ptr)
@ st
ub KiUserCallbackDispatcher
@ st
dcall -norelay KiUserCallbackDispatcher(long ptr long)
@ stdcall -norelay KiUserExceptionDispatcher(ptr ptr)
# @ stub LdrAccessOutOfProcessResource
@ stdcall LdrAccessResource(long ptr ptr ptr)
...
...
dlls/ntdll/ntdll_misc.h
View file @
b56a4b3e
...
...
@@ -51,6 +51,7 @@ extern LONG WINAPI call_unhandled_exception_filter( PEXCEPTION_POINTERS eptr ) D
extern
void
WINAPI
LdrInitializeThunk
(
CONTEXT
*
,
ULONG_PTR
,
ULONG_PTR
,
ULONG_PTR
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
WINAPI
KiUserExceptionDispatcher
(
EXCEPTION_RECORD
*
,
CONTEXT
*
)
DECLSPEC_HIDDEN
;
extern
void
WINAPI
KiUserApcDispatcher
(
CONTEXT
*
,
ULONG_PTR
,
ULONG_PTR
,
ULONG_PTR
,
PNTAPCFUNC
)
DECLSPEC_HIDDEN
;
extern
void
WINAPI
KiUserCallbackDispatcher
(
ULONG
,
void
*
,
ULONG
)
DECLSPEC_HIDDEN
;
#if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
extern
RUNTIME_FUNCTION
*
lookup_function_info
(
ULONG_PTR
pc
,
ULONG_PTR
*
base
,
LDR_DATA_TABLE_ENTRY
**
module
)
DECLSPEC_HIDDEN
;
...
...
dlls/ntdll/signal_arm.c
View file @
b56a4b3e
...
...
@@ -206,6 +206,17 @@ void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1
}
/*******************************************************************
* KiUserCallbackDispatcher (NTDLL.@)
*/
void
WINAPI
KiUserCallbackDispatcher
(
ULONG
id
,
void
*
args
,
ULONG
len
)
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
];
RtlRaiseStatus
(
NtCallbackReturn
(
NULL
,
0
,
func
(
args
,
len
)));
}
/***********************************************************************
* RtlUnwind (NTDLL.@)
*/
...
...
dlls/ntdll/signal_arm64.c
View file @
b56a4b3e
...
...
@@ -565,6 +565,17 @@ void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR arg1, ULONG_PTR arg
}
/*******************************************************************
* KiUserCallbackDispatcher (NTDLL.@)
*/
void
WINAPI
KiUserCallbackDispatcher
(
ULONG
id
,
void
*
args
,
ULONG
len
)
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
];
RtlRaiseStatus
(
NtCallbackReturn
(
NULL
,
0
,
func
(
args
,
len
)));
}
/***********************************************************************
* Definitions for Win32 unwind tables
*/
...
...
dlls/ntdll/signal_i386.c
View file @
b56a4b3e
...
...
@@ -247,6 +247,17 @@ void WINAPI KiUserApcDispatcher( CONTEXT *context, ULONG_PTR ctx, ULONG_PTR arg1
}
/*******************************************************************
* KiUserCallbackDispatcher (NTDLL.@)
*/
void
WINAPI
KiUserCallbackDispatcher
(
ULONG
id
,
void
*
args
,
ULONG
len
)
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
];
RtlRaiseStatus
(
NtCallbackReturn
(
NULL
,
0
,
func
(
args
,
len
)));
}
/***********************************************************************
* save_fpu
*
...
...
dlls/ntdll/signal_x86_64.c
View file @
b56a4b3e
...
...
@@ -625,6 +625,19 @@ __ASM_GLOBAL_FUNC( KiUserApcDispatcher,
"int3"
)
/*******************************************************************
* KiUserCallbackDispatcher (NTDLL.@)
*
* FIXME: not binary compatible
*/
void
WINAPI
KiUserCallbackDispatcher
(
ULONG
id
,
void
*
args
,
ULONG
len
)
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
id
];
RtlRaiseStatus
(
NtCallbackReturn
(
NULL
,
0
,
func
(
args
,
len
)));
}
static
ULONG64
get_int_reg
(
CONTEXT
*
context
,
int
reg
)
{
return
*
(
&
context
->
Rax
+
reg
);
...
...
dlls/ntdll/tests/wow64.c
View file @
b56a4b3e
...
...
@@ -1043,7 +1043,7 @@ static void test_init_block(void)
CHECK_FUNC
(
block64
[
3
],
"LdrInitializeThunk"
);
CHECK_FUNC
(
block64
[
4
],
"KiUserExceptionDispatcher"
);
CHECK_FUNC
(
block64
[
5
],
"KiUserApcDispatcher"
);
todo_wine
CHECK_FUNC
(
block64
[
6
],
"KiUserCallbackDispatcher"
);
CHECK_FUNC
(
block64
[
6
],
"KiUserCallbackDispatcher"
);
CHECK_FUNC
(
block64
[
7
],
"RtlUserThreadStart"
);
CHECK_FUNC
(
block64
[
8
],
"RtlpQueryProcessDebugInformationRemote"
);
todo_wine
ok
(
block64
[
9
]
==
(
ULONG_PTR
)
ntdll
,
"got %p for ntdll %p
\n
"
,
...
...
dlls/ntdll/unix/loader.c
View file @
b56a4b3e
...
...
@@ -105,8 +105,9 @@ static const char so_dir[] = "";
void
(
WINAPI
*
pDbgUiRemoteBreakin
)(
void
*
arg
)
=
NULL
;
NTSTATUS
(
WINAPI
*
pKiRaiseUserExceptionDispatcher
)(
void
)
=
NULL
;
void
(
WINAPI
*
pKiUserApcDispatcher
)(
CONTEXT
*
,
ULONG_PTR
,
ULONG_PTR
,
ULONG_PTR
,
PNTAPCFUNC
)
=
NULL
;
NTSTATUS
(
WINAPI
*
pKiUserExceptionDispatcher
)(
EXCEPTION_RECORD
*
,
CONTEXT
*
)
=
NULL
;
void
(
WINAPI
*
pKiUserApcDispatcher
)(
CONTEXT
*
,
ULONG_PTR
,
ULONG_PTR
,
ULONG_PTR
,
PNTAPCFUNC
)
=
NULL
;
void
(
WINAPI
*
pKiUserCallbackDispatcher
)(
ULONG
,
void
*
,
ULONG
)
=
NULL
;
void
(
WINAPI
*
pLdrInitializeThunk
)(
CONTEXT
*
,
void
**
,
ULONG_PTR
,
ULONG_PTR
)
=
NULL
;
void
(
WINAPI
*
pRtlUserThreadStart
)(
PRTL_THREAD_START_ROUTINE
entry
,
void
*
arg
)
=
NULL
;
void
(
WINAPI
*
p__wine_ctrl_routine
)(
void
*
);
...
...
@@ -832,6 +833,7 @@ static void load_ntdll_functions( HMODULE module )
GET_FUNC
(
KiRaiseUserExceptionDispatcher
);
GET_FUNC
(
KiUserExceptionDispatcher
);
GET_FUNC
(
KiUserApcDispatcher
);
GET_FUNC
(
KiUserCallbackDispatcher
);
GET_FUNC
(
LdrInitializeThunk
);
GET_FUNC
(
LdrSystemDllInitBlock
);
GET_FUNC
(
RtlUserThreadStart
);
...
...
dlls/ntdll/unix/unix_private.h
View file @
b56a4b3e
...
...
@@ -92,8 +92,9 @@ static const LONG teb_offset = 0x2000;
/* callbacks to PE ntdll from the Unix side */
extern
void
(
WINAPI
*
pDbgUiRemoteBreakin
)(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
(
WINAPI
*
pKiRaiseUserExceptionDispatcher
)(
void
)
DECLSPEC_HIDDEN
;
extern
void
(
WINAPI
*
pKiUserApcDispatcher
)(
CONTEXT
*
,
ULONG_PTR
,
ULONG_PTR
,
ULONG_PTR
,
PNTAPCFUNC
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
(
WINAPI
*
pKiUserExceptionDispatcher
)(
EXCEPTION_RECORD
*
,
CONTEXT
*
)
DECLSPEC_HIDDEN
;
extern
void
(
WINAPI
*
pKiUserApcDispatcher
)(
CONTEXT
*
,
ULONG_PTR
,
ULONG_PTR
,
ULONG_PTR
,
PNTAPCFUNC
)
DECLSPEC_HIDDEN
;
extern
void
(
WINAPI
*
pKiUserCallbackDispatcher
)(
ULONG
,
void
*
,
ULONG
)
DECLSPEC_HIDDEN
;
extern
void
(
WINAPI
*
pLdrInitializeThunk
)(
CONTEXT
*
,
void
**
,
ULONG_PTR
,
ULONG_PTR
)
DECLSPEC_HIDDEN
;
extern
void
(
WINAPI
*
pRtlUserThreadStart
)(
PRTL_THREAD_START_ROUTINE
entry
,
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
void
(
WINAPI
*
p__wine_ctrl_routine
)(
void
*
)
DECLSPEC_HIDDEN
;
...
...
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