aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2024-05-30 14:53:53 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2024-06-07 23:09:03 -0400
commit9ad8c5832d0092e1c02069b1189ec0ff59089957 (patch)
treefedbd77064a2a4522f6cb6d15e40d7399ba07875 /gdb/mi
parent9102a6c15c756c55e77c0fa7deecfc58fa8a361e (diff)
downloadgdb-9ad8c5832d0092e1c02069b1189ec0ff59089957.zip
gdb-9ad8c5832d0092e1c02069b1189ec0ff59089957.tar.gz
gdb-9ad8c5832d0092e1c02069b1189ec0ff59089957.tar.bz2
gdb: make progspace::exec_filename private, add getter / setter
Just like the title says... I think this makes things a bit clearer, for instance where the exec filename is set. It also makes the read call sites a bit nicer, avoiding the `.get ()`. Change-Id: If8b58ae8f6270c8a34b868f6ca06128c6671ea3c Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-main.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index a758b68..5bcb5f7 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -651,11 +651,8 @@ print_one_inferior (struct inferior *inferior, bool recurse,
if (inferior->pid != 0)
uiout->field_signed ("pid", inferior->pid);
- if (inferior->pspace->exec_filename != nullptr)
- {
- uiout->field_string ("executable",
- inferior->pspace->exec_filename.get ());
- }
+ if (inferior->pspace->exec_filename () != nullptr)
+ uiout->field_string ("executable", inferior->pspace->exec_filename ());
if (inferior->pid != 0)
{