diff options
author | Steve MacLean <sdmaclea@qti.qualcomm.com> | 2017-02-17 13:25:37 -0500 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2017-02-17 19:25:37 +0100 |
commit | 9baa44aa334cf6f032e4abeae10dc1b960aaeb57 (patch) | |
tree | 9db49209ed0728eab25458e22f7416a0d31e0690 /src/debug/ee | |
parent | 9f4aae6ac42f846473e6f70f2ac19e8910c97ccc (diff) | |
download | coreclr-9baa44aa334cf6f032e4abeae10dc1b960aaeb57.tar.gz coreclr-9baa44aa334cf6f032e4abeae10dc1b960aaeb57.tar.bz2 coreclr-9baa44aa334cf6f032e4abeae10dc1b960aaeb57.zip |
[ARM64/Unix] (#9500)
* [Arm64/Unix] Update arm64 *.S files to match *.asm
* [Arm64/Unix] Fix CONTEXTToNativeContext()
* [Arm64/Unix] ThrowExceptionFromContextInternal
* [Arm64/Unix] Preserve x8 argument register
* [ARM64/Unix] Add CFI directives
Add native unwind info
* [Arm64/Unix] Fix RtlRestoreContext
* [Arm64/Unix] Restore FP from CurrentContextPointers
* [Arm64/Unix] fix pointer math
* [Arm64/Unix] Fix CallDescrWorkerInternal personality
* [Arm64/Unix] More Fp fixups
* [Arm64/Unix] CallEHFunclet machine state
Restore non-volatile machine state in CallEHFunclet
* [Arm64/Unix] CallDescrWorkerInternal
Use empty stack slot to save argument
* [Arm64/Unix] RtlVirtualUnwind update pointers
* [Arm64] LazyMachState fixes
* [Arm64/Unix] disable USE_REDIRECT_FOR_GCSTRESS
When FEATURE_PAL is enableds USE_REDIRECT_FOR_GCSTRESS
is not supported
* [Arm64] ClearRegDisplayArgumentAndScratchRegisters()
* [Arm64] Remove unnecesary copy in TransitionFrame
* [Arm64/Unix] Fix comment per review
* [Arm64/Unix] move constants per review
* [Arm64/Unix] Use ldp per review
Also fix indentation
* [Arm64/Unix] Fix indentation per review
* [Arm64/Unix] Remove m_Unwound per review comments
* [Arm64/Unix] Use PREPARE_EXTERNAL_VAR to access globals
* [Arm64/Unix] Fix more whitespace per earlier review comments
Diffstat (limited to 'src/debug/ee')
-rw-r--r-- | src/debug/ee/arm64/dbghelpers.S | 55 | ||||
-rw-r--r-- | src/debug/ee/wks/CMakeLists.txt | 2 |
2 files changed, 41 insertions, 16 deletions
diff --git a/src/debug/ee/arm64/dbghelpers.S b/src/debug/ee/arm64/dbghelpers.S index 07ed04acd5..64932f322b 100644 --- a/src/debug/ee/arm64/dbghelpers.S +++ b/src/debug/ee/arm64/dbghelpers.S @@ -1,25 +1,50 @@ -//Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#include "asmconstants.h" #include "unixasmmacros.inc" -NESTED_ENTRY FuncEvalHijack, _TEXT, FuncEvalHijackPersonalityRoutine +// +// hijacking stub used to perform a func-eval, see Debugger::FuncEvalSetup() for use. +// +// on entry: +// x0 : pointer to DebuggerEval object +// -// NOTE: FuncEvalHijackPersonalityRoutine is dependent on the stack layout so if -// you change the prolog you will also need to update the personality routine. +// @dbgtodo- once we port Funceval, use the ExceptionHijack stub instead of this func-eval stub. +NESTED_ENTRY FuncEvalHijack, _TEXT, UnhandledExceptionHandlerUnix -// push arg to the stack so our personality routine can find it -// push lr to get good stacktrace in debugger + // NOTE: FuncEvalHijackPersonalityRoutine is dependent on the stack layout so if + // you change the prolog you will also need to update the personality routine. -PROLOG_SAVE_REG_PAIR fp, lr, #-32 + // push arg to the stack so our personality routine can find it + // push lr to get good stacktrace in debugger + PROLOG_SAVE_REG_PAIR_INDEXED fp, lr, -32 + str x0, [sp, #16] + // FuncEvalHijackWorker returns the address we should jump to. + bl FuncEvalHijackWorker + + EPILOG_STACK_FREE 32 + EPILOG_BRANCH_REG x0 +NESTED_END FuncEvalHijack + +// This is the general purpose hijacking stub. The DacDbi Hijack primitive will +// set up the stack and then set the IP here, and so this just makes the call. +NESTED_ENTRY ExceptionHijack, _TEXT, UnhandledExceptionHandlerUnix + + // make the call + bl ExceptionHijackWorker + + // effective NOP to terminate unwind + mov x3, x3 + + // *** should never get here *** + EMIT_BREAKPOINT + +// exported label so the debugger knows where the end of this function is +PATCH_LABEL ExceptionHijackEnd + +NESTED_END ExceptionHijack, _TEXT - str x0, [sp, #16] - // FuncEvalHijackWorker returns the address we should jump to. - bl FuncEvalHijackWorker - - EPILOG_STACK_FREE 32 - EPILOG_BRANCH_REG x0 -NESTED_END FuncEvalHijack, _TEXT -//NESTED_ENTRY ExceptionHijack,,ExceptionHijackPersonalityRoutine
\ No newline at end of file diff --git a/src/debug/ee/wks/CMakeLists.txt b/src/debug/ee/wks/CMakeLists.txt index 1088355f12..4c4c537607 100644 --- a/src/debug/ee/wks/CMakeLists.txt +++ b/src/debug/ee/wks/CMakeLists.txt @@ -58,7 +58,7 @@ add_compile_options(-fPIC) if(CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_ARM OR CLR_CMAKE_PLATFORM_ARCH_ARM64 OR CLR_CMAKE_PLATFORM_ARCH_I386) add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ../${ARCH_SOURCES_DIR}/dbghelpers.S) elseif(CLR_CMAKE_PLATFORM_ARCH_ARM64) - add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS}) + add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ../${ARCH_SOURCES_DIR}/dbghelpers.S) else() message(FATAL_ERROR "Only ARM and AMD64 is supported") endif() |