AttributeError: 'gdb.Frame' object has no attribute 'function'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gdb (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: gdb
On Lucid, the py-bt gdb macro is broken. To reproduce, run python under gdb and try using it. For example:
exarkun@up:/tmp$ gdb python
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://
Reading symbols from /usr/bin/
done.
(gdb) run
Starting program: /usr/bin/python
[Thread debugging using libthread_db enabled]
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Program received signal SIGINT, Interrupt.
0x0012d422 in __kernel_vsyscall ()
(gdb) py-bt
Traceback (most recent call last):
File "/usr/lib/
frame = Frame.get_
File "/usr/lib/
if frame.is_
File "/usr/lib/
if self._gdbframe.
AttributeError: 'gdb.Frame' object has no attribute 'function'
Error occurred in Python command: 'gdb.Frame' object has no attribute 'function'
(gdb) quit
Dropping a copy of is_evalframeex() from the head of the python trunk into python2.6-gdb.py fixes this issue.
def is_evalframeex( self): name() == 'PyEval_ EvalFrameEx' : inline_ depth, only regarding frames with
'''Is this a PyEval_EvalFrameEx frame?'''
if self._gdbframe.
'''
I believe we also need to filter on the inline
struct frame_id.
an inline depth of 0 as actually being this function
So we reject those with type gdb.INLINE_FRAME type() == gdb.NORMAL_FRAME:
return True
'''
if self._gdbframe.
# We have a PyEval_EvalFrameEx frame:
return False
See also: bugs.python. org/issue8279 bugs.python. org/issue8437
http://
http://