diff options
author | Tom Tromey <tom@tromey.com> | 2020-10-29 15:04:33 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-10-29 15:04:34 -0600 |
commit | c20cb6860c27d6ef15a1e561f4be78e7b85952ac (patch) | |
tree | 87ba30d6af5da7628ff5d0b5aeac363a30f0eb30 /gdb/inferior.c | |
parent | 6be2a9ab1fba5f876c8cb2566280c5e4e6959d6e (diff) | |
download | gdb-c20cb6860c27d6ef15a1e561f4be78e7b85952ac.zip gdb-c20cb6860c27d6ef15a1e561f4be78e7b85952ac.tar.gz gdb-c20cb6860c27d6ef15a1e561f4be78e7b85952ac.tar.bz2 |
Remove exec_filename macro
This removes the exec_filename macro, replacing it with uses of the
member of current_program_space. This also renames that member, and
changes it to be a unique pointer.
gdb/ChangeLog
2020-10-29 Tom Tromey <tom@tromey.com>
* progspace.h (struct program_space) <exec_filename>: Rename from
pspace_exec_filename. Now a unique_xmalloc_ptr.
* inferior.c (print_selected_inferior): Update.
(print_inferior): Update.
* mi/mi-main.c (print_one_inferior): Update.
* exec.h (exec_filename): Remove macro.
* corefile.c (get_exec_file): Update.
* exec.c (exec_close): Update.
(exec_file_attach): Update.
* progspace.c (clone_program_space): Update.
(print_program_space): Update.
Diffstat (limited to 'gdb/inferior.c')
-rw-r--r-- | gdb/inferior.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/inferior.c b/gdb/inferior.c index f06c13b..fc21241 100644 --- a/gdb/inferior.c +++ b/gdb/inferior.c @@ -415,7 +415,7 @@ void print_selected_inferior (struct ui_out *uiout) { struct inferior *inf = current_inferior (); - const char *filename = inf->pspace->pspace_exec_filename; + const char *filename = inf->pspace->exec_filename.get (); if (filename == NULL) filename = _("<noexec>"); @@ -518,8 +518,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.c_str ()); - if (inf->pspace->pspace_exec_filename != NULL) - uiout->field_string ("exec", inf->pspace->pspace_exec_filename); + if (inf->pspace->exec_filename != nullptr) + uiout->field_string ("exec", inf->pspace->exec_filename.get ()); else uiout->field_skip ("exec"); |