- self.ptymaster, self.ptyslave = pty.openpty()
- self.childout = os.fdopen(self.ptymaster, "r", 0)
- self.childin = os.fdopen(self.ptymaster, "w", 0)
-
- #Call gdb and get in- and out-streams to/from gdb
- cmd = self.getCommand(self.binary)
- self.gdbin, self.gdbout = os.popen4( cmd, bufsize=0)
-
- #Set up a reading thread to gdb output
- self.gdbReadThread = self.ReadThread(self.gdbout, gdbCb)
- self.gdbReadThread.start()
-
- #Set up a reading thread to childs output
- self.childReadThread = self.ReadThread(self.childout, self.childReadCallback)
- self.childReadThread.start()
-
- #Set up tty gdb-childs process
- self.sendSetTTY(os.ttyname(self.ptyslave))