aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2023-09-07 15:47:07 +0100
committerAndrew Burgess <aburgess@redhat.com>2023-09-28 15:33:13 +0100
commit4e02aca0c5ed0c23f8d8a3e30dc317967193a5f0 (patch)
treeab9774fa3de282f47ba23c0044c7f8cceb7f8dec /gdb/doc
parent5ce85461a143e0d564b6dfa6407374851899d491 (diff)
downloadgdb-4e02aca0c5ed0c23f8d8a3e30dc317967193a5f0.zip
gdb-4e02aca0c5ed0c23f8d8a3e30dc317967193a5f0.tar.gz
gdb-4e02aca0c5ed0c23f8d8a3e30dc317967193a5f0.tar.bz2
gdb/python: new Progspace.executable_filename attribute
Add a new Progspace.executable_filename attribute that contains the path to the executable for this program space, or None if no executable is set. The path within this attribute will be set by the "exec-file" and/or "file" commands. Accessing this attribute for an invalid program space will raise an exception. This new attribute is similar too, but not the same as the existing gdb.Progspace.filename attribute. If I could change the past, I'd change the 'filename' attribute to 'symbol_filename', which is what it actually represents. The old attribute will be set by the 'symbol-file' command, while the new attribute is set by the 'exec-file' command. Obviously the 'file' command sets both of these attributes. Reviewed-By: Eli Zaretskii <eliz@gnu.org> Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/python.texi15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 6510a83..4c8bb12 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -5095,6 +5095,21 @@ If the @code{Progspace} is invalid, i.e.@:, when
access this attribute will raise a @code{RuntimeError} exception.
@end defvar
+@defvar Progspace.executable_filename
+The file name, as a string, of the executable file in use by this
+program space. The executable file is the file that @value{GDBN} will
+invoke in order to start an inferior when using a native target. The
+file name within this attribute is updated by the @kbd{exec-file} and
+@kbd{file} commands.
+
+If no executable is currently set within this @code{Progspace} then
+this attribute contains @code{None}.
+
+If the @code{Progspace} is invalid, i.e.@:, when
+@code{Progspace.is_valid()} returns @code{False}, then attempting to
+access this attribute will raise a @code{RuntimeError} exception.
+@end defvar
+
@defvar Progspace.pretty_printers
The @code{pretty_printers} attribute is a list of functions. It is
used to look up pretty-printers. A @code{Value} is passed to each