From cafb0d81315ed3f8b4756a30e0c58fd73c161015 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 19 Sep 2020 11:54:49 -0600 Subject: [PATCH] Add a new overload of gdb_bfd_sections 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 * gdb_bfd.h (gdb_bfd_sections): New overload. Fix formatting of existing function. --- gdb/ChangeLog | 5 +++++ gdb/gdb_bfd.h | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c1d7deab067..16317fb017d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-09-19 Tom Tromey + + * gdb_bfd.h (gdb_bfd_sections): New overload. Fix formatting of + existing function. + 2020-09-19 Andrew Burgess * f-valprint.c (f77_print_array_1): Adjust printing of whitespace diff --git a/gdb/gdb_bfd.h b/gdb/gdb_bfd.h index 0f450567d50..12330970873 100644 --- a/gdb/gdb_bfd.h +++ b/gdb/gdb_bfd.h @@ -205,10 +205,16 @@ bool gdb_bfd_get_full_section_contents (bfd *abfd, asection *section, using gdb_bfd_section_iterator = next_iterator; using gdb_bfd_section_range = next_adapter; -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 */ -- 2.30.2