[issue8437] test_gdb: gdb.Frame has no attribute function

STINNER Victor report at bugs.python.org
Tue Apr 20 00:26:31 CEST 2010


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

> (A) that we shouldn't use gdb.Frame.function.name(), ...
> that this was fixed in trunk in r80156.

This command is not correct: it still calls .function() method:
     def is_evalframeex(self):
        '''Is this a PyEval_EvalFrameEx frame?'''
        if self._gdbframe.function():
            if self._gdbframe.name() == 'PyEval_EvalFrameEx':

Call to self._gdbframe.function() can be removed.

> The "py-up" and "py-down" commands and their selftest
> (StackNavigationTests) are made conditional upon this.

It's not enough, test_print_after_up() and test_locals_after_up() require also py-up command.

Attached patch is based on add-conditions-for-gdb.Frame.select-to-trunk.patch and fix described problems. Using test_gdb-2.patch, test_gdb pass without any error on my Debian Sid (gdb 7.1).

----------
Added file: http://bugs.python.org/file16998/test_gdb-2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8437>
_______________________________________


More information about the Python-bugs-list mailing list