DebugClients/Python3/DebugBase.py

changeset 2620
a3be952f2ae4
parent 2486
e16c9ced6ae5
child 2622
08cc2f31c983
diff -r 5719edfddb4c -r a3be952f2ae4 DebugClients/Python3/DebugBase.py
--- a/DebugClients/Python3/DebugBase.py	Wed Apr 24 19:14:22 2013 +0200
+++ b/DebugClients/Python3/DebugBase.py	Thu Apr 25 19:52:40 2013 +0200
@@ -539,13 +539,21 @@
         stack = []
         while fr is not None:
             fname = self._dbgClient.absPath(self.fix_frame_filename(fr))
-            fline = fr.f_lineno
-            ffunc = fr.f_code.co_name
-            
-            if ffunc == '?':
-                ffunc = ''
-            
-            stack.append([fname, fline, ffunc])
+            if not fname.startswith("<"):
+                fline = fr.f_lineno
+                ffunc = fr.f_code.co_name
+                
+                if ffunc == '?':
+                    ffunc = ''
+                
+                if ffunc and not ffunc.startswith("<"):
+                    argInfo = inspect.getargvalues(fr)
+                    fargs = inspect.formatargvalues(argInfo.args, argInfo.varargs,
+                                                    argInfo.keywords, argInfo.locals)
+                else:
+                    fargs = ""
+                
+                stack.append([fname, fline, ffunc, fargs])
             
             if fr == self._dbgClient.mainFrame:
                 fr = None
@@ -588,13 +596,21 @@
             # return from dispatch_call
             fr.f_trace = self.trace_dispatch
             fname = self._dbgClient.absPath(self.fix_frame_filename(fr))
-            fline = fr.f_lineno
-            ffunc = fr.f_code.co_name
-            
-            if ffunc == '?':
-                ffunc = ''
-            
-            stack.append([fname, fline, ffunc])
+            if not fname.startswith("<"):
+                fline = fr.f_lineno
+                ffunc = fr.f_code.co_name
+                
+                if ffunc == '?':
+                    ffunc = ''
+                
+                if ffunc and not ffunc.startswith("<"):
+                    argInfo = inspect.getargvalues(fr)
+                    fargs = inspect.formatargvalues(argInfo.args, argInfo.varargs,
+                                                    argInfo.keywords, argInfo.locals)
+                else:
+                    fargs = ""
+                
+                stack.append([fname, fline, ffunc, fargs])
             
             if fr == self._dbgClient.mainFrame:
                 fr = None

eric ide

mercurial