Bug 13599 - no way to get the line number of a symbol
Summary: no way to get the line number of a symbol
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: python (show other bugs)
Version: unknown
: P2 normal
Target Milestone: 7.5
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-16 18:33 UTC by Tom Tromey
Modified: 2012-02-07 19:47 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2012-01-16 18:33:34 UTC
I couldn't find a way to get the line number from a symbol object
in python.
Comment 1 Sourceware Commits 2012-02-07 19:42:35 UTC
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
Comment 2 Tom Tromey 2012-02-07 19:47:20 UTC
Fixed.