There is no way to easily retrieve a python object pointing to the current inferior
CVSROOT: /cvs/src Module name: src Changes by: kpouget@sourceware.org 2011-09-15 12:42:30 Modified files: gdb : ChangeLog gdb/doc : ChangeLog gdb.texinfo gdb/python : py-inferior.c python-internal.h python.c gdb/testsuite : ChangeLog gdb/testsuite/gdb.python: py-inferior.exp Log message: 2011-09-15 Kevin Pouget <kevin.pouget@st.com> PR Python/12692 Add gdb.selected_inferior() to Python interface. * python/py-inferior.c (GdbMethods): New Python method definition. doc: PR Python/12692 Add gdb.selected_inferior() to Python interface. * gdb.texinfo (Inferiors In Python): Describe new gdb.selected_inferior() function. testsuite: PR Python/12692 Add gdb.selected_inferior() to Python interface. * gdb.python/py-inferior.exp: Add testcase for gdb.selected_inferior(). Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13332&r2=1.13333 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/ChangeLog.diff?cvsroot=src&r1=1.1210&r2=1.1211 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/gdb.texinfo.diff?cvsroot=src&r1=1.859&r2=1.860 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-inferior.c.diff?cvsroot=src&r1=1.12&r2=1.13 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/python-internal.h.diff?cvsroot=src&r1=1.47&r2=1.48 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/python.c.diff?cvsroot=src&r1=1.71&r2=1.72 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2853&r2=1.2854 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.python/py-inferior.exp.diff?cvsroot=src&r1=1.8&r2=1.9
Fixed.