Exemplo n.º 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();
        }
Exemplo n.º 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);
     }
 }
Exemplo n.º 3
0
		public LocalsStore(DebuggerService debuggerService, Interpreter interpreter)
		{
			this.debuggerService = debuggerService;
			this.interpreter = interpreter;
			this.rootVariable = new LocalVariablesRoot(interpreter);
			this.RootNode.SetValue(ColumnUpdateChilds, true);
		}
Exemplo n.º 4
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();
		}
Exemplo n.º 5
0
 public LocalsStore(DebuggerService debuggerService, Interpreter interpreter)
 {
     this.debuggerService = debuggerService;
     this.interpreter     = interpreter;
     this.rootVariable    = new LocalVariablesRoot(interpreter);
     this.RootNode.SetValue(ColumnUpdateChilds, true);
 }
Exemplo n.º 6
0
        public MdbGui(DebuggerService debuggerService)
        {
            this.debuggerService = debuggerService;

            Application.Init();
            GuiInit();
            Application.Run();
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
		}
Exemplo n.º 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);
        }
Exemplo n.º 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;
		}
Exemplo n.º 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);
		}
Exemplo n.º 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);
        }
Exemplo n.º 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);
		}
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
		}
Exemplo n.º 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);
        }
Exemplo n.º 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);
		}
Exemplo n.º 21
0
 public CallstackStore(DebuggerService debuggerService, Interpreter interpreter)
 {
     this.debuggerService = debuggerService;
     this.interpreter     = interpreter;
 }
Exemplo n.º 22
0
		public CallstackStore(DebuggerService debuggerService, Interpreter interpreter)
		{
			this.debuggerService = debuggerService;
			this.interpreter = interpreter;
		}
Exemplo n.º 23
0
 public GuiInterpreter(DebuggerService debuggerService, bool is_interactive, DebuggerConfiguration config, DebuggerOptions options)
     : base(is_interactive, config, options)
 {
     this.debuggerService = debuggerService;
 }
Exemplo n.º 24
0
 public ThreadsStore(DebuggerService debuggerService, Interpreter interpreter)
 {
     this.debuggerService = debuggerService;
     this.interpreter     = interpreter;
 }
Exemplo n.º 25
0
		public ThreadsStore(DebuggerService debuggerService, Interpreter interpreter)
		{
			this.debuggerService = debuggerService;
			this.interpreter = interpreter;
		}
Exemplo n.º 26
0
		public BreakpointsStore(DebuggerService debuggerService, Interpreter interpreter)
		{
			this.debuggerService = debuggerService;
			this.interpreter = interpreter;
		}
Exemplo n.º 27
0
 public BreakpointsStore(DebuggerService debuggerService, Interpreter interpreter)
 {
     this.debuggerService = debuggerService;
     this.interpreter     = interpreter;
 }
Exemplo n.º 28
0
		public GuiInterpreter(DebuggerService debuggerService, bool is_interactive, DebuggerConfiguration config, DebuggerOptions options)
			:base(is_interactive, config, options)
		{
			this.debuggerService = debuggerService;
		}
Exemplo n.º 29
0
		public MdbGui(DebuggerService debuggerService) 
		{
			this.debuggerService = debuggerService;
			
			Application.Init();
			GuiInit();
			Application.Run();
		}