diff options
author | Siva Chandra Reddy <sivachandra@sourceware.org> | 2012-05-13 11:33:44 +0000 |
---|---|---|
committer | Siva Chandra Reddy <sivachandra@sourceware.org> | 2012-05-13 11:33:44 +0000 |
commit | 7efc75aaf903ab9bf93b8411260740d5a5ee6056 (patch) | |
tree | ae3797c876f883109200007bace80d3755f9bf5b /gdb/doc | |
parent | 02277eae005e94859bd208e7814f1ac66c8b2433 (diff) | |
download | gdb-7efc75aaf903ab9bf93b8411260740d5a5ee6056.zip gdb-7efc75aaf903ab9bf93b8411260740d5a5ee6056.tar.gz gdb-7efc75aaf903ab9bf93b8411260740d5a5ee6056.tar.bz2 |
2012-05-13 Siva Chandra Reddy <sivachandra@google.com>
Add a new function gdb.find_pc_line to the Python API.
* NEWS (Python Scripting): Add entry about the new function.
* python/python.c (gdbpy_find_pc_line): New function which
implements gdb.find_pc_line.
(GdbMethods): Add entry for the new function.
doc/
* gdb.texinfo (Basic Python): Add description about the function
gdb.find_pc_line
testsuite/
* gdb.python/python.c: Add a new breakpoint comment.
* gdb.python/python.exp: Add tests to test gdb.find_pc_line.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 4d23eb0..8eef588 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2012-05-13 Siva Chandra Reddy <sivachandra@google.com> + + * gdb.texinfo (Basic Python): Add description about the function + gdb.find_pc_line + 2012-05-12 Jan Kratochvil <jan.kratochvil@redhat.com> Eli Zaretskii <eliz@gnu.org> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 86f1dd3..a5c6879 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -22508,6 +22508,15 @@ compute values, for example, it is the only way to get the value of a convenience variable (@pxref{Convenience Vars}) as a @code{gdb.Value}. @end defun +@findex gdb.find_pc_line +@defun gdb.find_pc_line (pc) +Return the @code{gdb.Symtab_and_line} object corresponding to the +@var{pc} value. @xref{Symbol Tables In Python}. If an invalid +value of @var{pc} is passed as an argument, then the @code{symtab} and +@code{line} attributes of the returned @code{gdb.Symtab_and_line} object +will be @code{None} and 0 respectively. +@end defun + @findex gdb.post_event @defun gdb.post_event (event) Put @var{event}, a callable object taking no arguments, into |