public DDebugSession() { logGdb = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MONODEVELOP_GDB_LOG")); Engine = new DBGEngine(); Engine.Output += delegate(OutputFlags type, string msg) { /*if (!GlobalProperties.Instance.VerboseDebugOutput && (type == OutputFlags.Verbose || type == OutputFlags.Normal)) return; * * var ErrType=ErrorType.Message; * if (type == OutputFlags.Warning) * return; * if (type == OutputFlags.Error) * ErrType = ErrorType.Error; * Log(msg.Replace("\n",string.Empty),ErrType);*/ }; Engine.OnLoadModule += delegate(ulong BaseOffset, uint ModuleSize, string ModuleName, uint Checksum, uint Timestamp) { if (EngineStarting) { return(DebugStatus.Break); } return(DebugStatus.NoChange); }; Engine.OnCreateProcess += delegate(ulong BaseOffset, uint ModuleSize, string ModuleName, uint Checksum, uint TimeStamp) { //debugeeProcessId = Process.GetProcessesByName(ModuleName)[0].Id; debugeeOffSet = BaseOffset; return(DebugStatus.NoChange); }; Engine.OnBreakPoint += delegate(uint Id, string cmd, ulong off, string exp) { FireBreakPoint(off); StopWaitingForEvents = true; return(DebugStatus.Break); }; Engine.OnException += delegate(CodeException ex) { StopWaitingForEvents = true; return(DebugStatus.Break); }; Engine.OnExitProcess += delegate(uint code) { /*Log("Debugger Process exited with code " + code.ToString(), * code<1?ErrorType.Information:ErrorType.Error); * StopExecution();*/ return(DebugStatus.NoChange); }; Engine.Execute("n 10"); // Set decimal numbers Engine.Execute(".lines -e"); // Enable source code locating }
public DDebugSession() { logGdb = !string.IsNullOrEmpty (Environment.GetEnvironmentVariable ("MONODEVELOP_GDB_LOG")); Engine = new DBGEngine(); Engine.Output += delegate(OutputFlags type, string msg) { /*if (!GlobalProperties.Instance.VerboseDebugOutput && (type == OutputFlags.Verbose || type == OutputFlags.Normal)) return; var ErrType=ErrorType.Message; if (type == OutputFlags.Warning) return; if (type == OutputFlags.Error) ErrType = ErrorType.Error; Log(msg.Replace("\n",string.Empty),ErrType);*/ }; Engine.OnLoadModule += delegate(ulong BaseOffset, uint ModuleSize, string ModuleName, uint Checksum, uint Timestamp) { if (EngineStarting) return DebugStatus.Break; return DebugStatus.NoChange; }; Engine.OnCreateProcess += delegate(ulong BaseOffset, uint ModuleSize, string ModuleName, uint Checksum, uint TimeStamp) { //debugeeProcessId = Process.GetProcessesByName(ModuleName)[0].Id; debugeeOffSet = BaseOffset; return DebugStatus.NoChange; }; Engine.OnBreakPoint += delegate(uint Id, string cmd, ulong off, string exp) { FireBreakPoint(off); StopWaitingForEvents = true; return DebugStatus.Break; }; Engine.OnException += delegate(CodeException ex) { StopWaitingForEvents = true; return DebugStatus.Break; }; Engine.OnExitProcess += delegate(uint code) { /*Log("Debugger Process exited with code " + code.ToString(), code<1?ErrorType.Information:ErrorType.Error); StopExecution();*/ return DebugStatus.NoChange; }; Engine.Execute("n 10"); // Set decimal numbers Engine.Execute(".lines -e"); // Enable source code locating }
public DDebugSession() { Engine = new DBGEngine(); Engine.Output += delegate(OutputFlags type, string msg) { /*if (!GlobalProperties.Instance.VerboseDebugOutput && (type == OutputFlags.Verbose || type == OutputFlags.Normal)) return; * * var ErrType=ErrorType.Message; * if (type == OutputFlags.Warning) * return; * if (type == OutputFlags.Error) * ErrType = ErrorType.Error; * Log(msg.Replace("\n",string.Empty),ErrType);*/ }; Engine.OnLoadModule += delegate(ulong BaseOffset, uint ModuleSize, string ModuleName, uint Checksum, uint Timestamp) { if (EngineStarting) { return(DebugStatus.Break); } return(DebugStatus.NoChange); }; Engine.OnCreateProcess += delegate(ulong BaseOffset, uint ModuleSize, string ModuleName, uint Checksum, uint TimeStamp) { targetProcessId = Engine.GetTargetProcessId(); debugeeOffSet = BaseOffset; return(DebugStatus.NoChange); }; Engine.OnBreakPoint += delegate(uint Id, string cmd, ulong off, string exp) { FireBreakPoint(off); StopWaitingForEvents = true; return(DebugStatus.Break); }; Engine.OnException += delegate(CodeException ex) { StopWaitingForEvents = true; return(DebugStatus.Break); }; Engine.OnExitProcess += delegate(uint code) { Exit(); return(DebugStatus.NoChange); }; Engine.Execute("n 10"); // Set decimal numbers Engine.Execute(".lines -e"); // Enable source code locating }
public DDebugSession() { Engine = new DBGEngine(); Engine.Output += delegate(OutputFlags type, string msg) { /*if (!GlobalProperties.Instance.VerboseDebugOutput && (type == OutputFlags.Verbose || type == OutputFlags.Normal)) return; var ErrType=ErrorType.Message; if (type == OutputFlags.Warning) return; if (type == OutputFlags.Error) ErrType = ErrorType.Error; Log(msg.Replace("\n",string.Empty),ErrType);*/ }; Engine.OnLoadModule += delegate(ulong BaseOffset, uint ModuleSize, string ModuleName, uint Checksum, uint Timestamp) { if (EngineStarting) return DebugStatus.Break; return DebugStatus.NoChange; }; Engine.OnCreateProcess += delegate(ulong BaseOffset, uint ModuleSize, string ModuleName, uint Checksum, uint TimeStamp) { targetProcessId = Engine.GetTargetProcessId(); debugeeOffSet = BaseOffset; return DebugStatus.NoChange; }; Engine.OnBreakPoint += delegate(uint Id, string cmd, ulong off, string exp) { FireBreakPoint(off); StopWaitingForEvents = true; return DebugStatus.Break; }; Engine.OnException += delegate(CodeException ex) { StopWaitingForEvents = true; return DebugStatus.Break; }; Engine.OnExitProcess += delegate(uint code) { Exit(); return DebugStatus.NoChange; }; Engine.Execute("n 10"); // Set decimal numbers Engine.Execute(".lines -e"); // Enable source code locating }
static DebugManagement() { try { Engine = new DBGEngine(); } catch (Exception ex) { ErrorLogger.Log(ex); } }
public override void PostlaunchInit(DBGEngine Engine) { base.PostlaunchInit(Engine); //CodeInjection.InjectToStringCode(hProcess, out toStringFunc, out varAddr); }
public virtual void PostlaunchInit(DBGEngine Engine) { //hProcess = (IntPtr)Engine.ProcessHandle; }