Easier and fail save way to get the correct botframe at sys.breakpoint.

Tue, 25 Oct 2016 22:54:36 +0200

author
T.Rzepka <Tobias.Rzepka@gmail.com>
date
Tue, 25 Oct 2016 22:54:36 +0200
changeset 5274
a19743a4a8fa
parent 5273
be55746da9d1
child 5275
95e943b46fa6

Easier and fail save way to get the correct botframe at sys.breakpoint.

DebugClients/Python/DebugBase.py file | annotate | diff | comparison | revisions
--- a/DebugClients/Python/DebugBase.py	Tue Oct 25 22:50:59 2016 +0200
+++ b/DebugClients/Python/DebugBase.py	Tue Oct 25 22:54:36 2016 +0200
@@ -390,16 +390,13 @@
         
         if sys.version_info[0] == 2:
             stopOnHandleLine = self._dbgClient.handleLine.func_code
-            bootstrap = '__bootstrap'
         else:
             stopOnHandleLine = self._dbgClient.handleLine.__code__
-            bootstrap = 'bootstrap'
         
         frame.f_trace = self.trace_dispatch
-        while frame is not None:
-            # stop at erics debugger frame or the threading bootstrap
-            if (frame.f_back.f_code == stopOnHandleLine or
-                    frame.f_back.f_code.co_name == bootstrap):
+        while frame.f_back is not None:
+            # stop at erics debugger frame or a threading bootstrap
+            if (frame.f_back.f_code == stopOnHandleLine):
                 frame.f_trace = self.trace_dispatch
                 self.botframe = frame
                 break

eric ide

mercurial