コード例 #1
0
ファイル: DDebugSession.cs プロジェクト: nazriel/Mono-D
        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
        }
コード例 #2
0
ファイル: DDebugSession.cs プロジェクト: nazriel/Mono-D
        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
        }
コード例 #3
0
        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
        }
コード例 #4
0
		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            
		}
コード例 #5
0
ファイル: DebugManagement.cs プロジェクト: DinrusGroup/D-IDE
			static DebugManagement()
			{
				try
				{
					Engine = new DBGEngine();
				}
				catch (Exception ex)
				{
					ErrorLogger.Log(ex);
				}
			}
コード例 #6
0
ファイル: DebugManagement.cs プロジェクト: derekdreery/D-IDE
 static DebugManagement()
 {
     try
     {
         Engine = new DBGEngine();
     }
     catch (Exception ex)
     {
         ErrorLogger.Log(ex);
     }
 }
コード例 #7
0
ファイル: DDebugSupport.cs プロジェクト: rumbu13/D-IDE
 public override void PostlaunchInit(DBGEngine Engine)
 {
     base.PostlaunchInit(Engine);
     //CodeInjection.InjectToStringCode(hProcess, out toStringFunc, out varAddr);
 }
コード例 #8
0
		public virtual void PostlaunchInit(DBGEngine Engine) { 
			//hProcess = (IntPtr)Engine.ProcessHandle; 
		}
コード例 #9
0
 public override void PostlaunchInit(DBGEngine Engine)
 {
     base.PostlaunchInit(Engine);
     //CodeInjection.InjectToStringCode(hProcess, out toStringFunc, out varAddr);
 }
コード例 #10
0
 public virtual void PostlaunchInit(DBGEngine Engine)
 {
     //hProcess = (IntPtr)Engine.ProcessHandle;
 }