]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add a new overload of gdb_bfd_sections
authorTom Tromey <tom@tromey.com>
Sat, 19 Sep 2020 17:54:49 +0000 (11:54 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 19 Sep 2020 17:54:49 +0000 (11:54 -0600)
This adds a new overload of gdb_bfd_sections, that accepts a
gdb_bfd_ref_ptr.  This also fixes the formatting of the existing
function, since I happened to notice it was mildly off.

gdb/ChangeLog
2020-09-19  Tom Tromey  <tom@tromey.com>

* gdb_bfd.h (gdb_bfd_sections): New overload.  Fix formatting of
existing function.

gdb/ChangeLog
gdb/gdb_bfd.h

index c1d7deab0674f4c38717f830914fe2384eef0c35..16317fb017da0f721640c6095177e14858e0bc6f 100644 (file)
@@ -1,3 +1,8 @@
+2020-09-19  Tom Tromey  <tom@tromey.com>
+
+       * gdb_bfd.h (gdb_bfd_sections): New overload.  Fix formatting of
+       existing function.
+
 2020-09-19  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * f-valprint.c (f77_print_array_1): Adjust printing of whitespace
index 0f450567d50eb1dbd97c021ddec7f4a0d945a735..123309708736cda6c140ffb1f50882e00775fa58 100644 (file)
@@ -205,10 +205,16 @@ bool gdb_bfd_get_full_section_contents (bfd *abfd, asection *section,
 using gdb_bfd_section_iterator = next_iterator<asection>;
 using gdb_bfd_section_range = next_adapter<asection, gdb_bfd_section_iterator>;
 
-static inline
-gdb_bfd_section_range gdb_bfd_sections (bfd *abfd)
+static inline gdb_bfd_section_range
+gdb_bfd_sections (bfd *abfd)
 {
   return gdb_bfd_section_range (abfd->sections);
 }
 
+static inline gdb_bfd_section_range
+gdb_bfd_sections (const gdb_bfd_ref_ptr &abfd)
+{
+  return gdb_bfd_section_range (abfd->sections);
+};
+
 #endif /* GDB_BFD_H */