aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-frv.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-frv.c
parentae4bf24404a134d96bc1844fc949ca518df698f8 (diff)
downloadgdb-e3b63a7910ac7a4ee959af20a544075becbf2671.zip
gdb-e3b63a7910ac7a4ee959af20a544075becbf2671.tar.gz
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-frv.c')
-rw-r--r--gdb/solib-frv.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c
index caf8a9a..853d90a 100644
--- a/gdb/solib-frv.c
+++ b/gdb/solib-frv.c
@@ -196,7 +196,7 @@ struct ext_link_map
/* Link map info to include in an allocated so_list entry. */
-struct lm_info_frv : public lm_info
+struct lm_info_frv final : public lm_info
{
~lm_info_frv ()
{
@@ -816,14 +816,6 @@ frv_clear_solib (program_space *pspace)
}
static void
-frv_free_so (so_list &so)
-{
- lm_info_frv *li = (lm_info_frv *) so.lm_info;
-
- delete li;
-}
-
-static void
frv_relocate_section_addresses (so_list &so, target_section *sec)
{
int seg;
@@ -1089,7 +1081,6 @@ frv_fetch_objfile_link_map (struct objfile *objfile)
const struct target_so_ops frv_so_ops =
{
frv_relocate_section_addresses,
- frv_free_so,
nullptr,
frv_clear_solib,
frv_solib_create_inferior_hook,