aboutsummaryrefslogtreecommitdiff
path: root/gdb/solist.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/solist.h')
-rw-r--r--gdb/solist.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/solist.h b/gdb/solist.h
index 54c9902..5eb2d39 100644
--- a/gdb/solist.h
+++ b/gdb/solist.h
@@ -179,6 +179,18 @@ struct target_so_ops
/* Free the memory associated with a (so_list *). */
void free_so (struct so_list *so);
+/* A deleter that calls free_so. */
+struct so_deleter
+{
+ void operator() (struct so_list *so) const
+ {
+ free_so (so);
+ }
+};
+
+/* A unique pointer to a so_list. */
+typedef std::unique_ptr<so_list, so_deleter> so_list_up;
+
/* Return address of first so_list entry in master shared object list. */
struct so_list *master_so_list (void);