diff options
author | Tom Tromey <tom@tromey.com> | 2023-04-10 10:43:32 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-05-07 12:44:17 -0600 |
commit | 5250cbc85cbbf13221ed508c1b89f1ee0a6ac1ec (patch) | |
tree | 36230d533899f8a7459c129e1691944d82209b99 /gdb/z80-tdep.c | |
parent | 9ed8433a04bf0430e2da3cd44c18667859782410 (diff) | |
download | fsf-binutils-gdb-5250cbc85cbbf13221ed508c1b89f1ee0a6ac1ec.zip fsf-binutils-gdb-5250cbc85cbbf13221ed508c1b89f1ee0a6ac1ec.tar.gz fsf-binutils-gdb-5250cbc85cbbf13221ed508c1b89f1ee0a6ac1ec.tar.bz2 |
Remove ALL_OBJFILE_OSECTIONS
This replaces ALL_OBJFILE_OSECTIONS with an iterator so that for-each
can be used.
Diffstat (limited to 'gdb/z80-tdep.c')
-rw-r--r-- | gdb/z80-tdep.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/z80-tdep.c b/gdb/z80-tdep.c index 27cdca1..4f3ad54 100644 --- a/gdb/z80-tdep.c +++ b/gdb/z80-tdep.c @@ -962,11 +962,11 @@ z80_overlay_update_1 (struct obj_section *osect) /* we have interest for sections with same VMA */ for (objfile *objfile : current_program_space->objfiles ()) - ALL_OBJFILE_OSECTIONS (objfile, osect) - if (section_is_overlay (osect)) + for (obj_section *sect : objfile->sections ()) + if (section_is_overlay (sect)) { - osect->ovly_mapped = (lma == bfd_section_lma (osect->the_bfd_section)); - i |= osect->ovly_mapped; /* true, if at least one section is mapped */ + sect->ovly_mapped = (lma == bfd_section_lma (sect->the_bfd_section)); + i |= sect->ovly_mapped; /* true, if at least one section is mapped */ } return i; } @@ -985,18 +985,18 @@ z80_overlay_update (struct obj_section *osect) /* Update all sections, even if only one was requested. */ for (objfile *objfile : current_program_space->objfiles ()) - ALL_OBJFILE_OSECTIONS (objfile, osect) + for (obj_section *sect : objfile->sections ()) { - if (!section_is_overlay (osect)) + if (!section_is_overlay (sect)) continue; - asection *bsect = osect->the_bfd_section; + asection *bsect = sect->the_bfd_section; bfd_vma lma = bfd_section_lma (bsect); bfd_vma vma = bfd_section_vma (bsect); for (int i = 0; i < cache_novly_regions; ++i) if (cache_ovly_region_table[i][Z80_VMA] == vma) - osect->ovly_mapped = + sect->ovly_mapped = (cache_ovly_region_table[i][Z80_MAPPED_TO_LMA] == lma); } } |