+ if clientcmd == None:
+ clientcmd = ""
+ clientcmd = clientcmd.strip()
+
+ cmdset = True
+
+ #Get the dirs where executeable is in
+ relcmd = string.split(clientcmd)[0]
+ abscmd = DbgTerminal.relToAbsPath(getCurrentFile(), relcmd)
+ path = DbgTerminal.relToAbsPath(abscmd, path)
+
+ assert(path[0] == "/")
+
+ return path
+
+
+def gdbLoadConfig():
+ global clientcmd, gdbBps, cmdset
+
+
+ #Load configuration
+ conf = Configuration.Configuration()
+ conf.load(".pygdb.conf")
+
+ #Remove all breakpoints
+ while len(gdbBps)>0:
+ removeBreakpoint(0)
+
+ #Add breakpoints from configuration
+ 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():
+ file = toAbsPath(conf.currfile)
+ setExecutionLine(file, conf.currlineno)
+ else:
+ delExecutionLine()
+
+>>
+
+highlight ExecutionLine term=bold ctermbg=DarkGreen ctermfg=Black guibg=LightGreen guifg=Black
+highlight BreakPoint term=inverse ctermbg=DarkRed ctermfg=Black guibg=LightRed guifg=Black