Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public ModuleManager(DkmProcess process)
        {
            _process  = process;
            _pyrtInfo = process.GetPythonRuntimeInfo();

            string pyCodeFunctionName = (_pyrtInfo.LanguageVersion < Parsing.PythonLanguageVersion.V38) ? "PyCode_New" : "PyCode_NewWithPosOnlyArgs";

            LocalComponent.CreateRuntimeDllFunctionBreakpoint(_pyrtInfo.DLLs.Python, pyCodeFunctionName, PythonDllBreakpointHandlers.PyCode_New, enable: true, debugStart: true);
            LocalComponent.CreateRuntimeDllFunctionBreakpoint(_pyrtInfo.DLLs.Python, "PyCode_NewEmpty", PythonDllBreakpointHandlers.PyCode_NewEmpty, enable: true, debugStart: true);
        }
Ejemplo n.º 3
0
        private void AddStepInGate(StepInGateHandler handler, DkmNativeModuleInstance module, string funcName, bool hasMultipleExitPoints)
        {
            var gate = new StepInGate {
                Handler = handler,
                HasMultipleExitPoints = hasMultipleExitPoints,
                Breakpoint            = LocalComponent.CreateRuntimeDllFunctionBreakpoint(module, funcName,
                                                                                          (thread, frameBase, vframe, retAddr) => handler(thread, frameBase, vframe, useRegisters: thread.Process.Is64Bit()))
            };

            _stepInGates.Add(gate);
        }