+2020-09-19 Tom Tromey <tom@tromey.com>
+
+ * gcore.c (make_output_phdrs): Remove 'ignored' parameter.
+ (gcore_copy_callback): Likewise.
+ (gcore_memory_sections): Use foreach.
+
2020-09-19 Tom Tromey <tom@tromey.com>
* osabi.h (generic_elf_osabi_sniff_abi_tag_sections): Update.
}
static void
-make_output_phdrs (bfd *obfd, asection *osec, void *ignored)
+make_output_phdrs (bfd *obfd, asection *osec)
{
int p_flags = 0;
int p_type = 0;
}
static void
-gcore_copy_callback (bfd *obfd, asection *osec, void *ignored)
+gcore_copy_callback (bfd *obfd, asection *osec)
{
bfd_size_type size, total_size = bfd_section_size (osec);
file_ptr offset = 0;
}
/* Record phdrs for section-to-segment mapping. */
- bfd_map_over_sections (obfd, make_output_phdrs, NULL);
+ for (asection *sect : gdb_bfd_sections (obfd))
+ make_output_phdrs (obfd, sect);
/* Copy memory region contents. */
- bfd_map_over_sections (obfd, gcore_copy_callback, NULL);
+ for (asection *sect : gdb_bfd_sections (obfd))
+ gcore_copy_callback (obfd, sect);
return 1;
}