當前位置: 首頁>>代碼示例>>C#>>正文


C# Debugger.DkmProcess類代碼示例

本文整理匯總了C#中Microsoft.VisualStudio.Debugger.DkmProcess的典型用法代碼示例。如果您正苦於以下問題:C# DkmProcess類的具體用法?C# DkmProcess怎麽用?C# DkmProcess使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DkmProcess類屬於Microsoft.VisualStudio.Debugger命名空間,在下文中一共展示了DkmProcess類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: DummyHolder

 public DummyHolder(DkmProcess process) {
     var pyrtInfo = process.GetPythonRuntimeInfo();
     Dummy = 
         pyrtInfo.LanguageVersion >= PythonLanguageVersion.V34 ? 
         pyrtInfo.DLLs.Python.GetStaticVariable<PointerProxy<PyObject>>("_PySet_Dummy") :
         pyrtInfo.DLLs.Python.GetStaticVariable<PointerProxy<PyObject>>("dummy", "setobject.obj");
 }
開發者ID:omnimark,項目名稱:PTVS,代碼行數:7,代碼來源:PySetObject.cs

示例2: PySetObject

        public PySetObject(DkmProcess process, ulong address)
            : base(process, address) {
            InitializeStruct(this, out _fields);
            CheckPyType<PySetObject>();

            _dummy = Process.GetOrCreateDataItem(() => new DummyHolder(Process)).Dummy.TryRead();
        }
開發者ID:omnimark,項目名稱:PTVS,代碼行數:7,代碼來源:PySetObject.cs

示例3: PyIntObject

 protected PyIntObject(DkmProcess process, ulong address, bool checkType)
     : base(process, address) {
     InitializeStruct(this, out _fields);
     if (checkType) {
         CheckPyType<PyIntObject>();
     }
 }
開發者ID:RussBaz,項目名稱:PTVS,代碼行數:7,代碼來源:PyIntObject.cs

示例4: PyFrameObject_FieldOffsets

 public PyFrameObject_FieldOffsets(DkmProcess process) {
     var fields = StructProxy.GetStructFields<PyFrameObject, PyFrameObject.Fields>(process);
     f_code = fields.f_code.Offset;
     f_globals = fields.f_globals.Offset;
     f_locals = fields.f_locals.Offset;
     f_lineno = fields.f_lineno.Offset;
 }
開發者ID:sadapple,項目名稱:PTVS,代碼行數:7,代碼來源:TraceManagerLocalHelper.cs

示例5: TryCreate

        public static PyInterpreterState TryCreate(DkmProcess process, ulong address) {
            if (address == 0) {
                return null;
            }

            return new PyInterpreterState(process, address);
        }
開發者ID:zooba,項目名稱:PTVS,代碼行數:7,代碼來源:PyInterpreterState.cs

示例6: ModuleManager

        public ModuleManager(DkmProcess process) {
            _process = process;
            _pyrtInfo = process.GetPythonRuntimeInfo();

            LoadInitialPythonModules();
            LocalComponent.CreateRuntimeDllFunctionBreakpoint(_pyrtInfo.DLLs.Python, "PyCode_New", PythonDllBreakpointHandlers.PyCode_New, enable: true, debugStart: true);
            LocalComponent.CreateRuntimeDllFunctionBreakpoint(_pyrtInfo.DLLs.Python, "PyCode_NewEmpty", PythonDllBreakpointHandlers.PyCode_NewEmpty, enable: true, debugStart: true);
        }
開發者ID:omnimark,項目名稱:PTVS,代碼行數:8,代碼來源:ModuleManager.cs

示例7: ClearExceptionTriggers

        public void ClearExceptionTriggers(DkmProcess process, Guid sourceId) {
            if (_monitoredExceptions.Count != 0) {
                _monitoredExceptions.Clear();
                new LocalComponent.MonitorExceptionsRequest { MonitorExceptions = false }.SendHigher(process);
            }

            process.ClearExceptionTriggers(sourceId);
        }
開發者ID:sadapple,項目名稱:PTVS,代碼行數:8,代碼來源:ExceptionManager.cs

示例8: Create

        public static PyIntObject Create(DkmProcess process, int value) {
            var allocator = process.GetDataItem<PyObjectAllocator>();
            Debug.Assert(allocator != null);

            var result = allocator.Allocate<PyIntObject>();
            result.ob_ival.Write(value);
            return result;
        }
開發者ID:RussBaz,項目名稱:PTVS,代碼行數:8,代碼來源:PyIntObject.cs

示例9: Create

        public static PyComplexObject Create(DkmProcess process, Complex value) {
            var allocator = process.GetDataItem<PyObjectAllocator>();
            Debug.Assert(allocator != null);

            var result = allocator.Allocate<PyComplexObject>();
            result.cval.real.Write(value.Real);
            result.cval.imag.Write(value.Imaginary);
            return result;
        }
開發者ID:omnimark,項目名稱:PTVS,代碼行數:9,代碼來源:PyComplexObject.cs

示例10: Create

        public static PyBytesObject Create(DkmProcess process, AsciiString value) {
            var allocator = process.GetDataItem<PyObjectAllocator>();
            Debug.Assert(allocator != null);

            var result = allocator.Allocate<PyBytesObject>(value.Bytes.Length);
            result.ob_size.Write(value.Bytes.Length);
            process.WriteMemory(result.ob_sval.Address, value.Bytes);

            return result;
        }
開發者ID:zooba,項目名稱:PTVS,代碼行數:10,代碼來源:PyBytesObject.cs

示例11: PyFrameObject

 public PyFrameObject(DkmProcess process, ulong address)
     : base(process, address) {
     var pythonInfo = process.GetPythonRuntimeInfo();
     if (pythonInfo.LanguageVersion <= PythonLanguageVersion.V35) {
         Fields_27_35 fields;
         InitializeStruct(this, out fields);
         _fields = fields;
     } else {
         Fields_36 fields;
         InitializeStruct(this, out fields);
         _fields = fields;
     }
     CheckPyType<PyFrameObject>();
 }
開發者ID:zooba,項目名稱:PTVS,代碼行數:14,代碼來源:PyFrameObject.cs

示例12: ExpressionEvaluator

        public ExpressionEvaluator(DkmProcess process) {
            _process = process;
            var pyrtInfo = process.GetPythonRuntimeInfo();

            _evalLoopThreadId = pyrtInfo.DLLs.DebuggerHelper.GetExportedStaticVariable<UInt64Proxy>("evalLoopThreadId");
            _evalLoopFrame = pyrtInfo.DLLs.DebuggerHelper.GetExportedStaticVariable<UInt64Proxy>("evalLoopFrame");
            _evalLoopResult = pyrtInfo.DLLs.DebuggerHelper.GetExportedStaticVariable<UInt64Proxy>("evalLoopResult");
            _evalLoopExcType = pyrtInfo.DLLs.DebuggerHelper.GetExportedStaticVariable<UInt64Proxy>("evalLoopExcType");
            _evalLoopExcValue = pyrtInfo.DLLs.DebuggerHelper.GetExportedStaticVariable<UInt64Proxy>("evalLoopExcValue");
            _evalLoopExcStr = pyrtInfo.DLLs.DebuggerHelper.GetExportedStaticVariable<UInt64Proxy>("evalLoopExcStr");
            _evalLoopSEHCode = pyrtInfo.DLLs.DebuggerHelper.GetExportedStaticVariable<UInt32Proxy>("evalLoopSEHCode");
            _evalLoopInput = pyrtInfo.DLLs.DebuggerHelper.GetExportedStaticVariable<CStringProxy>("evalLoopInput");

            LocalComponent.CreateRuntimeDllExportedFunctionBreakpoint(pyrtInfo.DLLs.DebuggerHelper, "OnEvalComplete", OnEvalComplete, enable: true);
        }
開發者ID:omnimark,項目名稱:PTVS,代碼行數:15,代碼來源:ExpressionEvaluator.cs

示例13: Create

        public static PyUnicodeObject27 Create(DkmProcess process, string value) {
            // Allocate string buffer together with the object itself in a single block.
            var allocator = process.GetDataItem<PyObjectAllocator>();
            Debug.Assert(allocator != null);

            var result = allocator.Allocate<PyUnicodeObject27>(value.Length * 2);
            result.length.Write(value.Length);

            var str = result.Address.OffsetBy(StructProxy.SizeOf<PyUnicodeObject27>(process));
            result.str.Raw.Write(str);

            var buf = Encoding.Unicode.GetBytes(value);
            process.WriteMemory(str, buf);

            return result;
        }
開發者ID:omnimark,項目名稱:PTVS,代碼行數:16,代碼來源:PyUnicodeObject.cs

示例14: PyFrameObject_FieldOffsets

 public PyFrameObject_FieldOffsets(DkmProcess process) {
     if (process.GetPythonRuntimeInfo().LanguageVersion <= PythonLanguageVersion.V35) {
         var fields = StructProxy.GetStructFields<PyFrameObject, PyFrameObject.Fields_27_35>(process);
         f_back = -1;
         f_code = fields.f_code.Offset;
         f_globals = fields.f_globals.Offset;
         f_locals = fields.f_locals.Offset;
         f_lineno = fields.f_lineno.Offset;
     } else {
         var fields = StructProxy.GetStructFields<PyFrameObject, PyFrameObject.Fields_36>(process);
         f_back = fields.f_back.Offset;
         f_code = fields.f_code.Offset;
         f_globals = fields.f_globals.Offset;
         f_locals = fields.f_locals.Offset;
         f_lineno = fields.f_lineno.Offset;
     }
 }
開發者ID:zooba,項目名稱:PTVS,代碼行數:17,代碼來源:TraceManagerLocalHelper.cs

示例15: ShouldEnableChildDebugging

    private static bool ShouldEnableChildDebugging(DkmProcess process, DebugProcessOptions options) {
      if (options.ChildDebuggingMode == ChildDebuggingMode.AlwaysAttach)
        return true;

      if (options.ChildDebuggingMode == ChildDebuggingMode.UseDefault) {
        Logger.LogInfo(
            "Requesting default child process debugging mode for process {0}.", 
            process.UniqueId);
        DkmCustomMessage attachRequest = DkmCustomMessage.Create(
            process.Connection,
            process,
            PackageServices.VsPackageMessageGuid,
            (int)VsPackageMessage.IsChildDebuggingEnabled,
            process.UniqueId,
            process.Connection.UniqueId);
        // This needs to happen synchronously in order to guarantee that child debugging is enabled
        // before the process finishes initializing.
        attachRequest.SendToVsService(PackageServices.DkmComponentEventHandler, true);
      }
      return false;
    }
開發者ID:mbbill,項目名稱:vs-chromium,代碼行數:21,代碼來源:DkmRuntimeInstanceExtensions.cs


注:本文中的Microsoft.VisualStudio.Debugger.DkmProcess類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。