From 4e02aca0c5ed0c23f8d8a3e30dc317967193a5f0 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Thu, 7 Sep 2023 15:47:07 +0100 Subject: 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 Approved-By: Tom Tromey --- gdb/NEWS | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gdb/NEWS') diff --git a/gdb/NEWS b/gdb/NEWS index 5d9e9ee..2d57f52 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -303,6 +303,13 @@ show tui mouse-events Progspace.filename is not None), otherwise, this attribute is itself None. + ** New attribute Progspace.executable_filename. This attribute + holds a string containing a file name set by the "exec-file" or + "file" commands, or None if no executable file is set. This + isn't the exact string passed by the user to these commands; the + file name will have been partially resolved to an absolute file + name. + *** Changes in GDB 13 * MI version 1 is deprecated, and will be removed in GDB 14. -- cgit v1.1