Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'windows' of github.com:giselher/ricodebug into windows

  • Loading branch information...
commit 91e78ad69091339e7a77cfa34b10eb456a7303bf 2 parents 97a02ed + a1b4d44
@giselher authored
View
9 src/controllers/debugcontroller.py
@@ -36,7 +36,7 @@ def __init__(self, distributedObjects):
self.isRecording = False
self.settings = QSettings("fh-hagenberg", "SysCDbg")
- self.ptyhandler = TtyHandler()
+ self.ttyhandler = TtyHandler()
self.distributedObjects = distributedObjects
@@ -48,10 +48,10 @@ def __init__(self, distributedObjects):
self.executableName = None
self.lastCmdWasStep = False
- self.ptyhandler.start()
self.connector.start()
- QObject.connect(self.connector.reader, SIGNAL('asyncRecordReceived(PyQt_PyObject)'), self.handleAsyncRecord, Qt.QueuedConnection)
+ QObject.connect(self.connector.reader, SIGNAL('asyncRecordReceived(PyQt_PyObject)'),
+ self.handleAsyncRecord, Qt.QueuedConnection)
def openExecutable(self, filename):
# die if the file does not exist or has been provided without at least a
@@ -72,8 +72,9 @@ def openExecutable(self, filename):
self.executableName = filename
def run(self):
- self.connector.setTty(self.ptyhandler.ptyname)
+ self.connector.setTty(self.ttyhandler.ptyname)
self.connector.run()
+ self.ttyhandler.start()
self.lastCmdWasStep = False
self.signalProxy.emitRunClicked()
View
20 src/helpers/pipehandler.py
@@ -30,7 +30,7 @@
class PipeHandler(QThread):
def __init__(self, parent=None):
- QThread.__init__(self, parent)
+ QThread.__init__(self, parent)
self.max_bytes = 2048
self.stop = False
self.ptyname = "//./pipe/gdb"
@@ -38,25 +38,23 @@ def __init__(self, parent=None):
PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, \
PIPE_UNLIMITED_INSTANCES, self.max_bytes,\
self.max_bytes, NMPWAIT_WAIT_FOREVER, None)
-
+
if self.handle == INVALID_HANDLE_VALUE:
print 'Failed to create named pipe!'
- print 'Exiting...'
-
+ print 'Exiting...'
def run(self):
+ # ConnectNamedPipe(self.handle)
self.listener()
def listener(self):
while not self.stop:
- time.sleep(1)
- #if PeekNamedPipe(self.handle, 0)[1]:
+ if PeekNamedPipe(self.handle, 0)[1]:
# windows doesn't seperate the output into "write events",
- # so we don't have to care about merging it
- #ret = ReadFile(self.handle, self.max_bytes)[1]
- ret = "Test"
- self.emit(SIGNAL('dataAvailable(QString)'), ret)
-
+ # so we don't have to care about merging
+ ret = ReadFile(self.handle, 0)[1]
+ self.emit(SIGNAL('dataAvailable(QString)'), ret)
+
def write(self, s):
WriteFile(self.handle, s)
View
2  src/views/inferiorioview.py
@@ -30,7 +30,7 @@ class InferiorIoView(QTextEdit):
def __init__(self, debug_controller, parent=None):
QTextEdit.__init__(self, parent)
- self.connect(debug_controller.ptyhandler,
+ self.connect(debug_controller.ttyhandler,
SIGNAL('dataAvailable(QString)'), self.outputInferiorData)
def outputInferiorData(self, data):
Please sign in to comment.
Something went wrong with that request. Please try again.