示例#1
0
        public ExceptionWindow(DebuggerService debuggerService, Thread thread, TargetEventArgs args)
        {
            this.debuggerService = debuggerService;

            Glade.XML gxml = new Glade.XML("gui.glade", "exceptionWindow", null);
            gxml.Autoconnect(this);

            image.Pixbuf = Pixmaps.Exception.GetPixbuf();

            if (args.Type == TargetEventType.UnhandledException)
            {
                buttonContinue.Visible = false;
            }

            labelExceptionCaught.Text = (args.Type == TargetEventType.Exception ? "Exception" : "Unandled exception") + " has been caugth:";

            StringBuilder sb = new StringBuilder();

            StackFrame[] callstack;
            try {
                callstack = thread.GetBacktrace().Frames;
            } catch {
                return;
            }

            foreach (StackFrame frame in callstack)
            {
                sb.Append(frame.ToString() + Environment.NewLine);
            }

            textviewCallstack.Buffer.Text = sb.ToString();
        }
示例#2
0
 public static void Main(string[] args)
 {
     if (args.Length >= 2 && args[0] == "--listen")
     {
         int      port    = int.Parse(args[1]);
         string[] newArgs = new string[args.Length - 2];
         Array.Copy(
             args, 2,
             newArgs, 0,
             newArgs.Length
             );
         string uri = DebuggerService.StartServer(port, newArgs);
         Console.WriteLine("Press Enter to exit");
         Console.ReadLine();
     }
     else if (args.Length >= 2 && args[0] == "--connect")
     {
         DebuggerService debuggerService = DebuggerService.Connect(args[1]);
         new MdbGui(debuggerService);
     }
     else
     {
         DebuggerService debuggerService = DebuggerService.StartInRemoteProcess(args);
         new MdbGui(debuggerService);
     }
 }
示例#3
0
		public LocalsStore(DebuggerService debuggerService, Interpreter interpreter)
		{
			this.debuggerService = debuggerService;
			this.interpreter = interpreter;
			this.rootVariable = new LocalVariablesRoot(interpreter);
			this.RootNode.SetValue(ColumnUpdateChilds, true);
		}
		public ExceptionWindow(DebuggerService debuggerService, Thread thread, TargetEventArgs args)
		{
			this.debuggerService = debuggerService;
			
			Glade.XML gxml = new Glade.XML("gui.glade", "exceptionWindow", null);
			gxml.Autoconnect(this);
			
			image.Pixbuf = Pixmaps.Exception.GetPixbuf();
			
			if (args.Type == TargetEventType.UnhandledException) {
				buttonContinue.Visible = false;
			}
			
			labelExceptionCaught.Text = (args.Type == TargetEventType.Exception ? "Exception" : "Unandled exception") + " has been caugth:";
			
			StringBuilder sb = new StringBuilder();
			StackFrame[] callstack;
			try {
				callstack = thread.GetBacktrace().Frames;
			} catch {
				return;
			}
			
			foreach(StackFrame frame in callstack) {
				sb.Append(frame.ToString() + Environment.NewLine);
			}
			
			textviewCallstack.Buffer.Text = sb.ToString();
		}
示例#5
0
 public LocalsStore(DebuggerService debuggerService, Interpreter interpreter)
 {
     this.debuggerService = debuggerService;
     this.interpreter     = interpreter;
     this.rootVariable    = new LocalVariablesRoot(interpreter);
     this.RootNode.SetValue(ColumnUpdateChilds, true);
 }
示例#6
0
        public MdbGui(DebuggerService debuggerService)
        {
            this.debuggerService = debuggerService;

            Application.Init();
            GuiInit();
            Application.Run();
        }
示例#7
0
        public static DebuggerService Connect(string uri)
        {
            Console.WriteLine("Connecting to " + uri);
            ChannelServices.RegisterChannel(new TcpChannel(0));
            DebuggerService debuggerService = (DebuggerService)Activator.GetObject(typeof(DebuggerService), uri);

            return(debuggerService);
        }
示例#8
0
        public CallstackPad(DebuggerService debuggerService) : base(debuggerService, CallstackStore.ColumnTypes)
        {
            this.remoteStore = debuggerService.CallstackStore;

            AddImageColumn(String.Empty, CallstackStore.ColumnSelected);
            AddTextColumn("#", CallstackStore.ColumnLevel);
            AddTextColumn("Address", CallstackStore.ColumnAddress);
            AddTextColumn("Method name", CallstackStore.ColumnName);
            AddTextColumn("Source file", CallstackStore.ColumnSource);

            GtkTree.RowActivated += new RowActivatedHandler(RowActivated);
        }
示例#9
0
		public CallstackPad(DebuggerService debuggerService): base(debuggerService, CallstackStore.ColumnTypes)
		{
			this.remoteStore = debuggerService.CallstackStore;
			
			AddImageColumn(String.Empty, CallstackStore.ColumnSelected);
			AddTextColumn("#", CallstackStore.ColumnLevel);
			AddTextColumn("Address", CallstackStore.ColumnAddress);
			AddTextColumn("Method name", CallstackStore.ColumnName);
			AddTextColumn("Source file", CallstackStore.ColumnSource);
			
			GtkTree.RowActivated += new RowActivatedHandler(RowActivated);
		}
示例#10
0
        public LocalsPad(DebuggerService debuggerService) : base(debuggerService, LocalsStore.ColumnTypes)
        {
            this.remoteStore = debuggerService.LocalsStore;

            AddImageTextColumn("Name", LocalsStore.ColumnImage, LocalsStore.ColumnName);
            AddTextColumn("Value", LocalsStore.ColumnValue);
            AddTextColumn("Type", LocalsStore.ColumnType);

            GtkTree.RowExpanded     += new RowExpandedHandler(RowExpanded);
            GtkTree.TestCollapseRow += new TestCollapseRowHandler(TestCollapseRow);
            GtkTree.TestExpandRow   += new TestExpandRowHandler(TestExpandRow);
        }
示例#11
0
		public static string StartServer(int port, string[] args)
		{
			TcpServerChannel channel = new TcpServerChannel(port);
			ChannelServices.RegisterChannel(channel);
			string uri = channel.GetChannelUri() + "/DebuggerService";
			
			DebuggerService debuggerService = new DebuggerService(args);
			RemotingServices.Marshal(debuggerService, "DebuggerService");
			
			Console.WriteLine("Listening at " + uri);
			
			return uri;
		}
示例#12
0
		public BreakpointsPad(DebuggerService debuggerService): base(debuggerService, BreakpointsStore.ColumnTypes)
		{
			this.remoteStore = debuggerService.BreakpointsStore;
			
			AddImageColumn(String.Empty, BreakpointsStore.ColumnImage);
			AddTextColumn("ID", BreakpointsStore.ColumnID);
			AddTextColumn("Enabled", BreakpointsStore.ColumnEnabled);
			AddTextColumn("Activated", BreakpointsStore.ColumnActivated);
			AddTextColumn("Thread group", BreakpointsStore.ColumnThreadGroup);
			AddTextColumn("Location", BreakpointsStore.ColumnName);
			
			this.GtkTree.RowActivated += new RowActivatedHandler(RowActivated);
		}
示例#13
0
        public BreakpointsPad(DebuggerService debuggerService) : base(debuggerService, BreakpointsStore.ColumnTypes)
        {
            this.remoteStore = debuggerService.BreakpointsStore;

            AddImageColumn(String.Empty, BreakpointsStore.ColumnImage);
            AddTextColumn("ID", BreakpointsStore.ColumnID);
            AddTextColumn("Enabled", BreakpointsStore.ColumnEnabled);
            AddTextColumn("Activated", BreakpointsStore.ColumnActivated);
            AddTextColumn("Thread group", BreakpointsStore.ColumnThreadGroup);
            AddTextColumn("Location", BreakpointsStore.ColumnName);

            this.GtkTree.RowActivated += new RowActivatedHandler(RowActivated);
        }
示例#14
0
		public ThreadPad(DebuggerService debuggerService): base(debuggerService, ThreadsStore.ColumnTypes)
		{
			this.remoteStore = debuggerService.ThreadsStore;
			
			AddImageColumn(String.Empty, ThreadsStore.ColumnSelected);
			AddTextColumn("ID", ThreadsStore.ColumnID);
			AddTextColumn("PID", ThreadsStore.ColumnPID);
			AddTextColumn("TID", ThreadsStore.ColumnTID);
			AddTextColumn("Name", ThreadsStore.ColumnName);
			AddTextColumn("State", ThreadsStore.ColumnState);
			AddTextColumn("Current Location", ThreadsStore.ColumnLocation);
			
			GtkTree.RowActivated += new RowActivatedHandler(RowActivated);
		}
示例#15
0
        public ThreadPad(DebuggerService debuggerService) : base(debuggerService, ThreadsStore.ColumnTypes)
        {
            this.remoteStore = debuggerService.ThreadsStore;

            AddImageColumn(String.Empty, ThreadsStore.ColumnSelected);
            AddTextColumn("ID", ThreadsStore.ColumnID);
            AddTextColumn("PID", ThreadsStore.ColumnPID);
            AddTextColumn("TID", ThreadsStore.ColumnTID);
            AddTextColumn("Name", ThreadsStore.ColumnName);
            AddTextColumn("State", ThreadsStore.ColumnState);
            AddTextColumn("Current Location", ThreadsStore.ColumnLocation);

            GtkTree.RowActivated += new RowActivatedHandler(RowActivated);
        }
示例#16
0
        public static string StartServer(int port, string[] args)
        {
            TcpServerChannel channel = new TcpServerChannel(port);

            ChannelServices.RegisterChannel(channel);
            string uri = channel.GetChannelUri() + "/DebuggerService";

            DebuggerService debuggerService = new DebuggerService(args);

            RemotingServices.Marshal(debuggerService, "DebuggerService");

            Console.WriteLine("Listening at " + uri);

            return(uri);
        }
示例#17
0
        public DebuggerPad(DebuggerService debuggerService, Type[] columnTypes)
        {
            this.debuggerService = debuggerService;
            this.gtkStore        = new Gtk.TreeStore(columnTypes);
            this.gtkTree         = new Gtk.TreeView(gtkStore);

            this.ShadowType        = ShadowType.In;
            gtkTree.RulesHint      = true;
            gtkTree.HeadersVisible = true;

            Add(gtkTree);
            ShowAll();

            // Regularly update the GUI
            GLib.Timeout.Add(50, ReceiveUpdatesTimer);
        }
示例#18
0
		public DebuggerPad(DebuggerService debuggerService, Type[] columnTypes)
		{
			this.debuggerService = debuggerService;
			this.gtkStore = new Gtk.TreeStore(columnTypes);
			this.gtkTree = new Gtk.TreeView(gtkStore);
			
			this.ShadowType = ShadowType.In;
			gtkTree.RulesHint = true;
			gtkTree.HeadersVisible = true;
			
			Add(gtkTree);
			ShowAll();
			
			// Regularly update the GUI
			GLib.Timeout.Add(50, ReceiveUpdatesTimer);
		}
示例#19
0
        public MdbConsolePad(DebuggerService debuggerService)
        {
            this.debuggerService = debuggerService;

            scrolledWindow = new ScrolledWindow();
            consoleOut     = new TextView();
            consoleIn      = new Entry();

            consoleIn.Activated += OnConsoleIn_activate;
            scrolledWindow.Add(consoleOut);

            this.Homogeneous = false;
            this.PackStart(scrolledWindow, true, true, 0);
            this.PackStart(consoleIn, false, false, 0);

            this.ShowAll();

            // Regularly update the GUI
            GLib.Timeout.Add(50, ReceiveUpdates);
        }
示例#20
0
		public MdbConsolePad(DebuggerService debuggerService)
		{
			this.debuggerService = debuggerService;
			
			scrolledWindow = new ScrolledWindow();
			consoleOut = new TextView();
			consoleIn = new Entry();
			
			consoleIn.Activated += OnConsoleIn_activate;
			scrolledWindow.Add(consoleOut);
			
			this.Homogeneous = false;
			this.PackStart(scrolledWindow, true, true, 0);
			this.PackStart(consoleIn, false, false, 0);
			
			this.ShowAll();
			
			// Regularly update the GUI
			GLib.Timeout.Add(50, ReceiveUpdates);
		}
示例#21
0
 public CallstackStore(DebuggerService debuggerService, Interpreter interpreter)
 {
     this.debuggerService = debuggerService;
     this.interpreter     = interpreter;
 }
示例#22
0
		public CallstackStore(DebuggerService debuggerService, Interpreter interpreter)
		{
			this.debuggerService = debuggerService;
			this.interpreter = interpreter;
		}
示例#23
0
 public GuiInterpreter(DebuggerService debuggerService, bool is_interactive, DebuggerConfiguration config, DebuggerOptions options)
     : base(is_interactive, config, options)
 {
     this.debuggerService = debuggerService;
 }
示例#24
0
 public ThreadsStore(DebuggerService debuggerService, Interpreter interpreter)
 {
     this.debuggerService = debuggerService;
     this.interpreter     = interpreter;
 }
示例#25
0
		public ThreadsStore(DebuggerService debuggerService, Interpreter interpreter)
		{
			this.debuggerService = debuggerService;
			this.interpreter = interpreter;
		}
		public BreakpointsStore(DebuggerService debuggerService, Interpreter interpreter)
		{
			this.debuggerService = debuggerService;
			this.interpreter = interpreter;
		}
示例#27
0
 public BreakpointsStore(DebuggerService debuggerService, Interpreter interpreter)
 {
     this.debuggerService = debuggerService;
     this.interpreter     = interpreter;
 }
示例#28
0
		public GuiInterpreter(DebuggerService debuggerService, bool is_interactive, DebuggerConfiguration config, DebuggerOptions options)
			:base(is_interactive, config, options)
		{
			this.debuggerService = debuggerService;
		}
示例#29
0
		public MdbGui(DebuggerService debuggerService) 
		{
			this.debuggerService = debuggerService;
			
			Application.Init();
			GuiInit();
			Application.Run();
		}