aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-sde-tdep.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-09-19 11:54:49 -0600
committerTom Tromey <tom@tromey.com>2020-09-19 11:54:52 -0600
commitb35c1d1cf457db034186f321517eee69ef8457a5 (patch)
tree05dcbbd0e7f32f986369aad09b59bb770189f124 /gdb/mips-sde-tdep.c
parent5bb6e9dd7090cacb02bbe9f20d8b101a59a3bf99 (diff)
downloadgdb-b35c1d1cf457db034186f321517eee69ef8457a5.zip
gdb-b35c1d1cf457db034186f321517eee69ef8457a5.tar.gz
gdb-b35c1d1cf457db034186f321517eee69ef8457a5.tar.bz2
Use gdb_bfd_sections in ELF osabi tag sniffing
This changes some ELF osabi tag-sniffing functions to avoid bfd_map_over_sections, in favor of iteration. I could only readily test the generic one. gdb/ChangeLog 2020-09-19 Tom Tromey <tom@tromey.com> * osabi.h (generic_elf_osabi_sniff_abi_tag_sections): Update. * osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Change parameters. (generic_elf_osabi_sniffer): Use foreach. * mips-sde-tdep.c (mips_sde_elf_osabi_sniffer): Use foreach. * arm-tdep.c (arm_elf_osabi_sniffer): Use foreach.
Diffstat (limited to 'gdb/mips-sde-tdep.c')
-rw-r--r--gdb/mips-sde-tdep.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/mips-sde-tdep.c b/gdb/mips-sde-tdep.c
index 685c3c7..1d282c2 100644
--- a/gdb/mips-sde-tdep.c
+++ b/gdb/mips-sde-tdep.c
@@ -226,9 +226,8 @@ mips_sde_elf_osabi_sniffer (bfd *abfd)
/* If the generic sniffer gets a hit, return and let other sniffers
get a crack at it. */
- bfd_map_over_sections (abfd,
- generic_elf_osabi_sniff_abi_tag_sections,
- &osabi);
+ for (asection *sect : gdb_bfd_sections (abfd))
+ generic_elf_osabi_sniff_abi_tag_sections (abfd, sect, &osabi);
if (osabi != GDB_OSABI_UNKNOWN)
return GDB_OSABI_UNKNOWN;