]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/dwarf: rename cooked_index_worker subclasses
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 12 Feb 2025 15:52:52 +0000 (10:52 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Fri, 14 Feb 2025 18:17:35 +0000 (13:17 -0500)
Rename them to include "worker" in the name.  Otherwise, it's easy to be
confused and think that they are sub-classes of "cooked_index".

Change-Id: I625ef076f9485f3873db530493f60a53d02c1991
Approved-By: Tom Tromey <tom@tromey.com>
gdb/dwarf2/read-debug-names.c
gdb/dwarf2/read.c

index fe31a58d743ea776cbee8f0e0b910edbbf401c34..4447c5c240a9a4e90ab29d3d57175899b4220ab7 100644 (file)
@@ -383,9 +383,9 @@ mapped_debug_names_reader::scan_all_names ()
 
 /* A reader for .debug_names.  */
 
-struct cooked_index_debug_names : public cooked_index_worker
+struct cooked_index_worker_debug_names : public cooked_index_worker
 {
-  cooked_index_debug_names (dwarf2_per_objfile *per_objfile,
+  cooked_index_worker_debug_names (dwarf2_per_objfile *per_objfile,
                            mapped_debug_names_reader &&map)
     : cooked_index_worker (per_objfile),
       m_map (std::move (map))
@@ -397,7 +397,7 @@ struct cooked_index_debug_names : public cooked_index_worker
 };
 
 void
-cooked_index_debug_names::do_reading ()
+cooked_index_worker_debug_names::do_reading ()
 {
   complaint_interceptor complaint_handler;
   std::vector<gdb_exception> exceptions;
@@ -844,7 +844,7 @@ do_dwarf2_read_debug_names (dwarf2_per_objfile *per_objfile)
      get searched by cooked_index.  */
   map.shards[0]->install_addrmap (&addrmap);
 
-  auto cidn = (std::make_unique<cooked_index_debug_names>
+  auto cidn = (std::make_unique<cooked_index_worker_debug_names>
               (per_objfile, std::move (map)));
   auto idx = std::make_unique<debug_names_index> (per_objfile,
                                                  std::move (cidn));
index 9b10c7fb8f5a8de38b286729bc04eb34ce90b7ae..738dd5af52b7ba714355f38d1ee3e18b8a1d31ac 100644 (file)
@@ -4118,10 +4118,10 @@ process_skeletonless_type_units (dwarf2_per_objfile *per_objfile,
 /* A subclass of cooked_index_worker that handles scanning
    .debug_info.  */
 
-class cooked_index_debug_info : public cooked_index_worker
+class cooked_index_worker_debug_info : public cooked_index_worker
 {
 public:
-  cooked_index_debug_info (dwarf2_per_objfile *per_objfile)
+  cooked_index_worker_debug_info (dwarf2_per_objfile *per_objfile)
     : cooked_index_worker (per_objfile)
   {
     gdb_assert (is_main_thread ());
@@ -4170,7 +4170,7 @@ private:
 };
 
 void
-cooked_index_debug_info::process_cus (size_t task_number, unit_iterator first,
+cooked_index_worker_debug_info::process_cus (size_t task_number, unit_iterator first,
                                      unit_iterator end)
 {
   SCOPE_EXIT { bfd_thread_cleanup (); };
@@ -4200,7 +4200,7 @@ cooked_index_debug_info::process_cus (size_t task_number, unit_iterator first,
 }
 
 void
-cooked_index_debug_info::done_reading ()
+cooked_index_worker_debug_info::done_reading ()
 {
   /* Only handle the scanning results here.  Complaints and exceptions
      can only be dealt with on the main thread.  */
@@ -4229,7 +4229,7 @@ cooked_index_debug_info::done_reading ()
 }
 
 void
-cooked_index_debug_info::do_reading ()
+cooked_index_worker_debug_info::do_reading ()
 {
   dwarf2_per_bfd *per_bfd = m_per_objfile->per_bfd;
 
@@ -16351,7 +16351,7 @@ start_debug_info_reader (dwarf2_per_objfile *per_objfile)
      scanning; and then start the scanning.  */
   dwarf2_per_bfd *per_bfd = per_objfile->per_bfd;
   std::unique_ptr<cooked_index_worker> worker
-    = std::make_unique<cooked_index_debug_info> (per_objfile);
+    = std::make_unique<cooked_index_worker_debug_info> (per_objfile);
   per_bfd->start_reading (std::make_unique<cooked_index> (per_objfile,
                                                          std::move (worker)));
 }