当前位置: 首页>>代码示例>>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;未经允许,请勿转载。