summaryrefslogtreecommitdiff
path: root/src/vm/exceptionhandling.cpp
diff options
context:
space:
mode:
authorSteve MacLean <Steve.MacLean@microsoft.com>2019-07-03 22:29:07 -0400
committerGitHub <noreply@github.com>2019-07-03 22:29:07 -0400
commit613f9f233abde4159a85aa8130b7fcb57dc7a4ef (patch)
tree09aed307f82583475ef52a7e2448c46da8c640db /src/vm/exceptionhandling.cpp
parentae3430d8ce50c9e954192e89871aff783da375e2 (diff)
downloadcoreclr-613f9f233abde4159a85aa8130b7fcb57dc7a4ef.tar.gz
coreclr-613f9f233abde4159a85aa8130b7fcb57dc7a4ef.tar.bz2
coreclr-613f9f233abde4159a85aa8130b7fcb57dc7a4ef.zip
arm64singlestepper (#25512)
Add single step emulation for arm64 Linux Add a copy and rework armsinglestepper to arm64singlestepper Add arm64 emulation of all armv8 user space instructions which read or write PC. - ADR, ADRP - Branch instructions: B, BL, B.cond, BR, BLR, RET - LDR (literal) * Add FEATURE_EMULATE_SINGLESTEP * Enable for ARM64 linux * Debugging fixes Fix IsSSFlagEnabled bug Fix opcode type Fix code buffer asserts Fix CBZ typo Fix BitExtract Fix m_targetPc Minimize written instructions Fix comments Fix Bypass address truncation Fix false assert Add additional logging Use %lx to log addresses Remove stray LOG Remove stray assert
Diffstat (limited to 'src/vm/exceptionhandling.cpp')
-rw-r--r--src/vm/exceptionhandling.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vm/exceptionhandling.cpp b/src/vm/exceptionhandling.cpp
index 87220c345f..4de884fb74 100644
--- a/src/vm/exceptionhandling.cpp
+++ b/src/vm/exceptionhandling.cpp
@@ -5190,8 +5190,8 @@ BOOL IsSafeToHandleHardwareException(PCONTEXT contextRecord, PEXCEPTION_RECORD e
IsIPInMarkedJitHelper(controlPc));
}
-#ifdef _TARGET_ARM_
-static inline BOOL HandleArmSingleStep(PCONTEXT pContext, PEXCEPTION_RECORD pExceptionRecord, Thread *pThread)
+#ifdef FEATURE_EMULATE_SINGLESTEP
+static inline BOOL HandleSingleStep(PCONTEXT pContext, PEXCEPTION_RECORD pExceptionRecord, Thread *pThread)
{
// On ARM we don't have any reliable hardware support for single stepping so it is emulated in software.
// The implementation will end up throwing an EXCEPTION_BREAKPOINT rather than an EXCEPTION_SINGLE_STEP
@@ -5211,7 +5211,7 @@ static inline BOOL HandleArmSingleStep(PCONTEXT pContext, PEXCEPTION_RECORD pExc
}
return FALSE;
}
-#endif // _TARGET_ARM_
+#endif // FEATURE_EMULATE_SINGLESTEP
BOOL HandleHardwareException(PAL_SEHException* ex)
{
@@ -5288,8 +5288,8 @@ BOOL HandleHardwareException(PAL_SEHException* ex)
}
#endif
-#ifdef _TARGET_ARM_
- HandleArmSingleStep(ex->GetContextRecord(), ex->GetExceptionRecord(), pThread);
+#ifdef FEATURE_EMULATE_SINGLESTEP
+ HandleSingleStep(ex->GetContextRecord(), ex->GetExceptionRecord(), pThread);
#endif
if (ex->GetExceptionRecord()->ExceptionCode == STATUS_BREAKPOINT)
{