From cb2e07a6f002d0b1b6e7339b0475e674955c03ef Mon Sep 17 00:00:00 2001 From: Phil Muldoon Date: Wed, 11 Aug 2010 12:48:24 +0000 Subject: 2010-08-11 Phil Muldoon Thiago Jung Bauermann Tom Tromey * python/python.c (gdbpy_solib_address): New function. (gdbpy_decode_line): Likewise. 2010-08-11 Phil Muldoon * gdb.texinfo (Basic Python): Describe solib_address and decode_line Python APIs 2010-08-11 Phil Muldoon * gdb.python/python.c: New File. * gdb.python/python-sl.c: New File. * gdb.python/python.exp: Test solib_address and decode_line * functions. --- gdb/doc/ChangeLog | 5 +++++ gdb/doc/gdb.texinfo | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) (limited to 'gdb/doc') diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 43ccbbec35..9cc366496a 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2010-08-11 Phil Muldoon + + * gdb.texinfo (Basic Python): Describe solib_address and + decode_line Python APIs + 2010-08-10 Tom Tromey * gdb.texinfo (Pretty Printing API): Document diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index c40c931770..9851212a00 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -20554,6 +20554,26 @@ Return the name of the current target wide character set never returned. @end defun +@findex gdb.solib_name +@defun solib_name address +Return the name of the shared library holding the given @var{address} +as a string, or @code{None}. +@end defun + +@findex gdb.decode_line +@defun decode_line @r{[}expression@r{]} +Return locations of the line specified by @var{expression}, or of the +current line if no argument was given. This function returns a Python +tuple containing two elements. The first element contains a string +holding any unparsed section of @var{expression} (or @code{None} if +the expression has been fully parsed). The second element contains +either @code{None} or another tuple that contains all the locations +that match the expression represented as @code{gdb.Symtab_and_line} +objects (@pxref{Symbol Tables In Python}). If @var{expression} is +provided, it is decoded the way that @value{GDBN}'s inbuilt +@code{break} or @code{edit} commands do (@pxref{Specify Location}). +@end defun + @node Exception Handling @subsubsection Exception Handling @cindex python exceptions -- cgit v1.2.1