From 79846903c6289b2ff12d1830bc2cbf900710556c Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 3 Feb 2023 09:21:23 -0500 Subject: 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 --- gdb/inferior.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'gdb/inferior.c') 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); -- cgit v1.2.1