X-Git-Url: https://git.sthu.org/?p=pygdb.git;a=blobdiff_plain;f=DbgTerminal.py;h=8cdc932abfbeda71402a10a1d0ddd985582e9e75;hp=605c2b79612823a92f4955f935517737b142f856;hb=cfcc39662a53b6f7a77c7ec8f05478227c5f137f;hpb=d5dc6369fca636f78c76f0f95aefb9817289e27f diff --git a/DbgTerminal.py b/DbgTerminal.py index 605c2b7..8cdc932 100644 --- a/DbgTerminal.py +++ b/DbgTerminal.py @@ -29,20 +29,23 @@ class DbgTerminal (vte.Terminal): #Start debugger self.clientCmd = clientCmd - self.fork_command( self.getCommand(), self.getArgv()) - #Open pseudo-terminal where to-be-debugged process reads/writes to self.client_ptymaster, self.client_ptyslave = pty.openpty() - self.setPty(self.client_ptyslave) #Set up terminal window and initialize debugger self.connect("cursor-moved", self.contents_changed) self.connect("child-exited", lambda *w: gtk.main_quit()) + #font description fontdesc = pango.FontDescription("monospace 9") self.set_font(fontdesc) + def initialize(self): + #Launch debugger + self.fork_command( self.getCommand(), self.getArgv()) + self.setPty(self.client_ptyslave) + def contents_changed(self, term): c,r = term.get_cursor_position() @@ -134,15 +137,6 @@ class DbgTerminal (vte.Terminal): def isActive(self): return self.isactive - def getLastLine(self): - if len(self.history) == 0: - return None - - return self.history[-1] - - def feed_dbg(self, text): - self.feed_child(text) - @@ -184,17 +178,3 @@ class DbgWindow (gtk.Window): - -def launchDebugger(wnd, term): - - wnd.toggleClientIOWindow() - - term.setBreakpoint("main.cpp", 15) - term.setRun() - res = term.getExpression("a") - print "Result = ", res - - term.setQuit() - - -