diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-03 09:21:23 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-02-03 11:06:26 -0500 |
commit | 79846903c6289b2ff12d1830bc2cbf900710556c (patch) | |
tree | c89e5a9e8b3face4c8232ecdb730b8c9200a6a6a /gdb/inferior.c | |
parent | 650160322c09b9b36d4415b56518ab9e71e8acba (diff) | |
download | binutils-gdb-79846903c6289b2ff12d1830bc2cbf900710556c.tar.gz |
gdb: change inferior::tdesc_info to non-pointer
I initially made this field a unique pointer, to have automatic memory
management. But I then thought that the field didn't really need to be
allocated separately from struct inferior. So make it a regular
non-pointer field of inferior.
Remove target_desc_info_free, as it's no longer needed.
Change-Id: Ica2b97071226f31c40e86222a2f6922454df1229
Diffstat (limited to 'gdb/inferior.c')
-rw-r--r-- | gdb/inferior.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/inferior.c b/gdb/inferior.c index b0ecca8b63a..dfe523664de 100644 --- a/gdb/inferior.c +++ b/gdb/inferior.c @@ -69,8 +69,6 @@ private_inferior::~private_inferior () = default; inferior::~inferior () { - inferior *inf = this; - /* Before the inferior is deleted, all target_ops should be popped from the target stack, this leaves just the dummy_target behind. If this is not done, then any target left in the target stack will be left @@ -81,7 +79,6 @@ inferior::~inferior () gdb_assert (m_target_stack.top ()->stratum () == dummy_stratum); m_continuations.clear (); - target_desc_info_free (inf->tdesc_info); } inferior::inferior (int pid_) @@ -964,7 +961,7 @@ clone_inferior_command (const char *args, int from_tty) /* If the original inferior had a user specified target description, make the clone use it too. */ - if (target_desc_info_from_user_p (inf->tdesc_info)) + if (target_desc_info_from_user_p (&inf->tdesc_info)) copy_inferior_target_desc_info (inf, orginf); clone_program_space (pspace, orginf->pspace); |