| 1 | // Licensed to the .NET Foundation under one or more agreements. |
| 2 | // The .NET Foundation licenses this file to you under the MIT license. |
| 3 | // See the LICENSE file in the project root for more information. |
| 4 | //***************************************************************************** |
| 5 | // The following are used to read and write data given NativeVarInfo |
| 6 | // for primitive types. Don't use these for VALUECLASSes. |
| 7 | //***************************************************************************** |
| 8 | |
| 9 | |
| 10 | #ifndef _NATIVE_VAR_ACCESSORS_H_ |
| 11 | #define _NATIVE_VAR_ACCESSORS_H_ |
| 12 | |
| 13 | #include "corjit.h" |
| 14 | |
| 15 | bool operator ==(const ICorDebugInfo::VarLoc &varLoc1, |
| 16 | const ICorDebugInfo::VarLoc &varLoc2); |
| 17 | |
| 18 | #define MAX_NATIVE_VAR_LOCS 2 |
| 19 | |
| 20 | SIZE_T GetRegOffsInCONTEXT(ICorDebugInfo::RegNum regNum); |
| 21 | |
| 22 | struct NativeVarLocation |
| 23 | { |
| 24 | ULONG64 addr; |
| 25 | TADDR size; |
| 26 | bool contextReg; |
| 27 | }; |
| 28 | |
| 29 | ULONG NativeVarLocations(const ICorDebugInfo::VarLoc & varLoc, |
| 30 | PT_CONTEXT pCtx, |
| 31 | ULONG numLocs, |
| 32 | NativeVarLocation* locs); |
| 33 | |
| 34 | SIZE_T *NativeVarStackAddr(const ICorDebugInfo::VarLoc & varLoc, |
| 35 | PT_CONTEXT pCtx); |
| 36 | |
| 37 | bool GetNativeVarVal(const ICorDebugInfo::VarLoc & varLoc, |
| 38 | PT_CONTEXT pCtx, |
| 39 | SIZE_T * pVal1, |
| 40 | SIZE_T * pVal2 |
| 41 | WIN64_ARG(SIZE_T cbSize)); |
| 42 | |
| 43 | bool SetNativeVarVal(const ICorDebugInfo::VarLoc & varLoc, |
| 44 | PT_CONTEXT pCtx, |
| 45 | SIZE_T val1, |
| 46 | SIZE_T val2 |
| 47 | WIN64_ARG(SIZE_T cbSize)); |
| 48 | #endif // #ifndef _NATIVE_VAR_ACCESSORS_H_ |
| 49 | |