本文整理汇总了C#中Microsoft.VisualStudio.Debugger.DkmProcess.GetPythonRuntimeInfo方法的典型用法代码示例。如果您正苦于以下问题:C# DkmProcess.GetPythonRuntimeInfo方法的具体用法?C# DkmProcess.GetPythonRuntimeInfo怎么用?C# DkmProcess.GetPythonRuntimeInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.VisualStudio.Debugger.DkmProcess
的用法示例。
在下文中一共展示了DkmProcess.GetPythonRuntimeInfo方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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");
}
示例2: 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);
}
示例3: 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>();
}
示例4: 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);
}
示例5: 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;
}
}
示例6: InterpHeadHolder
public InterpHeadHolder(DkmProcess process) {
Proxy = process.GetPythonRuntimeInfo().DLLs.Python.GetStaticVariable<PointerProxy<PyInterpreterState>>("interp_head");
}
示例7: TraceManagerLocalHelper
public unsafe TraceManagerLocalHelper(DkmProcess process, Kind kind) {
_process = process;
_pyrtInfo = process.GetPythonRuntimeInfo();
_traceFunc = _pyrtInfo.DLLs.DebuggerHelper.GetExportedFunctionAddress("TraceFunc");
_isTracing = _pyrtInfo.DLLs.DebuggerHelper.GetExportedStaticVariable<ByteProxy>("isTracing");
_pyTracingPossible = _pyrtInfo.DLLs.Python.GetStaticVariable<UInt32Proxy>("_Py_TracingPossible");
if (kind == Kind.StepIn) {
var fieldOffsets = _pyrtInfo.DLLs.DebuggerHelper.GetExportedStaticVariable<CliStructProxy<FieldOffsets>>("fieldOffsets");
fieldOffsets.Write(new FieldOffsets(process, _pyrtInfo));
var types = _pyrtInfo.DLLs.DebuggerHelper.GetExportedStaticVariable<CliStructProxy<Types>>("types");
types.Write(new Types(process, _pyrtInfo));
var functionPointers = _pyrtInfo.DLLs.DebuggerHelper.GetExportedStaticVariable<CliStructProxy<FunctionPointers>>("functionPointers");
functionPointers.Write(new FunctionPointers(process, _pyrtInfo));
var stringEquals = _pyrtInfo.DLLs.DebuggerHelper.GetExportedStaticVariable<PointerProxy>("stringEquals");
if (_pyrtInfo.LanguageVersion <= PythonLanguageVersion.V27) {
stringEquals.Write(_pyrtInfo.DLLs.DebuggerHelper.GetExportedFunctionAddress("StringEquals27").GetPointer());
} else {
stringEquals.Write(_pyrtInfo.DLLs.DebuggerHelper.GetExportedFunctionAddress("StringEquals33").GetPointer());
}
foreach (var interp in PyInterpreterState.GetInterpreterStates(process)) {
foreach (var tstate in interp.GetThreadStates()) {
RegisterTracing(tstate);
}
}
_handlers = new PythonDllBreakpointHandlers(this);
LocalComponent.CreateRuntimeDllFunctionExitBreakpoints(_pyrtInfo.DLLs.Python, "new_threadstate", _handlers.new_threadstate, enable: true);
foreach (var methodInfo in _handlers.GetType().GetMethods()) {
var stepInAttr = (StepInGateAttribute)Attribute.GetCustomAttribute(methodInfo, typeof(StepInGateAttribute));
if (stepInAttr != null &&
(stepInAttr.MinVersion == PythonLanguageVersion.None || _pyrtInfo.LanguageVersion >= stepInAttr.MinVersion) &&
(stepInAttr.MaxVersion == PythonLanguageVersion.None || _pyrtInfo.LanguageVersion <= stepInAttr.MaxVersion)) {
var handler = (StepInGateHandler)Delegate.CreateDelegate(typeof(StepInGateHandler), _handlers, methodInfo);
AddStepInGate(handler, _pyrtInfo.DLLs.Python, methodInfo.Name, stepInAttr.HasMultipleExitPoints);
}
}
if (_pyrtInfo.DLLs.CTypes != null) {
OnCTypesLoaded(_pyrtInfo.DLLs.CTypes);
}
}
}
示例8: DummyHolder
public DummyHolder(DkmProcess process) {
Dummy = process.GetPythonRuntimeInfo().DLLs.Python.GetStaticVariable<PointerProxy<PyObject>>("dummy", "dictobject.obj");
}
示例9: FromNativeGlobalVariable
public unsafe static PyTypeObject FromNativeGlobalVariable(DkmProcess process, string name) {
var addr = process.GetPythonRuntimeInfo().DLLs.Python.GetStaticVariableAddress(name);
return new PyTypeObject(process, addr);
}
示例10: CallStackFilter
public CallStackFilter(DkmProcess process) {
_process = process;
_pyrtInfo = process.GetPythonRuntimeInfo();
}
示例11: ValuesHolder
public ValuesHolder(DkmProcess process) {
var pythonDll = process.GetPythonRuntimeInfo().DLLs.Python;
False = pythonDll.GetStaticVariable<PyBoolObject33>("_Py_FalseStruct");
True = pythonDll.GetStaticVariable<PyBoolObject33>("_Py_TrueStruct");
}