gdb: remove `other` parameter in read_core_file_mappings parameter
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 19 Nov 2020 15:34:57 +0000 (10:34 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Thu, 19 Nov 2020 15:34:57 +0000 (10:34 -0500)
The `void *other` parameter in read_core_file_mappings' loop_cb
parameter is never used, remove it.

gdb/ChangeLog:

* gdbarch.sh (read_core_file_mappings): Remove `other` parameter
in `loop_cb` parameter.
* gdbarch.c: Re-generate.
* gdbarch.h: Re-generate.
* arch-utils.c (default_read_core_file_mappings): Remove `other`
parameter.
* arch-utils.h (default_read_core_file_mappings): Likewise.
* corelow.c (core_target::build_file_mappings): Likewise.
* linux-tdep.c (linux_read_core_file_mappings): Likewise.
(linux_core_info_proc_mappings): Likewise.

Change-Id: I6f408b4962b61b8a603642a844772b3026625523

gdb/ChangeLog
gdb/arch-utils.c
gdb/arch-utils.h
gdb/corelow.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/linux-tdep.c

index b839159b2b2d3178f43f1371d8073c7b62da1af0..d0a0031a538d35aff46f6aaf6ef64763ed0d801b 100644 (file)
@@ -1,3 +1,16 @@
+2020-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * gdbarch.sh (read_core_file_mappings): Remove `other` parameter
+       in `loop_cb` parameter.
+       * gdbarch.c: Re-generate.
+       * gdbarch.h: Re-generate.
+       * arch-utils.c (default_read_core_file_mappings): Remove `other`
+       parameter.
+       * arch-utils.h (default_read_core_file_mappings): Likewise.
+       * corelow.c (core_target::build_file_mappings): Likewise.
+       * linux-tdep.c (linux_read_core_file_mappings): Likewise.
+       (linux_core_info_proc_mappings): Likewise.
+
 2020-11-19  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * Makefile.in (HFILES_NO_SRCDIR): Add f-array-walker.h.
index e50df82091972ecc5bf61ea7bd75ec7c5b351bce..2786544d22d973a5c73d82ec39e6509d40b5c764 100644 (file)
@@ -1045,8 +1045,7 @@ default_read_core_file_mappings (struct gdbarch *gdbarch,
                                                          ULONGEST start,
                                                          ULONGEST end,
                                                          ULONGEST file_ofs,
-                                                         const char *filename,
-                                                         const void *other)>
+                                                         const char *filename)>
                                   loop_cb)
 {
 }
index 7eea838ac3de5a7143ae2bd7a718445764661e2a..c9589e1f3adab681982f30f273d2a3ba90bd9487 100644 (file)
@@ -287,7 +287,6 @@ extern void default_read_core_file_mappings (struct gdbarch *gdbarch,
                                                                      ULONGEST start,
                                                                      ULONGEST end,
                                                                      ULONGEST file_ofs,
-                                                                     const char *filename,
-                                                                     const void *other)>
+                                                                     const char *filename)>
                                               loop_cb);
 #endif /* ARCH_UTILS_H */
index aef1a02e5d87b332ab23802c0881affce43a51bf..4c1f068053d85611fd2891030268f92d61b79dc6 100644 (file)
@@ -199,7 +199,7 @@ core_target::build_file_mappings ()
     /* read_core_file_mappings will invoke this lambda for each mapping
        that it finds.  */
     [&] (int num, ULONGEST start, ULONGEST end, ULONGEST file_ofs,
-        const char *filename, const void *other)
+        const char *filename)
       {
        /* Architecture-specific read_core_mapping methods are expected to
           weed out non-file-backed mappings.  */
index 0b43ae434ea9cff6f0e08ede4cbdc4e8d8a8a10a..cd9341132ef1a883dcb4d7d117d7bfb4331cf9b3 100644 (file)
@@ -5189,7 +5189,7 @@ set_gdbarch_get_pc_address_flags (struct gdbarch *gdbarch,
 }
 
 void
-gdbarch_read_core_file_mappings (struct gdbarch *gdbarch, struct bfd *cbfd,gdb::function_view<void (ULONGEST count)> pre_loop_cb,gdb::function_view<void (int num, ULONGEST start, ULONGEST end, ULONGEST file_ofs, const char *filename, const void *other)> loop_cb)
+gdbarch_read_core_file_mappings (struct gdbarch *gdbarch, struct bfd *cbfd, gdb::function_view<void (ULONGEST count)> pre_loop_cb, gdb::function_view<void (int num, ULONGEST start, ULONGEST end, ULONGEST file_ofs, const char *filename)> loop_cb)
 {
   gdb_assert (gdbarch != NULL);
   gdb_assert (gdbarch->read_core_file_mappings != NULL);
index b620bb25b9014aaf65c5da30879a26a3d1806b9f..70bd8a6b442834d80c0b38bd33f926137d6b8277 100644 (file)
@@ -1634,8 +1634,8 @@ extern void set_gdbarch_get_pc_address_flags (struct gdbarch *gdbarch, gdbarch_g
 
 /* Read core file mappings */
 
-typedef void (gdbarch_read_core_file_mappings_ftype) (struct gdbarch *gdbarch, struct bfd *cbfd,gdb::function_view<void (ULONGEST count)> pre_loop_cb,gdb::function_view<void (int num, ULONGEST start, ULONGEST end, ULONGEST file_ofs, const char *filename, const void *other)> loop_cb);
-extern void gdbarch_read_core_file_mappings (struct gdbarch *gdbarch, struct bfd *cbfd,gdb::function_view<void (ULONGEST count)> pre_loop_cb,gdb::function_view<void (int num, ULONGEST start, ULONGEST end, ULONGEST file_ofs, const char *filename, const void *other)> loop_cb);
+typedef void (gdbarch_read_core_file_mappings_ftype) (struct gdbarch *gdbarch, struct bfd *cbfd, gdb::function_view<void (ULONGEST count)> pre_loop_cb, gdb::function_view<void (int num, ULONGEST start, ULONGEST end, ULONGEST file_ofs, const char *filename)> loop_cb);
+extern void gdbarch_read_core_file_mappings (struct gdbarch *gdbarch, struct bfd *cbfd, gdb::function_view<void (ULONGEST count)> pre_loop_cb, gdb::function_view<void (int num, ULONGEST start, ULONGEST end, ULONGEST file_ofs, const char *filename)> loop_cb);
 extern void set_gdbarch_read_core_file_mappings (struct gdbarch *gdbarch, gdbarch_read_core_file_mappings_ftype *read_core_file_mappings);
 
 extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
index d27318a757c78ac39e615fcb90ce6fb40107551a..86f2c798e32b97b320489ff8d4f15ffe04cb4e53 100755 (executable)
@@ -1178,7 +1178,7 @@ m;ULONGEST;type_align;struct type *type;type;;default_type_align;;0
 f;std::string;get_pc_address_flags;frame_info *frame, CORE_ADDR pc;frame, pc;;default_get_pc_address_flags;;0
 
 # Read core file mappings
-m;void;read_core_file_mappings;struct bfd *cbfd,gdb::function_view<void (ULONGEST count)> pre_loop_cb,gdb::function_view<void (int num, ULONGEST start, ULONGEST end, ULONGEST file_ofs, const char *filename, const void *other)> loop_cb;cbfd, pre_loop_cb, loop_cb;;default_read_core_file_mappings;;0
+m;void;read_core_file_mappings;struct bfd *cbfd, gdb::function_view<void (ULONGEST count)> pre_loop_cb, gdb::function_view<void (int num, ULONGEST start, ULONGEST end, ULONGEST file_ofs, const char *filename)> loop_cb;cbfd, pre_loop_cb, loop_cb;;default_read_core_file_mappings;;0
 
 EOF
 }
index 8f7bbd5c23490393a939ba51399c73988c3a1b68..a651d1b26517cd65fa15390e25d80f4c1630d2a9 100644 (file)
@@ -1072,8 +1072,7 @@ linux_read_core_file_mappings (struct gdbarch *gdbarch,
                                                        ULONGEST start,
                                                        ULONGEST end,
                                                        ULONGEST file_ofs,
-                                                       const char *filename,
-                                                       const void *other)>
+                                                       const char *filename)>
                                 loop_cb)
 {
   /* Ensure that ULONGEST is big enough for reading 64-bit core files.  */
@@ -1157,7 +1156,7 @@ linux_read_core_file_mappings (struct gdbarch *gdbarch,
       char * filename = filenames;
       filenames += strlen ((char *) filenames) + 1;
 
-      loop_cb (i, start, end, file_ofs, filename, nullptr);
+      loop_cb (i, start, end, file_ofs, filename);
     }
 }
 
@@ -1186,7 +1185,7 @@ linux_core_info_proc_mappings (struct gdbarch *gdbarch, const char *args)
          }
       },
     [=] (int num, ULONGEST start, ULONGEST end, ULONGEST file_ofs,
-        const char *filename, const void *other)
+        const char *filename)
       {
        if (gdbarch_addr_bit (gdbarch) == 32)
          printf_filtered ("\t%10s %10s %10s %10s %s\n",