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/gcore.c | |
parent | 9ed8433a04bf0430e2da3cd44c18667859782410 (diff) | |
download | gdb-5250cbc85cbbf13221ed508c1b89f1ee0a6ac1ec.zip gdb-5250cbc85cbbf13221ed508c1b89f1ee0a6ac1ec.tar.gz 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/gcore.c')
-rw-r--r-- | gdb/gcore.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/gcore.c b/gdb/gcore.c index 973abad..05cad94 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); |