Ejemplo n.º 1
0
        public static DkmRuntimeInstructionBreakpoint CreateRuntimeDllFunctionBreakpoint(DkmNativeModuleInstance moduleInstance, string funcName, RuntimeDllBreakpointHandler handler, bool enable = false, bool debugStart = false)
        {
            var process            = moduleInstance.Process;
            var runtimeBreakpoints = process.GetOrCreateDataItem(() => new RuntimeDllBreakpoints());

            var addr = moduleInstance.GetFunctionAddress(funcName, debugStart);
            var bp   = process.CreateBreakpoint(Guids.LocalComponentGuid, addr);

            if (enable)
            {
                bp.Enable();
            }
            runtimeBreakpoints.Handlers.Add(bp.UniqueId, handler);
            return(bp);
        }
Ejemplo n.º 2
0
        public static DkmRuntimeInstructionBreakpoint CreateRuntimeDllFunctionBreakpoint(DkmNativeModuleInstance moduleInstance, string funcName, RuntimeDllBreakpointHandler handler, bool enable = false, bool debugStart = false)
        {
            var addr = moduleInstance.GetFunctionAddress(funcName, debugStart);

            return(CreateBreakpoint(moduleInstance.Process, addr, handler, enable));
        }