Debugger/DebuggerInterfacePython3.py

changeset 2170
f4e0f6133ace
parent 1509
c0b5e693b0eb
child 2302
f29e9405c851
--- a/Debugger/DebuggerInterfacePython3.py	Thu Nov 01 10:15:08 2012 +0100
+++ b/Debugger/DebuggerInterfacePython3.py	Thu Nov 01 15:31:06 2012 +0100
@@ -666,6 +666,18 @@
         self.__sendCommand('{0}{1:d}, "{2}"\n'.format(
             DebugProtocol.RequestSetFilter, scope, filter))
     
+    def setCallTraceEnabled(self, on):
+        """
+        Public method to set the call trace state.
+        
+        @param on flag indicating to enable the call trace function (boolean)
+        """
+        if on:
+            cmd = "on"
+        else:
+            cmd = "off"
+        self.__sendCommand('{0}{1}\n'.format(DebugProtocol.RequestCallTrace, cmd))
+    
     def remoteEval(self, arg):
         """
         Public method to evaluate arg in the current context of the debugged program.
@@ -800,6 +812,16 @@
                         self.debugServer.signalClientStack(stack)
                     continue
                 
+                if resp == DebugProtocol.CallTrace:
+                    event, fromStr, toStr = line[eoc:-1].split("@@")
+                    isCall = event.lower() == "c"
+                    fromFile, fromLineno, fromFunc = fromStr.rsplit(":", 2)
+                    toFile, toLineno, toFunc = toStr.rsplit(":", 2)
+                    self.debugServer.signalClientCallTrace(isCall,
+                        fromFile, fromLineno, fromFunc,
+                        toFile, toLineno, toFunc)
+                    continue
+                
                 if resp == DebugProtocol.ResponseThreadList:
                     currentId, threadList = eval(line[eoc:-1])
                     self.debugServer.signalClientThreadList(currentId, threadList)

eric ide

mercurial