diff -r 9986ec0e559a -r 10516539f238 Debugger/DebuggerInterfaceRuby.py --- a/Debugger/DebuggerInterfaceRuby.py Tue Oct 15 22:03:54 2013 +0200 +++ b/Debugger/DebuggerInterfaceRuby.py Fri Oct 18 23:00:41 2013 +0200 @@ -69,7 +69,8 @@ # set default values for capabilities of clients self.clientCapabilities = ClientDefaultCapabilities - self.codec = QTextCodec.codecForName(str(Preferences.getSystem("StringEncoding"))) + self.codec = QTextCodec.codecForName( + str(Preferences.getSystem("StringEncoding"))) if passive: # set translation function @@ -113,7 +114,8 @@ @param program name of the executable to start (string) @param arguments arguments to be passed to the program (list of string) - @param environment dictionary of environment settings to pass (dict of string) + @param environment dictionary of environment settings to pass + (dict of string) @return the process object (QProcess) or None """ proc = QProcess() @@ -165,7 +167,8 @@ E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8( - """<p>The debugger backend could not be started.</p>""")) + """<p>The debugger backend could not be""" + """ started.</p>""")) # set translation function if Preferences.getDebugger("PathTranslation"): @@ -210,7 +213,8 @@ E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8( - """<p>The debugger backend could not be started.</p>""")) + """<p>The debugger backend could not be""" + """ started.</p>""")) return process, self.__isNetworked process = self.__startProcess(interpreter, @@ -219,7 +223,8 @@ if process is None: E5MessageBox.critical(None, self.trUtf8("Start Debugger"), - self.trUtf8("""<p>The debugger backend could not be started.</p>""")) + self.trUtf8( + """<p>The debugger backend could not be started.</p>""")) return process, self.__isNetworked def startRemoteForProject(self, port, runInConsole): @@ -258,11 +263,14 @@ E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8( - """<p>The debugger backend could not be started.</p>""")) + """<p>The debugger backend could not be""" + """ started.</p>""")) # set translation function if project.getDebugProperty("PATHTRANSLATION"): - self.translateRemote = project.getDebugProperty("REMOTEPATH") - self.translateLocal = project.getDebugProperty("LOCALPATH") + self.translateRemote = \ + project.getDebugProperty("REMOTEPATH") + self.translateLocal = \ + project.getDebugProperty("LOCALPATH") self.translate = self.__remoteTranslation else: self.translate = self.__identityTranslation @@ -301,7 +309,8 @@ E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8( - """<p>The debugger backend could not be started.</p>""")) + """<p>The debugger backend could not be""" + """ started.</p>""")) return process, self.__isNetworked process = self.__startProcess(interpreter, @@ -310,7 +319,8 @@ if process is None: E5MessageBox.critical(None, self.trUtf8("Start Debugger"), - self.trUtf8("""<p>The debugger backend could not be started.</p>""")) + self.trUtf8( + """<p>The debugger backend could not be started.</p>""")) return process, self.__isNetworked def getClientCapabilities(self): @@ -390,21 +400,23 @@ @param env environment settings (dictionary) """ - self.__sendCommand('{0}{1}\n'.format(DebugProtocol.RequestEnv, str(env))) + self.__sendCommand('{0}{1}\n'.format( + DebugProtocol.RequestEnv, str(env))) - def remoteLoad(self, fn, argv, wd, traceInterpreter=False, autoContinue=True, - autoFork=False, forkChild=False): + def remoteLoad(self, fn, argv, wd, traceInterpreter=False, + autoContinue=True, autoFork=False, forkChild=False): """ Public method to load a new program to debug. @param fn the filename to debug (string) @param argv the commandline arguments to pass to the program (string) @param wd the working directory for the program (string) - @keyparam traceInterpreter flag indicating if the interpreter library should be - traced as well (boolean) - @keyparam autoContinue flag indicating, that the debugger should not stop - at the first executable line (boolean) - @keyparam autoFork flag indicating the automatic fork mode (boolean) (ignored) + @keyparam traceInterpreter flag indicating if the interpreter library + should be traced as well (boolean) + @keyparam autoContinue flag indicating, that the debugger should not + stop at the first executable line (boolean) + @keyparam autoFork flag indicating the automatic fork mode (boolean) + (ignored) @keyparam forkChild flag indicating to debug the child after forking (boolean) (ignored) """ @@ -413,8 +425,9 @@ wd = self.translate(wd, False) fn = self.translate(os.path.abspath(fn), False) self.__sendCommand('{0}{1}|{2}|{3}|{4:d}\n'.format( - DebugProtocol.RequestLoad, wd, fn, str(Utilities.parseOptionString(argv)), - traceInterpreter)) + DebugProtocol.RequestLoad, wd, fn, + str(Utilities.parseOptionString(argv)), + traceInterpreter)) def remoteRun(self, fn, argv, wd, autoFork=False, forkChild=False): """ @@ -423,14 +436,16 @@ @param fn the filename to run (string) @param argv the commandline arguments to pass to the program (string) @param wd the working directory for the program (string) - @keyparam autoFork flag indicating the automatic fork mode (boolean) (ignored) + @keyparam autoFork flag indicating the automatic fork mode (boolean) + (ignored) @keyparam forkChild flag indicating to debug the child after forking (boolean) (ignored) """ wd = self.translate(wd, False) fn = self.translate(os.path.abspath(fn), False) self.__sendCommand('{0}{1}|{2}|{3}\n'.format( - DebugProtocol.RequestRun, wd, fn, str(Utilities.parseOptionString(argv)))) + DebugProtocol.RequestRun, wd, fn, + str(Utilities.parseOptionString(argv)))) def remoteCoverage(self, fn, argv, wd, erase=False): """ @@ -441,6 +456,8 @@ @param wd the working directory for the program (string) @keyparam erase flag indicating that coverage info should be cleared first (boolean) + @exception NotImplementedError raised to indicate that this interface + is not supported """ raise NotImplementedError("Interface not available.") @@ -451,7 +468,10 @@ @param fn the filename to run (string) @param argv the commandline arguments to pass to the program (string) @param wd the working directory for the program (string) - @keyparam erase flag indicating that timing info should be cleared first (boolean) + @keyparam erase flag indicating that timing info should be cleared + first (boolean) + @exception NotImplementedError raised to indicate that this interface + is not supported """ raise NotImplementedError("Interface not available.") @@ -495,7 +515,8 @@ @param special flag indicating a special continue operation (boolean) """ - self.__sendCommand('{0}{1:d}\n'.format(DebugProtocol.RequestContinue, special)) + self.__sendCommand('{0}{1:d}\n'.format( + DebugProtocol.RequestContinue, special)) def remoteBreakpoint(self, fn, line, set, cond=None, temp=False): """ @@ -509,7 +530,7 @@ """ fn = self.translate(fn, False) self.__sendCommand('{0}{1}@@{2:d}@@{3:d}@@{4:d}@@{5}\n'.format( - DebugProtocol.RequestBreak, fn, line, temp, set, cond)) + DebugProtocol.RequestBreak, fn, line, temp, set, cond)) def remoteBreakpointEnable(self, fn, line, enable): """ @@ -517,7 +538,8 @@ @param fn filename the breakpoint belongs to (string) @param line linenumber of the breakpoint (int) - @param enable flag indicating enabling or disabling a breakpoint (boolean) + @param enable flag indicating enabling or disabling a breakpoint + (boolean) """ fn = self.translate(fn, False) self.__sendCommand('{0}{1},{2:d},{3:d}\n'.format( @@ -540,7 +562,8 @@ Public method to set or clear a watch expression. @param cond expression of the watch expression (string) - @param set flag indicating setting or resetting a watch expression (boolean) + @param set flag indicating setting or resetting a watch expression + (boolean) @param temp flag indicating a temporary watch expression (boolean) """ # cond is combination of cond and special (s. watch expression viewer) @@ -552,7 +575,8 @@ Public method to enable or disable a watch expression. @param cond expression of the watch expression (string) - @param enable flag indicating enabling or disabling a watch expression (boolean) + @param enable flag indicating enabling or disabling a watch expression + (boolean) """ # cond is combination of cond and special (s. watch expression viewer) self.__sendCommand('{0}{1},{2:d}\n'.format( @@ -560,7 +584,8 @@ def remoteWatchpointIgnore(self, cond, count): """ - Public method to ignore a watch expression the next couple of occurrences. + Public method to ignore a watch expression the next couple of + occurrences. @param cond expression of the watch expression (string) @param count number of occurrences to ignore (int) @@ -612,7 +637,8 @@ @param framenr framenumber of the variables to retrieve (int) """ self.__sendCommand('{0}{1}, {2:d}, {3:d}, {4}\n'.format( - DebugProtocol.RequestVariable, str(var), framenr, scope, str(filter))) + DebugProtocol.RequestVariable, str(var), framenr, scope, + str(filter))) def remoteClientSetFilter(self, scope, filter): """ @@ -634,7 +660,8 @@ def remoteEval(self, arg): """ - Public method to evaluate arg in the current context of the debugged program. + Public method to evaluate arg in the current context of the debugged + program. @param arg the arguments to evaluate (string) """ @@ -642,7 +669,8 @@ def remoteExec(self, stmt): """ - Public method to execute stmt in the current context of the debugged program. + Public method to execute stmt in the current context of the debugged + program. @param stmt statement to execute (string) """ @@ -667,7 +695,8 @@ @param text the text to be completed (string) """ - self.__sendCommand("{0}{1}\n".format(DebugProtocol.RequestCompletion, text)) + self.__sendCommand("{0}{1}\n".format( + DebugProtocol.RequestCompletion, text)) def remoteUTPrepare(self, fn, tn, tfn, failed, cov, covname, coverase): """ @@ -677,23 +706,33 @@ @param tn the testname to load (string) @param tfn the test function name to load tests from (string) @param failed list of failed test, if only failed test should be run - (list of strings) - @param cov flag indicating collection of coverage data is requested (boolean) + (list of strings) + @param cov flag indicating collection of coverage data is requested + (boolean) @param covname filename to be used to assemble the coverage caches - filename (string) - @param coverase flag indicating erasure of coverage data is requested (boolean) + filename (string) + @param coverase flag indicating erasure of coverage data is requested + (boolean) + @exception NotImplementedError raised to indicate that this interface + is not supported """ raise NotImplementedError("Interface not available.") def remoteUTRun(self): """ Public method to start a unittest run. + + @exception NotImplementedError raised to indicate that this interface + is not supported """ raise NotImplementedError("Interface not available.") def remoteUTStop(self): """ - public method to stop a unittest run. + Public method to stop a unittest run. + + @exception NotImplementedError raised to indicate that this interface + is not supported """ raise NotImplementedError("Interface not available.") @@ -783,7 +822,8 @@ exctype = None excmessage = '' stack = [] - self.debugServer.signalClientException(exctype, excmessage, stack) + self.debugServer.signalClientException( + exctype, excmessage, stack) continue if resp == DebugProtocol.ResponseSyntax: @@ -798,7 +838,8 @@ fn = '' ln = 0 cn = 0 - self.debugServer.signalClientSyntaxError(message, fn, ln, cn) + self.debugServer.signalClientSyntaxError( + message, fn, ln, cn) continue if resp == DebugProtocol.ResponseExit: @@ -819,7 +860,8 @@ if resp == DebugProtocol.ResponseBanner: version, platform, dbgclient = eval(line[eoc:-1]) - self.debugServer.signalClientBanner(version, platform, dbgclient) + self.debugServer.signalClientBanner( + version, platform, dbgclient) continue if resp == DebugProtocol.ResponseCapabilities: