aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc/python.texi
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2018-09-13 15:39:26 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2018-09-13 15:42:12 -0400
commita40bf0c2e93daac4ae4ce7dd1c43ab6135e76720 (patch)
tree6e743305a90a750fce1d41497e51dac75b0f650a /gdb/doc/python.texi
parent4a3fe98f885a2d1db804584e7ea265ab3ccef4d7 (diff)
downloadbinutils-a40bf0c2e93daac4ae4ce7dd1c43ab6135e76720.zip
binutils-a40bf0c2e93daac4ae4ce7dd1c43ab6135e76720.tar.gz
binutils-a40bf0c2e93daac4ae4ce7dd1c43ab6135e76720.tar.bz2
python: Add Inferior.progspace property
This patch adds a progspace property to the gdb.Inferior type, which allows getting the gdb.Progspace object associated to that inferior. In conjunction with the following patch, this will allow scripts iterate on objfiles associated with a particular inferior. gdb/ChangeLog: * python/py-inferior.c (infpy_get_progspace): New function. (inferior_object_getset): Add progspace property. * NEWS: Mention the new property. gdb/doc/ChangeLog: * python.texi (Inferiors In Python): Document Inferior.progspace. (Program Spaces In Python): Document that gdb.current_progspace() is the same as gdb.selected_inferior().progspace. gdb/testsuite/ChangeLog: * gdb.python/py-inferior.exp: Add tests for Inferior.progspace and a few other Inferior properties when the Inferior is no longer valid.
Diffstat (limited to 'gdb/doc/python.texi')
-rw-r--r--gdb/doc/python.texi8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 6e2bf5c..75d8ae1 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -2836,6 +2836,10 @@ Boolean signaling whether the inferior was created using `attach', or
started by @value{GDBN} itself.
@end defvar
+@defvar Inferior.progspace
+The inferior's program space. @xref{Progspaces In Python}.
+@end defvar
+
A @code{gdb.Inferior} object has the following methods:
@defun Inferior.is_valid ()
@@ -3995,7 +3999,9 @@ The following progspace-related functions are available in the
@findex gdb.current_progspace
@defun gdb.current_progspace ()
This function returns the program space of the currently selected inferior.
-@xref{Inferiors and Programs}.
+@xref{Inferiors and Programs}. This is identical to
+@code{gdb.selected_inferior().progspace} (@pxref{Inferiors In Python}) and is
+included for historical compatibility.
@end defun
@findex gdb.progspaces