Message 103644 - Python tracker (original) (raw)

If I'm reading this bug correctly, there are two issues here:

(A) that we shouldn't use gdb.Frame.function.name(), and should instead use gdb.Frame.name(). I believe this is a duplicate of issue 8279, and that this was fixed in trunk in r80156. It hasn't yet been fixed in the py3k branch; the patch from r80156 does appear to apply cleanly there.

(B) That different builds of gdb may or may not have gdb.Frame.select.

I'm attaching a patch to trunk which tries to autodetect whether the gdb.Frame.select method is present. The "py-up" and "py-down" commands and their selftest (StackNavigationTests) are made conditional upon this.

gdb in Fedora 12 is based on 7.0.1 plus a lot of patches. But I don't see a patch added the select() method to the Python API: http://cvs.fedoraproject.org/viewvc/rpms/gdb/F-12/ FWIW, the relevant patch is this one: http://cvs.fedoraproject.org/viewvc/rpms/gdb/F-12/gdb-archer.patch?revision=1.40&view=markup (search for "frapy_select" within that patch); as I understand it this generating from the git repository used by the team that created the Python support within gdb, and as such it's a snapshot of work, much of which is now in upstream gdb's CVS repository.