diff options
author | Tom Tromey <tom@tromey.com> | 2020-09-19 11:54:49 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-09-19 11:54:49 -0600 |
commit | cafb0d81315ed3f8b4756a30e0c58fd73c161015 (patch) | |
tree | 54f9974e6117b5c4e63d3e12c809b8339f06eca4 /gdb/gdb_bfd.h | |
parent | c8d5abea3d9ad20efb2198ec1b639b8e4dc4d8d3 (diff) | |
download | gdb-cafb0d81315ed3f8b4756a30e0c58fd73c161015.zip gdb-cafb0d81315ed3f8b4756a30e0c58fd73c161015.tar.gz gdb-cafb0d81315ed3f8b4756a30e0c58fd73c161015.tar.bz2 |
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 <tom@tromey.com>
* gdb_bfd.h (gdb_bfd_sections): New overload. Fix formatting of
existing function.
Diffstat (limited to 'gdb/gdb_bfd.h')
-rw-r--r-- | gdb/gdb_bfd.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/gdb_bfd.h b/gdb/gdb_bfd.h index 0f45056..1233097 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<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 */ |