aboutsummaryrefslogtreecommitdiff
path: root/gdb/solist.h
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/solist.h
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/solist.h')
-rw-r--r--gdb/solist.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/solist.h b/gdb/solist.h
index 51b1ceb..12ea516 100644
--- a/gdb/solist.h
+++ b/gdb/solist.h
@@ -29,6 +29,9 @@
struct lm_info
{
+ lm_info () = default;
+ lm_info (const lm_info &) = default;
+ virtual ~lm_info () = 0;
};
struct so_list
@@ -86,13 +89,9 @@ struct target_so_ops
which the object was actually mapped. */
void (*relocate_section_addresses) (so_list &so, target_section *);
- /* Free the link map info and any other private data structures
- associated with a so_list entry. */
- void (*free_so) (so_list &so);
-
/* Reset private data structures associated with SO.
This is called when SO is about to be reloaded.
- It is also called before free_so when SO is about to be freed. */
+ It is also called when SO is about to be freed. */
void (*clear_so) (const so_list &so);
/* Free private data structures associated to PSPACE. This method