diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-04-20 22:32:07 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-04-20 22:32:07 (GMT) |
commit | 50eb60e6bfedbdad2dda30fa5ce7fe3ce83f7748 (patch) | |
tree | ca7b3b8413f070180c6c4d40a4e65c00ff3f0df9 /Tools | |
parent | 5e2be8737dad3c7bdaf198d2637d9ef947b5f2f1 (diff) | |
download | cpython-50eb60e6bfedbdad2dda30fa5ce7fe3ce83f7748.zip cpython-50eb60e6bfedbdad2dda30fa5ce7fe3ce83f7748.tar.gz cpython-50eb60e6bfedbdad2dda30fa5ce7fe3ce83f7748.tar.bz2 |
Merged revisions 80288 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80288 | victor.stinner | 2010-04-21 00:28:31 +0200 (mer., 21 avril 2010) | 2 lines
Issue #8437: Fix test_gdb failures, patch written by Dave Malcolm
........
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/gdb/libpython.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py index 26b0704..3050c89 100644 --- a/Tools/gdb/libpython.py +++ b/Tools/gdb/libpython.py @@ -1133,18 +1133,17 @@ class Frame(object): return index def is_evalframeex(self): - if self._gdbframe.function(): - if self._gdbframe.function().name == 'PyEval_EvalFrameEx': - ''' - I believe we also need to filter on the inline - struct frame_id.inline_depth, only regarding frames with - an inline depth of 0 as actually being this function - - So we reject those with type gdb.INLINE_FRAME - ''' - if self._gdbframe.type() == gdb.NORMAL_FRAME: - # We have a PyEval_EvalFrameEx frame: - return True + if self._gdbframe.name() == 'PyEval_EvalFrameEx': + ''' + I believe we also need to filter on the inline + struct frame_id.inline_depth, only regarding frames with + an inline depth of 0 as actually being this function + + So we reject those with type gdb.INLINE_FRAME + ''' + if self._gdbframe.type() == gdb.NORMAL_FRAME: + # We have a PyEval_EvalFrameEx frame: + return True return False @@ -1294,8 +1293,6 @@ class PyUp(gdb.Command): def invoke(self, args, from_tty): move_in_stack(move_up=True) -PyUp() - class PyDown(gdb.Command): 'Select and print the python stack frame called by this one (if any)' def __init__(self): @@ -1308,7 +1305,10 @@ class PyDown(gdb.Command): def invoke(self, args, from_tty): move_in_stack(move_up=False) -PyDown() +# Not all builds of gdb have gdb.Frame.select +if hasattr(gdb.Frame, 'select'): + PyUp() + PyDown() class PyBacktrace(gdb.Command): 'Display the current python frame and all the frames within its call stack (if any)' |