arm64singlestepper (dotnet/coreclr#25512)
authorSteve MacLean <Steve.MacLean@microsoft.com>
Thu, 4 Jul 2019 02:29:07 +0000 (22:29 -0400)
committerGitHub <noreply@github.com>
Thu, 4 Jul 2019 02:29:07 +0000 (22:29 -0400)
commit113558f722f650a10cc572b5c910a1e874dadd76
treed53e3fd860c1f9509ae2ab2e6e379b27bab05db0
parent6da125e3addff4ca5332906b8391e8a4aa233887
arm64singlestepper (dotnet/coreclr#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

Commit migrated from https://github.com/dotnet/coreclr/commit/613f9f233abde4159a85aa8130b7fcb57dc7a4ef
12 files changed:
src/coreclr/clrdefinitions.cmake
src/coreclr/src/debug/ee/arm64/primitives.cpp
src/coreclr/src/debug/ee/controller.cpp
src/coreclr/src/debug/ee/debugger.cpp
src/coreclr/src/debug/ee/funceval.cpp
src/coreclr/src/vm/CMakeLists.txt
src/coreclr/src/vm/arm64/arm64singlestepper.cpp [new file with mode: 0644]
src/coreclr/src/vm/arm64singlestepper.h [new file with mode: 0644]
src/coreclr/src/vm/excep.cpp
src/coreclr/src/vm/exceptionhandling.cpp
src/coreclr/src/vm/threads.h
src/coreclr/src/vm/threadsuspend.cpp