self.watches = []
self.ints = []
self.currfile, self.currlineno = None, 0
+ self.command = None
def load(self, filename):
self.parseInt(tail)
elif cmd == "currpos":
self.parseCurrpos(tail)
+ elif cmd == "cmd":
+ self.parseCommand(tail)
else:
cnt -= 1
print "Unkown command", cmd
if self.isCurrposSet():
self.__writeCurrpos(f)
+ if self.getCommand() != None:
+ self.__writeCommand(f)
+
f.close()
return True
self.setCurrpos(file, lineno)
+ def parseCommand(self, tail):
+ self.command = tail
+
def __writeBreak(self, f, b):
if b["cond"] != None:
def __writeCurrpos(self, f):
f.write("currpos %s:%d\n" % (self.currfile, self.currlineno))
+ def __writeCommand(self, f):
+ f.write("cmd %s\n" % self.command)
+
def addBreak(self, file, lineno, cond=None):
bp = {"file" : file, "lineno" : lineno, "cond" : cond}
def isCurrposSet(self):
return self.currfile!=None
+
def delCurrpos(self):
self.currfile = None
+ def setCommand(self,cmd):
+ self.command = cmd
+
+ def getCommand(self):
+ return self.command
def findInt(self, name):
for i in self.ints:
conf.addInt("statuswnd-paned1", self.paned1.get_position())
conf.addInt("statuswnd-paned2", self.paned2.get_position())
+ conf.setCommand( self.debugger.clientCmd )
+
for f in self.frames:
f.fillConfiguration(conf)
global clientcmd, gdbBps, cmdset
-
-
#Load configuration
conf = Configuration.Configuration()
conf.load(".pygdb.conf")
for bp in conf.breakpoints:
bp["file"] = toAbsPath( bp["file"] )
addBreakpoint(bp["file"], bp["lineno"], bp["cond"])
+
+ #Set the command from config
+ if conf.getCommand() != None:
+ clientcmd = conf.getCommand()
#Set current execution line
if conf.isCurrposSet():