aboutsummaryrefslogtreecommitdiff
path: root/gdb/progspace.h
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.h
parent6be2a9ab1fba5f876c8cb2566280c5e4e6959d6e (diff)
downloadfsf-binutils-gdb-c20cb6860c27d6ef15a1e561f4be78e7b85952ac.zip
fsf-binutils-gdb-c20cb6860c27d6ef15a1e561f4be78e7b85952ac.tar.gz
fsf-binutils-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/progspace.h')
-rw-r--r--gdb/progspace.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/progspace.h b/gdb/progspace.h
index 6a0e903..3acce50 100644
--- a/gdb/progspace.h
+++ b/gdb/progspace.h
@@ -284,9 +284,9 @@ struct program_space
/* The last-modified time, from when the exec was brought in. */
long ebfd_mtime = 0;
/* Similar to bfd_get_filename (exec_bfd) but in original form given
- by user, without symbolic links and pathname resolved.
- It needs to be freed by xfree. It is not NULL iff EBFD is not NULL. */
- char *pspace_exec_filename = NULL;
+ by user, without symbolic links and pathname resolved. It is not
+ NULL iff EBFD is not NULL. */
+ gdb::unique_xmalloc_ptr<char> exec_filename;
/* Binary file diddling handle for the core file. */
gdb_bfd_ref_ptr cbfd;