File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,13 @@ What's New in Stackless 3.X.X?
99
1010*Release date: 20XX-XX-XX*
1111
12+ - https://bitbucket.org/stackless-dev/stackless/issues/101
13+ Enhance Tools/gdb/libpython.py to support debugging Stackless Python.
14+ You can now debug Stackless Python with gdb. Unfortunately gdb still
15+ does not know about inactive tasklets and their frames.
16+
1217- https://bitbucket.org/stackless-dev/stackless/issues/99
13- On UNIX like systems you can use the command
18+ On UNIX like systems you can use the command
1419 $ make teststackless
1520 to run the Stackless unit tests. Previously the command required some non
1621 POSIX commands.
Original file line number Diff line number Diff line change 8686
8787ENCODING = locale .getpreferredencoding ()
8888
89+ # name of the evalframeex function. It CPython and Stackless Python
90+ # use different names
91+ EVALFRAMEEX_FUNCTION_NAME = None
92+
8993class NullPyObjectPtr (RuntimeError ):
9094 pass
9195
@@ -1426,7 +1430,17 @@ def is_python_frame(self):
14261430
14271431 def is_evalframeex (self ):
14281432 '''Is this a PyEval_EvalFrameEx frame?'''
1429- if self ._gdbframe .name () == 'PyEval_EvalFrameEx' :
1433+ global EVALFRAMEEX_FUNCTION_NAME
1434+ if EVALFRAMEEX_FUNCTION_NAME is None :
1435+ try :
1436+ gdb .lookup_type ("PyCFrameObject" )
1437+ # it is Stackless Python
1438+ EVALFRAMEEX_FUNCTION_NAME = 'PyEval_EvalFrame_value'
1439+ except gdb .error :
1440+ # regular CPython
1441+ EVALFRAMEEX_FUNCTION_NAME = 'PyEval_EvalFrameEx'
1442+
1443+ if self ._gdbframe .name () == EVALFRAMEEX_FUNCTION_NAME :
14301444 '''
14311445 I believe we also need to filter on the inline
14321446 struct frame_id.inline_depth, only regarding frames with
You can’t perform that action at this time.
0 commit comments