public void new_threadstate(DkmThread thread, ulong frameBase, ulong vframe, ulong returnAddress) { var process = thread.Process; var cppEval = new CppExpressionEvaluator(thread, frameBase, vframe); // Addressing this local by name does not work for release builds, so read the return value directly from the register instead. var tstate = PyThreadState.TryCreate(process, cppEval.EvaluateReturnValueUInt64()); if (tstate == null) { return; } _owner.RegisterTracing(tstate); }
public void PyInterpreterState_New(DkmThread thread, ulong frameBase, ulong vframe, ulong returnAddress) { var process = thread.Process; var cppEval = new CppExpressionEvaluator(thread, frameBase, vframe); var istate = PyInterpreterState.TryCreate(process, cppEval.EvaluateReturnValueUInt64()); if (istate == null) { return; } if (process.GetPythonRuntimeInfo().LanguageVersion >= PythonLanguageVersion.V36) { _owner.RegisterJITTracing(istate); } }