aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-05-03 17:21:36 -0600
committerTom Tromey <tom@tromey.com>2019-05-03 18:06:37 -0600
commitbde09ab7026edf3d79122872b79c6a8f164ee0ff (patch)
tree91a38f83fae1479191910c9ed6393c5c9076b6a0 /gdb/objfiles.c
parentb5d5eb444b6443855d65f73ea6b6623f5fbdaa0e (diff)
downloadfsf-binutils-gdb-bde09ab7026edf3d79122872b79c6a8f164ee0ff.zip
fsf-binutils-gdb-bde09ab7026edf3d79122872b79c6a8f164ee0ff.tar.gz
fsf-binutils-gdb-bde09ab7026edf3d79122872b79c6a8f164ee0ff.tar.bz2
Remove "struct" from foreach statements
Some versions of gcc have a bug that causes for (struct mumble : something) ... to give a compiler error. We routinely work around this bug in gdb, but apparently had not done so in a while. This patch fixes the remaining known cases of this problem. gdb/ChangeLog 2019-05-03 Sandra Loosemore <sandra@codesourcery.com> Tom Tromey <tom@tromey.com> * dictionary.c (collate_pending_symbols_by_language): Remove "struct" from foreach. * symtab.c (lookup_global_symbol_from_objfile) (lookup_symbol_in_objfile_from_linkage_name): Remove "struct" from foreach. * ser-tcp.c (net_open): Remove "struct" from foreach. * objfiles.c (objfile_relocate, objfile_rebase) (objfile_has_symbols): Remove "struct" from foreach. * minsyms.c (lookup_minimal_symbol_by_pc_section): Remove "struct" from foreach. * dwarf2read.c (handle_struct_member_die): Remove "struct" from foreach. * darwin-nat.c (thread_info_from_private_thread_info): Remove "struct" from foreach. * ada-lang.c (create_excep_cond_exprs) (ada_exception_catchpoint_cond_string): Remove "struct" from foreach.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 1b0ea29..30823c2 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -864,7 +864,7 @@ objfile_relocate (struct objfile *objfile,
changed |= objfile_relocate1 (objfile, new_offsets);
- for (struct objfile *debug_objfile : objfile->separate_debug_objfiles ())
+ for (::objfile *debug_objfile : objfile->separate_debug_objfiles ())
{
if (debug_objfile == objfile)
continue;
@@ -919,7 +919,7 @@ objfile_rebase (struct objfile *objfile, CORE_ADDR slide)
{
int changed = 0;
- for (struct objfile *debug_objfile : objfile->separate_debug_objfiles ())
+ for (::objfile *debug_objfile : objfile->separate_debug_objfiles ())
changed |= objfile_rebase1 (debug_objfile, slide);
/* Relocate breakpoints as necessary, after things are relocated. */
@@ -960,7 +960,7 @@ objfile_has_full_symbols (struct objfile *objfile)
int
objfile_has_symbols (struct objfile *objfile)
{
- for (struct objfile *o : objfile->separate_debug_objfiles ())
+ for (::objfile *o : objfile->separate_debug_objfiles ())
if (objfile_has_partial_symbols (o) || objfile_has_full_symbols (o))
return 1;
return 0;