diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2023-10-10 14:47:13 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-10-19 10:57:51 -0400 |
commit | 7ad0a42e88c09b4046205316bd6352dfb31afd79 (patch) | |
tree | b64102b23c6e0bcd53196a21e2c11ba919c6b61f /gdb/solib-target.c | |
parent | 1c0dfccba7bac021456198597fdce080d4a8315b (diff) | |
download | binutils-7ad0a42e88c09b4046205316bd6352dfb31afd79.zip binutils-7ad0a42e88c09b4046205316bd6352dfb31afd79.tar.gz binutils-7ad0a42e88c09b4046205316bd6352dfb31afd79.tar.bz2 |
gdb: make so_list::lm_info a unique_ptr
Make it a unique_ptr, so it gets automatically deleted when the so_list
is deleted.
Change-Id: Ib62d60ae2a80656239860b80e4359121c93da13d
Approved-By: Pedro Alves <pedro@palves.net>
Reviewed-By: Reviewed-By: Lancelot Six <lancelot.six@amd.com>
Diffstat (limited to 'gdb/solib-target.c')
-rw-r--r-- | gdb/solib-target.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/solib-target.c b/gdb/solib-target.c index e20a336..3743c77 100644 --- a/gdb/solib-target.c +++ b/gdb/solib-target.c @@ -260,7 +260,7 @@ solib_target_current_sos (void) /* We no longer need this copy of the name. */ info->name.clear (); - new_solib->lm_info = info.release (); + new_solib->lm_info = std::move (info); /* Add it to the list. */ if (!start) @@ -285,7 +285,7 @@ static void solib_target_relocate_section_addresses (so_list &so, target_section *sec) { CORE_ADDR offset; - auto *li = gdb::checked_static_cast<lm_info_target *> (so.lm_info); + auto *li = gdb::checked_static_cast<lm_info_target *> (so.lm_info.get ()); /* Build the offset table only once per object file. We can not do it any earlier, since we need to open the file first. */ |