| 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 | // File: controller.inl |
| 6 | // |
| 7 | |
| 8 | // |
| 9 | // Inline definitions for the Left-Side of the CLR debugging services |
| 10 | // This is logically part of the header file. |
| 11 | // |
| 12 | //***************************************************************************** |
| 13 | |
| 14 | #ifndef CONTROLLER_INL_ |
| 15 | #define CONTROLLER_INL_ |
| 16 | |
| 17 | inline BOOL DebuggerControllerPatch::IsBreakpointPatch() |
| 18 | { |
| 19 | return (controller->GetDCType() == DEBUGGER_CONTROLLER_BREAKPOINT); |
| 20 | } |
| 21 | |
| 22 | inline BOOL DebuggerControllerPatch::IsStepperPatch() |
| 23 | { |
| 24 | return (controller->IsStepperDCType()); |
| 25 | } |
| 26 | |
| 27 | inline DebuggerPatchKind DebuggerControllerPatch::GetKind() |
| 28 | { |
| 29 | return kind; |
| 30 | } |
| 31 | inline BOOL DebuggerControllerPatch::IsILMasterPatch() |
| 32 | { |
| 33 | LIMITED_METHOD_CONTRACT; |
| 34 | |
| 35 | return (kind == PATCH_KIND_IL_MASTER); |
| 36 | } |
| 37 | |
| 38 | inline BOOL DebuggerControllerPatch::IsILSlavePatch() |
| 39 | { |
| 40 | LIMITED_METHOD_CONTRACT; |
| 41 | |
| 42 | return (kind == PATCH_KIND_IL_SLAVE); |
| 43 | } |
| 44 | |
| 45 | inline BOOL DebuggerControllerPatch::IsManagedPatch() |
| 46 | { |
| 47 | return (IsILMasterPatch() || IsILSlavePatch() || kind == PATCH_KIND_NATIVE_MANAGED); |
| 48 | |
| 49 | } |
| 50 | inline BOOL DebuggerControllerPatch::IsNativePatch() |
| 51 | { |
| 52 | return (kind == PATCH_KIND_NATIVE_MANAGED || kind == PATCH_KIND_NATIVE_UNMANAGED || (IsILSlavePatch() && !offsetIsIL)); |
| 53 | |
| 54 | } |
| 55 | |
| 56 | #endif // CONTROLLER_INL_ |
| 57 |