diff options
author | Konstantin Baladurin <k.baladurin@partner.samsung.com> | 2018-01-25 13:31:32 +0300 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2018-01-25 11:31:32 +0100 |
commit | 949b94eabd74f2632c220b03f998a802032d2b82 (patch) | |
tree | d1c2cd3897fc61dad3548c39f911924f73f8dfe2 /src/vm/i386 | |
parent | 85dcf21fdafc2234d705a462c751b8409c9ea9c5 (diff) | |
download | coreclr-949b94eabd74f2632c220b03f998a802032d2b82.tar.gz coreclr-949b94eabd74f2632c220b03f998a802032d2b82.tar.bz2 coreclr-949b94eabd74f2632c220b03f998a802032d2b82.zip |
[x86/Linux] Fix HelperMethodFrame::UpdateRegDisplay (#15993)
For DAC after initialization MachState using InsureInit method,
register pointers are NULL so we cannot use them to restore register
values.
Diffstat (limited to 'src/vm/i386')
-rw-r--r-- | src/vm/i386/cgenx86.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vm/i386/cgenx86.cpp b/src/vm/i386/cgenx86.cpp index 7071d27928..a43bc8558a 100644 --- a/src/vm/i386/cgenx86.cpp +++ b/src/vm/i386/cgenx86.cpp @@ -390,9 +390,11 @@ void HelperMethodFrame::UpdateRegDisplay(const PREGDISPLAY pRD) pRD->pCurrentContext->Eip = pRD->ControlPC = pUnwoundState->GetRetAddr(); pRD->pCurrentContext->Esp = pRD->SP = pUnwoundState->esp(); -#define CALLEE_SAVED_REGISTER(regname) pRD->pCurrentContext->regname = *((DWORD*) pUnwoundState->p##regname()); - ENUM_CALLEE_SAVED_REGISTERS(); -#undef CALLEE_SAVED_REGISTER + // Do not use pUnwoundState->p##regname() here because it returns NULL in this case + pRD->pCurrentContext->Edi = pUnwoundState->_edi; + pRD->pCurrentContext->Esi = pUnwoundState->_esi; + pRD->pCurrentContext->Ebx = pUnwoundState->_ebx; + pRD->pCurrentContext->Ebp = pUnwoundState->_ebp; #define CALLEE_SAVED_REGISTER(regname) pRD->pCurrentContextPointers->regname = (DWORD*) pUnwoundState->p##regname(); ENUM_CALLEE_SAVED_REGISTERS(); |