aboutsummaryrefslogtreecommitdiff
path: root/gdb/progspace.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-10-29 15:04:33 -0600
committerTom Tromey <tom@tromey.com>2020-10-29 15:04:34 -0600
commitc20cb6860c27d6ef15a1e561f4be78e7b85952ac (patch)
tree87ba30d6af5da7628ff5d0b5aeac363a30f0eb30 /gdb/progspace.c
parent6be2a9ab1fba5f876c8cb2566280c5e4e6959d6e (diff)
downloadbinutils-c20cb6860c27d6ef15a1e561f4be78e7b85952ac.zip
binutils-c20cb6860c27d6ef15a1e561f4be78e7b85952ac.tar.gz
binutils-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/progspace.c')
-rw-r--r--gdb/progspace.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/progspace.c b/gdb/progspace.c
index 67ea8bd..7600123 100644
--- a/gdb/progspace.c
+++ b/gdb/progspace.c
@@ -233,8 +233,8 @@ clone_program_space (struct program_space *dest, struct program_space *src)
set_current_program_space (dest);
- if (src->pspace_exec_filename != NULL)
- exec_file_attach (src->pspace_exec_filename, 0);
+ if (src->exec_filename != NULL)
+ exec_file_attach (src->exec_filename.get (), 0);
if (src->symfile_object_file != NULL)
symbol_file_add_main (objfile_name (src->symfile_object_file),
@@ -315,8 +315,8 @@ print_program_space (struct ui_out *uiout, int requested)
uiout->field_signed ("id", pspace->num);
- if (pspace->pspace_exec_filename)
- uiout->field_string ("exec", pspace->pspace_exec_filename);
+ if (pspace->exec_filename != nullptr)
+ uiout->field_string ("exec", pspace->exec_filename.get ());
else
uiout->field_skip ("exec");