aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-aix.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2023-10-02 16:00:55 -0400
committerSimon Marchi <simon.marchi@efficios.com>2023-10-19 10:57:51 -0400
commite3b63a7910ac7a4ee959af20a544075becbf2671 (patch)
treee881e11f0ee8feac2acd083cb4f1eb69e3d64c63 /gdb/solib-aix.c
parentae4bf24404a134d96bc1844fc949ca518df698f8 (diff)
downloadfsf-binutils-gdb-e3b63a7910ac7a4ee959af20a544075becbf2671.zip
fsf-binutils-gdb-e3b63a7910ac7a4ee959af20a544075becbf2671.tar.gz
fsf-binutils-gdb-e3b63a7910ac7a4ee959af20a544075becbf2671.tar.bz2
gdb: remove target_so_ops::free_so
target_so_ops::free_so is responsible for freeing the specific lm_info object. All implementations basically just call delete. Remove that method, make the destructor of lm_info virtual, and call delete directly from the free_so function. Make the sub-classes final, just because it's good practice. Change-Id: Iee1fd4861c75034a9e41a656add8ed8dfd8964ee 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.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/gdb/solib-aix.c b/gdb/solib-aix.c
index 7e7333e..7ec6462 100644
--- a/gdb/solib-aix.c
+++ b/gdb/solib-aix.c
@@ -28,7 +28,7 @@
/* Our private data in struct so_list. */
-struct lm_info_aix : public lm_info
+struct lm_info_aix final : public lm_info
{
/* The name of the file mapped by the loader. Apart from the entry
for the main executable, this is usually a shared library (which,
@@ -360,18 +360,6 @@ solib_aix_relocate_section_addresses (so_list &so, target_section *sec)
}
}
-/* Implement the "free_so" target_so_ops method. */
-
-static void
-solib_aix_free_so (so_list &so)
-{
- lm_info_aix *li = (lm_info_aix *) so.lm_info;
-
- solib_debug_printf ("%s", so.so_name);
-
- delete li;
-}
-
/* Compute and return the OBJFILE's section_offset array, using
the associated loader info (INFO). */
@@ -704,7 +692,6 @@ solib_aix_normal_stop_observer (struct bpstat *unused_1, int unused_2)
const struct target_so_ops solib_aix_so_ops =
{
solib_aix_relocate_section_addresses,
- solib_aix_free_so,
nullptr,
nullptr,
solib_aix_solib_create_inferior_hook,