aboutsummaryrefslogtreecommitdiff
path: root/gdb/inferior.c
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/inferior.c
parent9102a6c15c756c55e77c0fa7deecfc58fa8a361e (diff)
downloadfsf-binutils-gdb-9ad8c5832d0092e1c02069b1189ec0ff59089957.zip
fsf-binutils-gdb-9ad8c5832d0092e1c02069b1189ec0ff59089957.tar.gz
fsf-binutils-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/inferior.c')
-rw-r--r--gdb/inferior.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/inferior.c b/gdb/inferior.c
index 0522cb5..6a19767 100644
--- a/gdb/inferior.c
+++ b/gdb/inferior.c
@@ -519,7 +519,7 @@ void
print_selected_inferior (struct ui_out *uiout)
{
struct inferior *inf = current_inferior ();
- const char *filename = inf->pspace->exec_filename.get ();
+ const char *filename = inf->pspace->exec_filename ();
if (filename == NULL)
filename = _("<noexec>");
@@ -613,8 +613,8 @@ print_inferior (struct ui_out *uiout, const char *requested_inferiors)
std::string conn = uiout_field_connection (inf->process_target ());
uiout->field_string ("connection-id", conn);
- if (inf->pspace->exec_filename != nullptr)
- uiout->field_string ("exec", inf->pspace->exec_filename.get (),
+ if (inf->pspace->exec_filename () != nullptr)
+ uiout->field_string ("exec", inf->pspace->exec_filename (),
file_name_style.style ());
else
uiout->field_skip ("exec");
@@ -750,7 +750,7 @@ inferior_command (const char *args, int from_tty)
{
inf = current_inferior ();
gdb_assert (inf != nullptr);
- const char *filename = inf->pspace->exec_filename.get ();
+ const char *filename = inf->pspace->exec_filename ();
if (filename == nullptr)
filename = _("<noexec>");