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
cb2013e7
Commit
cb2013e7
authored
Feb 14, 2024
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement RtlVirtualUnwind for ARM64EC.
parent
3b85ab31
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
15 deletions
+21
-15
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+5
-0
signal_arm64ec.c
dlls/ntdll/signal_arm64ec.c
+2
-15
unwind.c
dlls/ntdll/unwind.c
+14
-0
No files found.
dlls/ntdll/ntdll_misc.h
View file @
cb2013e7
...
...
@@ -84,6 +84,11 @@ extern void WINAPI KiUserCallbackDispatcher(ULONG,void*,ULONG);
extern
void
WINAPI
KiUserCallbackDispatcherReturn
(
void
);
extern
void
(
WINAPI
*
pWow64PrepareForException
)(
EXCEPTION_RECORD
*
rec
,
CONTEXT
*
context
);
#ifdef __arm64ec__
extern
void
context_x64_to_arm
(
ARM64_NT_CONTEXT
*
arm_ctx
,
const
CONTEXT
*
ctx
);
extern
void
context_arm_to_x64
(
CONTEXT
*
ctx
,
const
ARM64_NT_CONTEXT
*
arm_ctx
);
#endif
/* debug helpers */
extern
LPCSTR
debugstr_us
(
const
UNICODE_STRING
*
str
);
extern
const
char
*
debugstr_exception_code
(
DWORD
code
);
...
...
dlls/ntdll/signal_arm64ec.c
View file @
cb2013e7
...
...
@@ -130,7 +130,7 @@ static UINT fpcsr_to_mxcsr( UINT fpcr, UINT fpsr )
return
ret
;
}
static
void
context_x64_to_arm
(
ARM64_NT_CONTEXT
*
arm_ctx
,
const
CONTEXT
*
ctx
)
void
context_x64_to_arm
(
ARM64_NT_CONTEXT
*
arm_ctx
,
const
CONTEXT
*
ctx
)
{
ARM64EC_NT_CONTEXT
*
ec_ctx
=
(
ARM64EC_NT_CONTEXT
*
)
ctx
;
UINT64
fpcsr
;
...
...
@@ -177,7 +177,7 @@ static void context_x64_to_arm( ARM64_NT_CONTEXT *arm_ctx, const CONTEXT *ctx )
arm_ctx
->
Fpsr
=
fpcsr
>>
32
;
}
static
void
context_arm_to_x64
(
CONTEXT
*
ctx
,
const
ARM64_NT_CONTEXT
*
arm_ctx
)
void
context_arm_to_x64
(
CONTEXT
*
ctx
,
const
ARM64_NT_CONTEXT
*
arm_ctx
)
{
ARM64EC_NT_CONTEXT
*
ec_ctx
=
(
ARM64EC_NT_CONTEXT
*
)
ctx
;
...
...
@@ -1769,19 +1769,6 @@ void CDECL RtlRestoreContext( CONTEXT *context, EXCEPTION_RECORD *rec )
}
/**********************************************************************
* RtlVirtualUnwind (NTDLL.@)
*/
PVOID
WINAPI
RtlVirtualUnwind
(
ULONG
type
,
ULONG64
base
,
ULONG64
pc
,
RUNTIME_FUNCTION
*
function
,
CONTEXT
*
context
,
PVOID
*
data
,
ULONG64
*
frame_ret
,
KNONVOLATILE_CONTEXT_POINTERS
*
ctx_ptr
)
{
FIXME
(
"not implemented
\n
"
);
return
NULL
;
}
/*******************************************************************
* RtlUnwindEx (NTDLL.@)
*/
...
...
dlls/ntdll/unwind.c
View file @
cb2013e7
...
...
@@ -1751,6 +1751,20 @@ PVOID WINAPI RtlVirtualUnwind( ULONG type, ULONG64 base, ULONG64 pc,
unsigned
int
i
,
prolog_offset
;
BOOL
mach_frame
=
FALSE
;
#ifdef __arm64ec__
if
(
RtlIsEcCode
(
(
void
*
)
pc
))
{
ARM64_NT_CONTEXT
arm_context
;
void
*
ret
;
context_x64_to_arm
(
&
arm_context
,
context
);
ret
=
RtlVirtualUnwind_arm64
(
type
,
base
,
pc
,
(
ARM64_RUNTIME_FUNCTION
*
)
function
,
&
arm_context
,
data
,
frame_ret
,
NULL
);
context_arm_to_x64
(
context
,
&
arm_context
);
return
ret
;
}
#endif
TRACE
(
"type %lx rip %I64x rsp %I64x
\n
"
,
type
,
pc
,
context
->
Rsp
);
if
(
TRACE_ON
(
unwind
))
dump_unwind_info
(
base
,
function
);
...
...
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