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
38039973
Commit
38039973
authored
Aug 31, 2020
by
Paul Gofman
Committed by
Alexandre Julliard
Aug 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement RtlLocateLegacyContext().
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ff88ed8b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
1 deletion
+29
-1
api-ms-win-core-xstate-l1-1-0.spec
...win-core-xstate-l1-1-0/api-ms-win-core-xstate-l1-1-0.spec
+1
-1
exception.c
dlls/ntdll/exception.c
+11
-0
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-0
exception.c
dlls/ntdll/tests/exception.c
+14
-0
ntoskrnl.exe.spec
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+1
-0
wdm.h
include/ddk/wdm.h
+1
-0
No files found.
dlls/api-ms-win-core-xstate-l1-1-0/api-ms-win-core-xstate-l1-1-0.spec
View file @
38039973
...
...
@@ -4,5 +4,5 @@
@ stub RtlGetExtendedFeaturesMask
@ stdcall RtlInitializeExtendedContext(ptr long ptr) ntdll.RtlInitializeExtendedContext
@ stdcall RtlLocateExtendedFeature(ptr long ptr) ntdll.RtlLocateExtendedFeature
@ st
ub
RtlLocateLegacyContext
@ st
dcall RtlLocateLegacyContext(ptr ptr) ntdll.
RtlLocateLegacyContext
@ stub RtlSetExtendedFeaturesMask
dlls/ntdll/exception.c
View file @
38039973
...
...
@@ -850,3 +850,14 @@ void * WINAPI RtlLocateExtendedFeature( CONTEXT_EX *context_ex, ULONG feature_id
{
return
RtlLocateExtendedFeature2
(
context_ex
,
feature_id
,
&
user_shared_data
->
XState
,
length
);
}
/**********************************************************************
* RtlLocateLegacyContext (NTDLL.@)
*/
void
*
WINAPI
RtlLocateLegacyContext
(
CONTEXT_EX
*
context_ex
,
ULONG
*
length
)
{
if
(
length
)
*
length
=
context_ex
->
Legacy
.
Length
;
return
(
BYTE
*
)
context_ex
+
context_ex
->
Legacy
.
Offset
;
}
dlls/ntdll/ntdll.spec
View file @
38039973
...
...
@@ -828,6 +828,7 @@
@ stdcall RtlLocaleNameToLcid(wstr ptr long)
@ stdcall RtlLocateExtendedFeature(ptr long ptr)
@ stdcall RtlLocateExtendedFeature2(ptr long ptr ptr)
@ stdcall RtlLocateLegacyContext(ptr ptr)
# @ stub RtlLockBootStatusData
@ stdcall RtlLockHeap(long)
# @ stub RtlLockMemoryStreamRegion
...
...
dlls/ntdll/tests/exception.c
View file @
38039973
...
...
@@ -52,6 +52,7 @@ static NTSTATUS (WINAPI *pRtlInitializeExtendedContext)(void *context, ULONG co
static
NTSTATUS
(
WINAPI
*
pRtlInitializeExtendedContext2
)(
void
*
context
,
ULONG
context_flags
,
CONTEXT_EX
**
context_ex
,
ULONG64
compaction_mask
);
static
void
*
(
WINAPI
*
pRtlLocateExtendedFeature
)(
CONTEXT_EX
*
context_ex
,
ULONG
feature_id
,
ULONG
*
length
);
static
void
*
(
WINAPI
*
pRtlLocateLegacyContext
)(
CONTEXT_EX
*
context_ex
,
ULONG
*
length
);
static
NTSTATUS
(
WINAPI
*
pNtReadVirtualMemory
)(
HANDLE
,
const
void
*
,
void
*
,
SIZE_T
,
SIZE_T
*
);
static
NTSTATUS
(
WINAPI
*
pNtTerminateProcess
)(
HANDLE
handle
,
LONG
exit_code
);
static
NTSTATUS
(
WINAPI
*
pNtQueryInformationProcess
)(
HANDLE
,
PROCESSINFOCLASS
,
PVOID
,
ULONG
,
PULONG
);
...
...
@@ -6307,6 +6308,18 @@ static void test_extended_context(void)
ok
(
!
context_ex
->
XState
.
Length
,
"Got unexpected Length %#x, flags %#x.
\n
"
,
context_ex
->
XState
.
Length
,
flags
);
if
(
0
)
{
/* Crashes on Windows. */
pRtlLocateLegacyContext
(
NULL
,
NULL
);
}
p
=
pRtlLocateLegacyContext
(
context_ex
,
NULL
);
ok
(
p
==
context
,
"Got unexpected p %p, flags %#x.
\n
"
,
p
,
flags
);
length2
=
0xdeadbeef
;
p
=
pRtlLocateLegacyContext
(
context_ex
,
&
length2
);
ok
(
p
==
context
&&
length2
==
context_ex
->
Legacy
.
Length
,
"Got unexpected p %p, length %#x, flags %#x.
\n
"
,
p
,
length2
,
flags
);
length2
=
expected_length
;
for
(
j
=
0
;
j
<
context_arch
[
test
].
flags_offset
;
++
j
)
{
...
...
@@ -6738,6 +6751,7 @@ START_TEST(exception)
X
(
RtlInitializeExtendedContext
);
X
(
RtlInitializeExtendedContext2
);
X
(
RtlLocateExtendedFeature
);
X
(
RtlLocateLegacyContext
);
#undef X
#define X(f) p##f = (void*)GetProcAddress(hkernel32, #f)
...
...
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
View file @
38039973
...
...
@@ -1176,6 +1176,7 @@
@ stdcall RtlLocalTimeToSystemTime(ptr ptr)
@ stdcall RtlLocateExtendedFeature(ptr long ptr)
@ stdcall RtlLocateExtendedFeature2(ptr long ptr ptr)
@ stdcall RtlLocateLegacyContext(ptr ptr)
@ stub RtlLockBootStatusData
@ stdcall RtlLookupAtomInAtomTable(ptr wstr ptr)
@ stub RtlLookupElementGenericTable
...
...
include/ddk/wdm.h
View file @
38039973
...
...
@@ -1842,6 +1842,7 @@ NTSTATUS WINAPI RtlInitializeExtendedContext2(void*,ULONG,CONTEXT_EX**,ULONG64)
ULONG64
WINAPI
RtlGetEnabledExtendedFeatures
(
ULONG64
);
NTSTATUS
WINAPI
RtlGetExtendedContextLength
(
ULONG
,
ULONG
*
);
NTSTATUS
WINAPI
RtlGetExtendedContextLength2
(
ULONG
,
ULONG
*
,
ULONG64
);
void
*
WINAPI
RtlLocateLegacyContext
(
CONTEXT_EX
*
,
ULONG
*
);
void
*
WINAPI
RtlLocateExtendedFeature
(
CONTEXT_EX
*
,
ULONG
,
ULONG
*
);
void
*
WINAPI
RtlLocateExtendedFeature2
(
CONTEXT_EX
*
,
ULONG
,
XSTATE_CONFIGURATION
*
,
ULONG
*
);
#endif
...
...
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