Fix syscall group completion
[deliverable/binutils-gdb.git] / gdb / solist.h
index 378d60d7b8330f3295aa988481f0e37e8c211c25..992986e9916f2849e2a1436ddbe61e3fbbdb0b69 100644 (file)
         so != NULL; \
         so = so->next)
 
-/* Forward declaration for target specific link map information.  This
-   struct is opaque to all but the target specific file.  */
-struct lm_info;
+/* Base class for target-specific link map information.  */
+
+struct lm_info_base
+{
+};
 
 struct so_list
   {
@@ -45,7 +47,7 @@ struct so_list
        will be a copy of struct link_map from the user process, but
        it need not be; it can be any collection of data needed to
        traverse the dynamic linker's data structures.  */
-    struct lm_info *lm_info;
+    lm_info_base *lm_info;
 
     /* Shared object file name, exactly as it appears in the
        inferior's link map.  This may be a relative path, or something
@@ -119,11 +121,8 @@ struct target_so_ops
     struct so_list *(*current_sos) (void);
 
     /* Find, open, and read the symbols for the main executable.  If
-       FROM_TTYP dereferences to a non-zero integer, allow messages to
-       be printed.  This parameter is a pointer rather than an int
-       because open_symbol_file_object is called via catch_errors and
-       catch_errors requires a pointer argument.  */
-    int (*open_symbol_file_object) (void *from_ttyp);
+       FROM_TTY is non-zero, allow messages to be printed.  */
+    int (*open_symbol_file_object) (int from_ttyp);
 
     /* Determine if PC lies in the dynamic symbol resolution code of
        the run time loader.  */
@@ -177,6 +176,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);
 
This page took 0.030532 seconds and 4 git commands to generate.