projects
/
pygdb.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moved path-pruning to debugger
[pygdb.git]
/
DbgTerminal.py
diff --git
a/DbgTerminal.py
b/DbgTerminal.py
index 89659d035628a9fe7a450bffc9e603ff905eceb7..8beec4652f97750b6a553710185b6c92b5295e37 100644
(file)
--- a/
DbgTerminal.py
+++ b/
DbgTerminal.py
@@
-5,6
+5,7
@@
__author__ = "shuber"
import gtk
import gtk
+import os
import pango
import pty
import string
import pango
import pty
import string
@@
-18,15
+19,16
@@
import ClientIOTerminal
class DbgTerminal (vte.Terminal):
class DbgTerminal (vte.Terminal):
- isactive = True
- lastrow = 0
- history = []
-
-
def __init__(self, clientCmd):
vte.Terminal.__init__(self)
def __init__(self, clientCmd):
vte.Terminal.__init__(self)
+ #Set members
+ self.childpid = None
+ self.history = []
+ self.lastrow = 0
+ self.isactive = True
+
#Start debugger
self.clientCmd = clientCmd
#Open pseudo-terminal where to-be-debugged process reads/writes to
#Start debugger
self.clientCmd = clientCmd
#Open pseudo-terminal where to-be-debugged process reads/writes to
@@
-42,10
+44,18
@@
class DbgTerminal (vte.Terminal):
def initialize(self):
def initialize(self):
- self.fork_command( self.getCommand(), self.getArgv())
+ self.
childpid = self.
fork_command( self.getCommand(), self.getArgv())
self.setPty(self.client_ptyslave)
self.waitForActivation()
self.setPty(self.client_ptyslave)
self.waitForActivation()
+ def stopDbg(self):
+
+ if self.childpid != None:
+ #9=KILL, 15=TERM
+ os.kill(self.childpid, 15);
+ self.childpid = None
+
+
def contents_changed(self, term):
c,r = term.get_cursor_position()
def contents_changed(self, term):
c,r = term.get_cursor_position()