Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 5 commits
  • 6 files changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 27, 2012
@giselher Add dedicated record button 1798a0c
@giselher Fix merge conflict
Signed-off-by: Alexander Preisinger <alexander.preisinger@gmail.com>
faaee50
Commits on Mar 28, 2012
@giselher helpers/gdbconnector.py: Fix merge conflict e12b0d3
@giselher debugController: Rename record to toggle_record
Signed-off-by: Alexander Preisinger <alexander.preisinger@gmail.com>
f75156d
@rainerf rainerf Merge pull request #12 from giselher/reverse-debug
Reverse debug
2c8bcda
View
15 src/controllers/debugcontroller.py
@@ -32,6 +32,9 @@
class DebugController(QObject):
def __init__(self, distributedObjects):
QObject.__init__(self)
+
+ self.isRecording = False
+
self.settings = QSettings("fh-hagenberg", "SysCDbg")
self.ptyhandler = PtyHandler()
@@ -71,11 +74,17 @@ def openExecutable(self, filename):
def run(self):
self.connector.setTty(self.ptyhandler.ptyname)
self.connector.run()
- # FIXME: Add check or option in settings menu
- self.connector.record()
self.lastCmdWasStep = False
self.signalProxy.emitRunClicked()
+ def toggle_record(self):
+ if not self.isRecording:
+ self.connector.record_start()
+ self.isRecording = True
+ else:
+ self.connector.record_stop()
+ self.isRecording = False
+
def next_(self):
self.connector.next_()
self.lastCmdWasStep = True
@@ -139,8 +148,6 @@ def handleStoppedRecord(self, rec):
signal_name = r.src
if r.dest == 'signal-meaning':
signal_meaning = r.src
- if r.dest == 'frame':
- frame = r.src
if r.dest == "bkptno":
bkptno = int(r.src)
View
13 src/helpers/actions.py
@@ -58,10 +58,10 @@ def commit(self):
class Actions(QtCore.QObject):
- NumActions = 20
+ NumActions = 21
Open, Exit, SaveFile, \
Run, Continue, ReverseContinue, Interrupt, Next, ReverseNext, \
- Step, ReverseStep, Finish, RunToCursor, \
+ Step, ReverseStep, Finish, RunToCursor, Record, \
ToggleBreak, ToggleTrace, AddTraceVar, DelTraveVar, \
AddWatch, AddVarToDataGraph, DelWatch = range(NumActions)
@@ -117,12 +117,15 @@ def initGlobalActions(self):
#next
self.createAction(":/icons/images/next.png", "Next", "F10", \
"Execute next line", self.Next)
- #previous
- self.createAction(":/icons/images/rnext.png", "Reverse Next", None, \
- "Execute previous line", self.ReverseNext)
#step
self.createAction(":/icons/images/step.png", "Step", "F11", \
"Next Step", self.Step)
+ #record
+ self.createAction(":/icons/images/record.png", "Record", None, \
+ "Record gdb executions", self.Record)
+ #previous
+ self.createAction(":/icons/images/rnext.png", "Reverse Next", None, \
+ "Execute previous line", self.ReverseNext)
#reverse step
self.createAction(":/icons/images/rstep.png", "Reverse Step", None, \
"Previous Step", self.ReverseStep)
View
12 src/helpers/gdbconnector.py
@@ -178,8 +178,8 @@ def run(self):
return self.executeAndRaiseIfFailed("-exec-run", \
"Could not run the program.")
- def record(self):
- """Record
+ def record_start(self):
+ """Start recording
Records the call stack and gdb executions for reverse debugging
"""
@@ -187,6 +187,14 @@ def record(self):
return self.executeAndRaiseIfFailed("-interpreter-exec console rec", \
"Could not record the process.")
+ def record_stop(self):
+ """Stop recording
+ """
+ # FIXME: find the real mi command!
+ return self.executeAndRaiseIfFailed(\
+ "-interpreter-exec console \"record stop\"", \
+ "Could not record the process.")
+
def next_(self):
return self.executeAndRaiseIfFailed("-exec-next")
View
BIN  src/images/record.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
1  src/resources.qrc
@@ -18,6 +18,7 @@
<file>images/finish.png</file>
<file>images/until.png</file>
<file>images/continue.png</file>
+ <file>images/record.png</file>
<file>images/next.png</file>
<file>images/rnext.png</file>
<file>images/step.png</file>
View
7 src/views/mainwindow.py
@@ -137,6 +137,7 @@ def __initActions(self):
self.ui.Main.addAction(self.act.actions[Actions.Interrupt])
self.ui.Main.addAction(self.act.actions[Actions.Next])
self.ui.Main.addAction(self.act.actions[Actions.Step])
+ self.ui.Main.addAction(self.act.actions[Actions.Record])
self.ui.Main.addAction(self.act.actions[Actions.ReverseNext])
self.ui.Main.addAction(self.act.actions[Actions.ReverseStep])
self.ui.Main.addAction(self.act.actions[Actions.Finish])
@@ -160,10 +161,12 @@ def __connectActions(self):
self.debugController.run)
self.connect(self.act.actions[Actions.Next], SIGNAL('activated()'), \
self.debugController.next_)
- self.connect(self.act.actions[Actions.ReverseNext], \
- SIGNAL('activated()'), self.debugController.reverse_next)
self.connect(self.act.actions[Actions.Step], SIGNAL('activated()'), \
self.debugController.step)
+ self.connect(self.act.actions[Actions.Record], SIGNAL('activated()'), \
+ self.debugController.toggle_record)
+ self.connect(self.act.actions[Actions.ReverseNext], \
+ SIGNAL('activated()'), self.debugController.reverse_next)
self.connect(self.act.actions[Actions.ReverseStep], \
SIGNAL('activated()'), self.debugController.reverse_step)
self.connect(self.act.actions[Actions.Continue], SIGNAL('activated()'),\

No commit comments for this range

Something went wrong with that request. Please try again.