mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:43:04 +00:00
[RTL] Fix RtlSetUnwindContext
Only set the registers requested by ContextFlags
This commit is contained in:
parent
d23ee5f365
commit
98ed87b556
1 changed files with 24 additions and 14 deletions
|
@ -1141,15 +1141,24 @@ RtlSetUnwindContext(
|
|||
_In_ DWORD64 TargetFrame)
|
||||
{
|
||||
KNONVOLATILE_CONTEXT_POINTERS ContextPointers;
|
||||
ULONG ContextFlags = Context->ContextFlags & ~CONTEXT_AMD64;
|
||||
|
||||
/* Capture pointers to the non-volatiles up to the target frame */
|
||||
RtlpCaptureNonVolatileContextPointers(&ContextPointers, TargetFrame);
|
||||
|
||||
/* Copy the nonvolatiles to the captured locations */
|
||||
if (ContextFlags & CONTEXT_INTEGER)
|
||||
{
|
||||
*ContextPointers.Rbx = Context->Rbx;
|
||||
*ContextPointers.Rsi = Context->Rsi;
|
||||
*ContextPointers.Rdi = Context->Rdi;
|
||||
*ContextPointers.R12 = Context->R12;
|
||||
*ContextPointers.R13 = Context->R13;
|
||||
*ContextPointers.R14 = Context->R14;
|
||||
*ContextPointers.R15 = Context->R15;
|
||||
}
|
||||
if (ContextFlags & CONTEXT_FLOATING_POINT)
|
||||
{
|
||||
*ContextPointers.Xmm6 = Context->Xmm6;
|
||||
*ContextPointers.Xmm7 = Context->Xmm7;
|
||||
*ContextPointers.Xmm8 = Context->Xmm8;
|
||||
|
@ -1160,6 +1169,7 @@ RtlSetUnwindContext(
|
|||
*ContextPointers.Xmm13 = Context->Xmm13;
|
||||
*ContextPointers.Xmm14 = Context->Xmm14;
|
||||
*ContextPointers.Xmm15 = Context->Xmm15;
|
||||
}
|
||||
}
|
||||
|
||||
VOID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue