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
commit8a4f140205d1fb7240b154fd2f9074d7b42330b7 (patch)
tree871e1273de3a465496fcf4d037904c756ea48375 /gdb/progspace.h
parentc20cb6860c27d6ef15a1e561f4be78e7b85952ac (diff)
downloadfsf-binutils-gdb-8a4f140205d1fb7240b154fd2f9074d7b42330b7.zip
fsf-binutils-gdb-8a4f140205d1fb7240b154fd2f9074d7b42330b7.tar.gz
fsf-binutils-gdb-8a4f140205d1fb7240b154fd2f9074d7b42330b7.tar.bz2
Change exec_close to be a method on program_space
exec_close uses the current program space, so it seemed cleaner to change it to be a method on program_space. This patch makes this change. gdb/ChangeLog 2020-10-29 Tom Tromey <tom@tromey.com> * progspace.c (program_space::exec_close): New method, from exec_close in exec.c. * exec.c (exec_close): Move to progspace.c. (exec_target::close, exec_file_attach): Update. * progspace.h (struct program_space) <exec_close>: Declare method.
Diffstat (limited to 'gdb/progspace.h')
-rw-r--r--gdb/progspace.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/progspace.h b/gdb/progspace.h
index 3acce50..6dcec9c 100644
--- a/gdb/progspace.h
+++ b/gdb/progspace.h
@@ -272,6 +272,9 @@ struct program_space
for (so_list *so : pspace->solibs ()) { ... } */
next_adapter<struct so_list> solibs () const;
+ /* Close and clear exec_bfd. If we end up with no target sections
+ to read memory from, this unpushes the exec_ops target. */
+ void exec_close ();
/* Unique ID number. */
int num = 0;