I couldn't find a way to get the line number from a symbol object in python.
CVSROOT: /cvs/src Module name: src Changes by: tromey@sourceware.org 2012-02-07 19:42:28 Modified files: gdb : ChangeLog NEWS gdb/doc : ChangeLog gdb.texinfo gdb/python : py-symbol.c gdb/testsuite : ChangeLog gdb/testsuite/gdb.python: py-symbol.c py-symbol.exp py-symtab.exp Log message: PR python/13599: * python/py-symbol.c (sympy_line): New function. (symbol_object_getset): Add "line". gdb/doc * gdb.texinfo (Symbols In Python): Document Symbol.line. gdb/testsuite * gdb.python/py-symbol.c (qq): New global. * gdb.python/py-symbol.exp: Add test for frame-less lookup_symbol. * gdb.python/py-symtab.exp: Fix line number. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13811&r2=1.13812 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/NEWS.diff?cvsroot=src&r1=1.485&r2=1.486 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/ChangeLog.diff?cvsroot=src&r1=1.1270&r2=1.1271 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/gdb.texinfo.diff?cvsroot=src&r1=1.917&r2=1.918 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-symbol.c.diff?cvsroot=src&r1=1.11&r2=1.12 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3060&r2=1.3061 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.python/py-symbol.c.diff?cvsroot=src&r1=1.3&r2=1.4 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.python/py-symbol.exp.diff?cvsroot=src&r1=1.11&r2=1.12 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.python/py-symtab.exp.diff?cvsroot=src&r1=1.7&r2=1.8
Fixed.