This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] Remove some uses of "object_files"


On 2019-04-09 2:09 p.m., Tom Tromey wrote:
> The "object_files" macro is sometimes used when iterating over
> objfiles.  This patch removes a few such uses in favor of the new
> range adapter.
> 
> gdb/ChangeLog
> 2019-04-09  Tom Tromey  <tom@tromey.com>
> 
> 	* ia64-tdep.c (ia64_get_dyn_info_list): Use foreach.
> 	* minsyms.c (lookup_minimal_symbol): Use foreach.
> 	(lookup_minimal_symbol_text, lookup_minimal_symbol_by_pc_name)
> 	(lookup_minimal_symbol_solib_trampoline): Likewise.
> 	* symfile.c (reread_symbols): Use foreach.

LGTM.  I would even suggest replacing the remaining few instances of object_files
with current_program_space->objfiles_head and removing the macro completely.

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]