summaryrefslogtreecommitdiff
path: root/gdb/gcore.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gcore.c')
-rw-r--r--gdb/gcore.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/gcore.c b/gdb/gcore.c
index 973abadb013..05cad94526e 100644
--- a/gdb/gcore.c
+++ b/gdb/gcore.c
@@ -406,10 +406,9 @@ gcore_create_callback (CORE_ADDR vaddr, unsigned long size, int read,
{
/* See if this region of memory lies inside a known file on disk.
If so, we can avoid copying its contents by clearing SEC_LOAD. */
- struct obj_section *objsec;
for (objfile *objfile : current_program_space->objfiles ())
- ALL_OBJFILE_OSECTIONS (objfile, objsec)
+ for (obj_section *objsec : objfile->sections ())
{
bfd *abfd = objfile->obfd.get ();
asection *asec = objsec->the_bfd_section;
@@ -513,12 +512,11 @@ objfile_find_memory_regions (struct target_ops *self,
find_memory_region_ftype func, void *obfd)
{
/* Use objfile data to create memory sections. */
- struct obj_section *objsec;
bfd_vma temp_bottom, temp_top;
/* Call callback function for each objfile section. */
for (objfile *objfile : current_program_space->objfiles ())
- ALL_OBJFILE_OSECTIONS (objfile, objsec)
+ for (obj_section *objsec : objfile->sections ())
{
asection *isec = objsec->the_bfd_section;
flagword flags = bfd_section_flags (isec);