]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: fix stale references to so_list
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 26 May 2025 20:26:11 +0000 (16:26 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Thu, 29 May 2025 14:44:58 +0000 (10:44 -0400)
Adjust some comments and function names that refer to the ancient
so_list type.

Update some other stale comments in solib-svr4.c at the same time.

Change-Id: Ia42efa6554d0cc6abb4183b6bffc96c6358c5735
Reviewed-By: Guinevere Larsen <guinevere@redhat.com>
gdb/progspace.h
gdb/solib-darwin.c
gdb/solib-dsbt.c
gdb/solib-frv.c
gdb/solib-rocm.c
gdb/solib-svr4.c
gdb/solib-svr4.h
gdb/solib-target.c
gdb/solib.c
gdb/solib.h
gdb/solist.h

index 1ae826d65495c24db6e7b78c8543e46e266f750e..74c1c275b0ec64b1e1c64ece65dcc273301cf47d 100644 (file)
@@ -231,7 +231,7 @@ struct program_space
      is outside all objfiles in this progspace.  */
   struct objfile *objfile_for_address (CORE_ADDR address);
 
-  /* Return the list of  all the solibs in this program space.  */
+  /* Return the list of all the solibs in this program space.  */
   owning_intrusive_list<solib> &solibs ()
   { return so_list; }
 
index ef033d0cda37407bdb1e1a86fb88a89bf148b565..a2c30fa19db8b5ed49c61b7e0471f59178565080 100644 (file)
@@ -133,7 +133,7 @@ darwin_load_image_infos (struct darwin_info *info)
     (buf + 8 + ptr_type->length (), ptr_type);
 }
 
-/* Link map info to include in an allocated so_list entry.  */
+/* Link map info to include in an allocated solib entry.  */
 
 struct lm_info_darwin final : public lm_info
 {
index d1735f268fcf041d084875816854ca07abc05984..05c5616cfb1436d981b5e5ead58edb1a1358a73e 100644 (file)
@@ -121,7 +121,7 @@ struct dbst_ext_link_map
   ext_ptr l_next, l_prev;      /* struct link_map *l_next, *l_prev; */
 };
 
-/* Link map info to include in an allocated so_list entry */
+/* Link map info to include in an allocated solib entry */
 
 struct lm_info_dsbt final : public lm_info
 {
index 2b39d152141f8541d7dfdaae3aeddd2f4d66cfe0..4f52614ba902351a9922eece0b480be5b61e1951 100644 (file)
@@ -194,7 +194,7 @@ struct ext_link_map
   ext_ptr l_next, l_prev;      /* struct link_map *l_next, *l_prev; */
 };
 
-/* Link map info to include in an allocated so_list entry.  */
+/* Link map info to include in an allocated solib entry.  */
 
 struct lm_info_frv final : public lm_info
 {
index 94aa68b8667de3a1ba2589ab97cf81b1accd83e9..a5eaee73f2e62840f4653f267dd8d0e32b4450fd 100644 (file)
@@ -202,10 +202,10 @@ rocm_solib_handle_event ()
   rocm_update_solib_list ();
 }
 
-/* Create so_list objects from rocm_so objects in SOS.  */
+/* Create solib objects from rocm_so objects in SOS.  */
 
 static owning_intrusive_list<solib>
-so_list_from_rocm_sos (const std::vector<rocm_so> &sos)
+solibs_from_rocm_sos (const std::vector<rocm_so> &sos)
 {
   owning_intrusive_list<solib> dst;
 
@@ -236,13 +236,13 @@ rocm_solib_current_sos ()
   if (dev_sos.empty ())
     return sos;
 
-  owning_intrusive_list<solib> dev_so_list = so_list_from_rocm_sos (dev_sos);
+  owning_intrusive_list<solib> dev_solibs = solibs_from_rocm_sos (dev_sos);
 
   if (sos.empty ())
-    return dev_so_list;
+    return dev_solibs;
 
   /* Append our libraries to the end of the list.  */
-  sos.splice (std::move (dev_so_list));
+  sos.splice (std::move (dev_solibs));
 
   return sos;
 }
index 6a1cc10f0f6dec1661e97d4c1cdc359b239ab3a2..4c0a8a1246ec885a2fb68be2213ddf1b23e53d46 100644 (file)
@@ -1046,10 +1046,10 @@ svr4_clear_so (const solib &so)
     li->l_addr_p = 0;
 }
 
-/* Create the so_list objects equivalent to the svr4_sos in SOS.  */
+/* Create the solib objects equivalent to the svr4_sos in SOS.  */
 
 static owning_intrusive_list<solib>
-so_list_from_svr4_sos (const std::vector<svr4_so> &sos)
+solib_from_svr4_sos (const std::vector<svr4_so> &sos)
 {
   owning_intrusive_list<solib> dst;
 
@@ -1176,11 +1176,10 @@ static const struct gdb_xml_element svr4_library_list_elements[] =
   { NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL }
 };
 
-/* Parse qXfer:libraries:read packet into *SO_LIST_RETURN.  Return 1 if
+/* Parse qXfer:libraries:read packet into *LIST.
 
-   Return 0 if packet not supported, *SO_LIST_RETURN is not modified in such
-   case.  Return 1 if *SO_LIST_RETURN contains the library list, it may be
-   empty, caller is responsible for freeing all its entries.  */
+   Return 0 if packet not supported, *LIST is not modified in such case.
+   Return 1 if *LIST contains the library list.  */
 
 static int
 svr4_parse_libraries (const char *document, struct svr4_library_list *list)
@@ -1202,11 +1201,11 @@ svr4_parse_libraries (const char *document, struct svr4_library_list *list)
   return 0;
 }
 
-/* Attempt to get so_list from target via qXfer:libraries-svr4:read packet.
+/* Attempt to get the shared object list from target via
+   qXfer:libraries-svr4:read packet.
 
-   Return 0 if packet not supported, *SO_LIST_RETURN is not modified in such
-   case.  Return 1 if *SO_LIST_RETURN contains the library list, it may be
-   empty, caller is responsible for freeing all its entries.
+   Return 0 if packet not supported, *LIST is not modified in such case.
+   Return 1 if *LIST contains the library list.
 
    Note that ANNEX must be NULL if the remote does not explicitly allow
    qXfer:libraries-svr4:read packets with non-empty annexes.  Support for
@@ -1450,7 +1449,7 @@ svr4_collect_probes_sos (svr4_info *info)
   for (const auto &tuple : info->solib_lists)
     {
       const std::vector<svr4_so> &sos = tuple.second;
-      res.splice (so_list_from_svr4_sos (sos));
+      res.splice (solib_from_svr4_sos (sos));
     }
 
   return res;
index e59c8e4a4993ca074b3493663bf1b90aaccf37ab..d75d731d0aeb0d27b7c37130655b6c73f5da720b 100644 (file)
@@ -27,7 +27,7 @@ struct solib_ops;
 
 extern const solib_ops svr4_so_ops;
 
-/* Link map info to include in an allocated so_list entry.  */
+/* Link map info to include in an allocated solib entry.  */
 
 struct lm_info_svr4 final : public lm_info
 {
index 42979323c83da639cc318638ad61baac3e507ce8..384282441e4be96cc78be47acb35a6c10d23366e 100644 (file)
@@ -30,7 +30,7 @@
 struct lm_info_target final : public lm_info
 {
   /* The library's name.  The name is normally kept in the struct
-     so_list; it is only here during XML parsing.  */
+     solib; it is only here during XML parsing.  */
   std::string name;
 
   /* The target can either specify segment bases or section bases, not
index 1c267cf973f8d64caefb6a408d2419dec45e427f..269482d28debc5b0f072063a56204176bc86b6c8 100644 (file)
@@ -1480,7 +1480,7 @@ reload_shared_libraries (const char *ignored, int from_tty,
   if (target_has_execution ())
     {
       /* Reset or free private data structures not associated with
-        so_list entries.  */
+        solib entries.  */
       if (ops->clear_solib != nullptr)
        ops->clear_solib (current_program_space);
 
index 360b6ef72db2c46d839a9632bae101d810182921..e10f7cf6c7a1b9403a0d2d778f1bf3c93cae6b0e 100644 (file)
@@ -89,7 +89,8 @@ extern void no_shared_libraries (program_space *pspace);
    Extract the list of currently loaded shared objects from the
    inferior, and compare it with the list of shared objects in the
    current program space's list of shared libraries.  Edit
-   so_list_head to bring it in sync with the inferior's new list.
+   the current program space's solib list to bring it in sync with the
+   inferior's new list.
 
    If we notice that the inferior has unloaded some shared objects,
    free any symbolic info GDB had read about those shared objects.
index 20ec5a380e51457a7cbe729e5b631eb6a0635ea9..fa5e4ffbd1b4e1bf0b403d5da948003a0c6243d4 100644 (file)
@@ -109,7 +109,7 @@ struct solib_ops
   void (*clear_so) (const solib &so);
 
   /* Free private data structures associated to PSPACE.  This method
-     should not free resources associated to individual so_list entries,
+     should not free resources associated to individual solib entries,
      those are cleared by the clear_so method.  */
   void (*clear_solib) (program_space *pspace);
 
@@ -136,7 +136,7 @@ struct solib_ops
   /* Find and open shared library binary file.  */
   gdb_bfd_ref_ptr (*bfd_open) (const char *pathname);
 
-  /* Given two so_list objects, one from the GDB thread list
+  /* Given two solib objects, one from the GDB thread list
      and another from the list returned by current_sos, return 1
      if they represent the same library.
      Falls back to using strcmp on ORIGINAL_NAME when set to nullptr.  */
@@ -199,7 +199,7 @@ struct solib_ops
   std::vector<const solib *> (*get_solibs_in_ns) (int ns);
 };
 
-/* A unique pointer to a so_list.  */
+/* A unique pointer to an solib.  */
 using solib_up = std::unique_ptr<solib>;
 
 /* Find main executable binary file.  */