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-aix.c | |
parent | 1c0dfccba7bac021456198597fdce080d4a8315b (diff) | |
download | gdb-7ad0a42e88c09b4046205316bd6352dfb31afd79.zip gdb-7ad0a42e88c09b4046205316bd6352dfb31afd79.tar.gz gdb-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-aix.c')
-rw-r--r-- | gdb/solib-aix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/solib-aix.c b/gdb/solib-aix.c index 9d232a0..a9931a6 100644 --- a/gdb/solib-aix.c +++ b/gdb/solib-aix.c @@ -316,7 +316,7 @@ solib_aix_relocate_section_addresses (so_list &so, target_section *sec) struct bfd_section *bfd_sect = sec->the_bfd_section; bfd *abfd = bfd_sect->owner; const char *section_name = bfd_section_name (bfd_sect); - auto *info = gdb::checked_static_cast<lm_info_aix *> (so.lm_info); + auto *info = gdb::checked_static_cast<lm_info_aix *> (so.lm_info.get ()); if (strcmp (section_name, ".text") == 0) { @@ -487,7 +487,7 @@ solib_aix_current_sos (void) new_solib->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0'; memcpy (new_solib->so_name, new_solib->so_original_name, SO_NAME_MAX_PATH_SIZE); - new_solib->lm_info = new lm_info_aix (info); + new_solib->lm_info = gdb::make_unique<lm_info_aix> (info); /* Add it to the list. */ if (!start) |