Remove most uses of ALL_OBJFILES
This removes most uses of ALL_OBJFILES, replacing them with ranged for loops. The remaining uses are all in macros, and will be removed in subsequent patches. gdb/ChangeLog 2019-01-09 Tom Tromey <tom@tromey.com> * symtab.c (iterate_over_symtabs, matching_obj_sections) (expand_symtab_containing_pc, lookup_static_symbol) (basic_lookup_transparent_type, find_pc_sect_compunit_symtab) (find_symbol_at_address, find_line_symtab, find_main_name): Use all_objfiles. * probe.c (find_probe_by_pc, collect_probes): Use all_objfiles. * breakpoint.c (create_overlay_event_breakpoint) (create_longjmp_master_breakpoint) (create_std_terminate_master_breakpoint) (create_exception_master_breakpoint): Use all_objfiles. * linux-thread-db.c (try_thread_db_load_from_pdir) (has_libpthread): Use all_objfiles. * ada-lang.c (add_nonlocal_symbols): Use all_objfiles. * linespec.c (iterate_over_all_matching_symtabs) (search_minsyms_for_name): Use all_objfiles. * maint.c (maintenance_info_sections): Use all_objfiles. * main.c (captured_main_1): Use all_objfiles. * spu-tdep.c (spu_objfile_from_frame): Use all_objfiles. * guile/scm-objfile.c (gdbscm_objfiles): Use all_objfiles. * guile/scm-pretty-print.c (ppscm_find_pretty_printer_from_objfiles): Use all_objfiles. * solib-spu.c (append_ocl_sos): Use all_objfiles. * symmisc.c (maintenance_print_symbols): Use all_objfiles. (maintenance_print_msymbols): Use all_objfiles. * source.c (select_source_symtab): Use all_objfiles. * jit.c (jit_find_objf_with_entry_addr): Use all_objfiles. * symfile.c (remove_symbol_file_command) (expand_symtabs_matching, map_symbol_filenames): Use all_objfiles. * ppc-linux-tdep.c (ppc_linux_spe_context_inferior_created): Use all_objfiles. * dwarf2-frame.c (dwarf2_frame_find_fde): Use all_objfiles. * objc-lang.c (find_methods): Use all_objfiles. * objfiles.c (have_partial_symbols, have_full_symbols) (have_minimal_symbols, qsort_cmp) (default_iterate_over_objfiles_in_search_order): Use all_objfiles. * hppa-tdep.c (find_unwind_entry): Use all_objfiles. * psymtab.c (maintenance_print_psymbols): Use all_objfiles. (maintenance_check_psymtabs): Use all_objfiles. (ALL_PSYMTABS): Remove. * compile/compile-object-run.c (do_module_cleanup): Use all_objfiles. * blockframe.c (find_pc_partial_function): Use all_objfiles. * cp-support.c (add_symbol_overload_list_qualified): Use all_objfiles. * windows-tdep.c (windows_iterate_over_objfiles_in_search_order): Use all_objfiles. * dwarf-index-write.c (save_gdb_index_command): Use all_objfiles. * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): Use all_objfiles. * python/py-objfile.c (objfpy_lookup_objfile_by_name) (objfpy_lookup_objfile_by_build_id): Use all_objfiles. * python/py-prettyprint.c (find_pretty_printer_from_objfiles): Uses all_objfiles. * solib.c (solib_read_symbols): Use all_objfiles
This commit is contained in:
parent
99d89cdea6
commit
aed57c5371
32 changed files with 619 additions and 614 deletions
|
@ -1,3 +1,62 @@
|
|||
2019-01-09 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* symtab.c (iterate_over_symtabs, matching_obj_sections)
|
||||
(expand_symtab_containing_pc, lookup_static_symbol)
|
||||
(basic_lookup_transparent_type, find_pc_sect_compunit_symtab)
|
||||
(find_symbol_at_address, find_line_symtab, find_main_name): Use
|
||||
all_objfiles.
|
||||
* probe.c (find_probe_by_pc, collect_probes): Use all_objfiles.
|
||||
* breakpoint.c (create_overlay_event_breakpoint)
|
||||
(create_longjmp_master_breakpoint)
|
||||
(create_std_terminate_master_breakpoint)
|
||||
(create_exception_master_breakpoint): Use all_objfiles.
|
||||
* linux-thread-db.c (try_thread_db_load_from_pdir)
|
||||
(has_libpthread): Use all_objfiles.
|
||||
* ada-lang.c (add_nonlocal_symbols): Use all_objfiles.
|
||||
* linespec.c (iterate_over_all_matching_symtabs)
|
||||
(search_minsyms_for_name): Use all_objfiles.
|
||||
* maint.c (maintenance_info_sections): Use all_objfiles.
|
||||
* main.c (captured_main_1): Use all_objfiles.
|
||||
* spu-tdep.c (spu_objfile_from_frame): Use all_objfiles.
|
||||
* guile/scm-objfile.c (gdbscm_objfiles): Use all_objfiles.
|
||||
* guile/scm-pretty-print.c
|
||||
(ppscm_find_pretty_printer_from_objfiles): Use all_objfiles.
|
||||
* solib-spu.c (append_ocl_sos): Use all_objfiles.
|
||||
* symmisc.c (maintenance_print_symbols): Use all_objfiles.
|
||||
(maintenance_print_msymbols): Use all_objfiles.
|
||||
* source.c (select_source_symtab): Use all_objfiles.
|
||||
* jit.c (jit_find_objf_with_entry_addr): Use all_objfiles.
|
||||
* symfile.c (remove_symbol_file_command)
|
||||
(expand_symtabs_matching, map_symbol_filenames): Use
|
||||
all_objfiles.
|
||||
* ppc-linux-tdep.c (ppc_linux_spe_context_inferior_created): Use
|
||||
all_objfiles.
|
||||
* dwarf2-frame.c (dwarf2_frame_find_fde): Use all_objfiles.
|
||||
* objc-lang.c (find_methods): Use all_objfiles.
|
||||
* objfiles.c (have_partial_symbols, have_full_symbols)
|
||||
(have_minimal_symbols, qsort_cmp)
|
||||
(default_iterate_over_objfiles_in_search_order): Use
|
||||
all_objfiles.
|
||||
* hppa-tdep.c (find_unwind_entry): Use all_objfiles.
|
||||
* psymtab.c (maintenance_print_psymbols): Use all_objfiles.
|
||||
(maintenance_check_psymtabs): Use all_objfiles.
|
||||
(ALL_PSYMTABS): Remove.
|
||||
* compile/compile-object-run.c (do_module_cleanup): Use
|
||||
all_objfiles.
|
||||
* blockframe.c (find_pc_partial_function): Use all_objfiles.
|
||||
* cp-support.c (add_symbol_overload_list_qualified): Use
|
||||
all_objfiles.
|
||||
* windows-tdep.c (windows_iterate_over_objfiles_in_search_order):
|
||||
Use all_objfiles.
|
||||
* dwarf-index-write.c (save_gdb_index_command): Use all_objfiles.
|
||||
* python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): Use
|
||||
all_objfiles.
|
||||
* python/py-objfile.c (objfpy_lookup_objfile_by_name)
|
||||
(objfpy_lookup_objfile_by_build_id): Use all_objfiles.
|
||||
* python/py-prettyprint.c (find_pretty_printer_from_objfiles):
|
||||
Uses all_objfiles.
|
||||
* solib.c (solib_read_symbols): Use all_objfiles
|
||||
|
||||
2019-01-09 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* probe.c (parse_probes_in_pspace): Use all_objfiles.
|
||||
|
|
|
@ -5604,7 +5604,6 @@ add_nonlocal_symbols (struct obstack *obstackp,
|
|||
const lookup_name_info &lookup_name,
|
||||
domain_enum domain, int global)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
struct compunit_symtab *cu;
|
||||
struct match_data data;
|
||||
|
||||
|
@ -5613,7 +5612,7 @@ add_nonlocal_symbols (struct obstack *obstackp,
|
|||
|
||||
bool is_wild_match = lookup_name.ada ().wild_match_p ();
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
data.objfile = objfile;
|
||||
|
||||
|
@ -5646,7 +5645,7 @@ add_nonlocal_symbols (struct obstack *obstackp,
|
|||
const char *name = ada_lookup_name (lookup_name);
|
||||
std::string name1 = std::string ("<_ada_") + name + '>';
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
data.objfile = objfile;
|
||||
objfile->sf->qf->map_matching_symbols (objfile, name1.c_str (),
|
||||
|
|
|
@ -217,7 +217,6 @@ find_pc_partial_function (CORE_ADDR pc, const char **name, CORE_ADDR *address,
|
|||
struct symbol *f;
|
||||
struct bound_minimal_symbol msymbol;
|
||||
struct compunit_symtab *compunit_symtab = NULL;
|
||||
struct objfile *objfile;
|
||||
CORE_ADDR mapped_pc;
|
||||
|
||||
/* To ensure that the symbol returned belongs to the correct setion
|
||||
|
@ -237,13 +236,14 @@ find_pc_partial_function (CORE_ADDR pc, const char **name, CORE_ADDR *address,
|
|||
goto return_cached_value;
|
||||
|
||||
msymbol = lookup_minimal_symbol_by_pc_section (mapped_pc, section);
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
if (objfile->sf)
|
||||
{
|
||||
compunit_symtab
|
||||
= objfile->sf->qf->find_pc_sect_compunit_symtab (objfile, msymbol,
|
||||
mapped_pc, section,
|
||||
mapped_pc,
|
||||
section,
|
||||
0);
|
||||
}
|
||||
if (compunit_symtab != NULL)
|
||||
|
|
|
@ -3203,10 +3203,9 @@ free_breakpoint_objfile_data (struct objfile *obj, void *data)
|
|||
static void
|
||||
create_overlay_event_breakpoint (void)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
const char *const func_name = "_ovly_debug_event";
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
struct breakpoint *b;
|
||||
struct breakpoint_objfile_data *bp_objfile_data;
|
||||
|
@ -3262,11 +3261,9 @@ create_longjmp_master_breakpoint (void)
|
|||
|
||||
ALL_PSPACES (pspace)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
|
||||
set_current_program_space (pspace);
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
int i;
|
||||
struct gdbarch *gdbarch;
|
||||
|
@ -3365,12 +3362,11 @@ create_std_terminate_master_breakpoint (void)
|
|||
|
||||
ALL_PSPACES (pspace)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
CORE_ADDR addr;
|
||||
|
||||
set_current_program_space (pspace);
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
struct breakpoint *b;
|
||||
struct breakpoint_objfile_data *bp_objfile_data;
|
||||
|
@ -3413,10 +3409,9 @@ create_std_terminate_master_breakpoint (void)
|
|||
static void
|
||||
create_exception_master_breakpoint (void)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
const char *const func_name = "_Unwind_DebugHook";
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
struct breakpoint *b;
|
||||
struct gdbarch *gdbarch;
|
||||
|
|
|
@ -62,7 +62,6 @@ static void
|
|||
do_module_cleanup (void *arg, int registers_valid)
|
||||
{
|
||||
struct do_module_cleanup *data = (struct do_module_cleanup *) arg;
|
||||
struct objfile *objfile;
|
||||
|
||||
if (data->executedp != NULL)
|
||||
{
|
||||
|
@ -83,7 +82,7 @@ do_module_cleanup (void *arg, int registers_valid)
|
|||
}
|
||||
}
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
if ((objfile->flags & OBJF_USERLOADED) == 0
|
||||
&& (strcmp (objfile_name (objfile), data->objfile_name_string) == 0))
|
||||
{
|
||||
|
|
|
@ -1374,16 +1374,15 @@ add_symbol_overload_list_qualified (const char *func_name,
|
|||
std::vector<symbol *> *overload_list)
|
||||
{
|
||||
struct compunit_symtab *cust;
|
||||
struct objfile *objfile;
|
||||
const struct block *b, *surrounding_static_block = 0;
|
||||
|
||||
/* Look through the partial symtabs for all symbols which begin by
|
||||
matching FUNC_NAME. Make sure we read that symbol table in. */
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objf : all_objfiles (current_program_space))
|
||||
{
|
||||
if (objfile->sf)
|
||||
objfile->sf->qf->expand_symtabs_for_function (objfile, func_name);
|
||||
if (objf->sf)
|
||||
objf->sf->qf->expand_symtabs_for_function (objf, func_name);
|
||||
}
|
||||
|
||||
/* Search upwards from currently selected frame (so that we can
|
||||
|
@ -1397,6 +1396,7 @@ add_symbol_overload_list_qualified (const char *func_name,
|
|||
/* Go through the symtabs and check the externs and statics for
|
||||
symbols which match. */
|
||||
|
||||
struct objfile *objfile;
|
||||
ALL_COMPUNITS (objfile, cust)
|
||||
{
|
||||
QUIT;
|
||||
|
|
|
@ -1640,7 +1640,6 @@ write_psymtabs_to_index (struct dwarf2_per_objfile *dwarf2_per_objfile,
|
|||
static void
|
||||
save_gdb_index_command (const char *arg, int from_tty)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
const char dwarf5space[] = "-dwarf-5 ";
|
||||
dw_index_kind index_kind = dw_index_kind::GDB_INDEX;
|
||||
|
||||
|
@ -1658,7 +1657,7 @@ save_gdb_index_command (const char *arg, int from_tty)
|
|||
if (!*arg)
|
||||
error (_("usage: save gdb-index [-dwarf-5] DIRECTORY"));
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
|
|
|
@ -1702,9 +1702,7 @@ bsearch_fde_cmp (const void *key, const void *element)
|
|||
static struct dwarf2_fde *
|
||||
dwarf2_frame_find_fde (CORE_ADDR *pc, CORE_ADDR *out_offset)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
struct dwarf2_fde_table *fde_table;
|
||||
struct dwarf2_fde **p_fde;
|
||||
|
|
|
@ -366,12 +366,11 @@ gdbscm_get_current_objfile (void)
|
|||
static SCM
|
||||
gdbscm_objfiles (void)
|
||||
{
|
||||
struct objfile *objf;
|
||||
SCM result;
|
||||
|
||||
result = SCM_EOL;
|
||||
|
||||
ALL_OBJFILES (objf)
|
||||
for (objfile *objf : all_objfiles (current_program_space))
|
||||
{
|
||||
SCM item = ofscm_scm_from_objfile (objf);
|
||||
|
||||
|
|
|
@ -427,12 +427,11 @@ ppscm_search_pp_list (SCM list, SCM value)
|
|||
static SCM
|
||||
ppscm_find_pretty_printer_from_objfiles (SCM value)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
objfile_smob *o_smob = ofscm_objfile_smob_from_objfile (objfile);
|
||||
SCM pp = ppscm_search_pp_list (ofscm_objfile_smob_pretty_printers (o_smob),
|
||||
SCM pp
|
||||
= ppscm_search_pp_list (ofscm_objfile_smob_pretty_printers (o_smob),
|
||||
value);
|
||||
|
||||
/* Note: This will return if pp is a <gdb:exception> object,
|
||||
|
|
|
@ -483,7 +483,6 @@ struct unwind_table_entry *
|
|||
find_unwind_entry (CORE_ADDR pc)
|
||||
{
|
||||
int first, middle, last;
|
||||
struct objfile *objfile;
|
||||
struct hppa_objfile_private *priv;
|
||||
|
||||
if (hppa_debug)
|
||||
|
@ -498,7 +497,7 @@ find_unwind_entry (CORE_ADDR pc)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
struct hppa_unwind_info *ui;
|
||||
ui = NULL;
|
||||
|
@ -552,7 +551,7 @@ find_unwind_entry (CORE_ADDR pc)
|
|||
else
|
||||
first = middle + 1;
|
||||
}
|
||||
} /* ALL_OBJFILES() */
|
||||
}
|
||||
|
||||
if (hppa_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "NULL (not found) }\n");
|
||||
|
|
|
@ -986,9 +986,7 @@ jit_unregister_code (struct objfile *objfile)
|
|||
static struct objfile *
|
||||
jit_find_objf_with_entry_addr (CORE_ADDR entry_addr)
|
||||
{
|
||||
struct objfile *objf;
|
||||
|
||||
ALL_OBJFILES (objf)
|
||||
for (objfile *objf : all_objfiles (current_program_space))
|
||||
{
|
||||
struct jit_objfile_data *objf_data;
|
||||
|
||||
|
|
|
@ -1130,7 +1130,6 @@ iterate_over_all_matching_symtabs
|
|||
struct program_space *search_pspace, bool include_inline,
|
||||
gdb::function_view<symbol_found_callback_ftype> callback)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
struct program_space *pspace;
|
||||
|
||||
ALL_PSPACES (pspace)
|
||||
|
@ -1142,7 +1141,7 @@ iterate_over_all_matching_symtabs
|
|||
|
||||
set_current_program_space (pspace);
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
struct compunit_symtab *cu;
|
||||
|
||||
|
@ -1157,7 +1156,8 @@ iterate_over_all_matching_symtabs
|
|||
{
|
||||
struct symtab *symtab = COMPUNIT_FILETABS (cu);
|
||||
|
||||
iterate_over_file_blocks (symtab, lookup_name, name_domain, callback);
|
||||
iterate_over_file_blocks (symtab, lookup_name, name_domain,
|
||||
callback);
|
||||
|
||||
if (include_inline)
|
||||
{
|
||||
|
@ -1170,7 +1170,8 @@ iterate_over_all_matching_symtabs
|
|||
{
|
||||
block = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (symtab), i);
|
||||
state->language->la_iterate_over_symbols
|
||||
(block, lookup_name, name_domain, [&] (block_symbol *bsym)
|
||||
(block, lookup_name, name_domain,
|
||||
[&] (block_symbol *bsym)
|
||||
{
|
||||
/* Restrict calls to CALLBACK to symbols
|
||||
representing inline symbols only. */
|
||||
|
@ -4351,8 +4352,6 @@ search_minsyms_for_name (struct collect_info *info,
|
|||
|
||||
ALL_PSPACES (pspace)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
|
||||
if (search_pspace != NULL && search_pspace != pspace)
|
||||
continue;
|
||||
if (pspace->executing_startup)
|
||||
|
@ -4360,7 +4359,7 @@ search_minsyms_for_name (struct collect_info *info,
|
|||
|
||||
set_current_program_space (pspace);
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
iterate_over_minimal_symbols (objfile, name,
|
||||
[&] (struct minimal_symbol *msym)
|
||||
|
|
|
@ -1053,12 +1053,10 @@ try_thread_db_load_from_pdir_1 (struct objfile *obj, const char *subdir)
|
|||
static int
|
||||
try_thread_db_load_from_pdir (const char *subdir)
|
||||
{
|
||||
struct objfile *obj;
|
||||
|
||||
if (!auto_load_thread_db)
|
||||
return 0;
|
||||
|
||||
ALL_OBJFILES (obj)
|
||||
for (objfile *obj : all_objfiles (current_program_space))
|
||||
if (libpthread_name_p (objfile_name (obj)))
|
||||
{
|
||||
if (try_thread_db_load_from_pdir_1 (obj, subdir))
|
||||
|
@ -1167,9 +1165,7 @@ thread_db_load_search (void)
|
|||
static int
|
||||
has_libpthread (void)
|
||||
{
|
||||
struct objfile *obj;
|
||||
|
||||
ALL_OBJFILES (obj)
|
||||
for (objfile *obj : all_objfiles (current_program_space))
|
||||
if (libpthread_name_p (objfile_name (obj)))
|
||||
return 1;
|
||||
|
||||
|
|
|
@ -485,7 +485,6 @@ captured_main_1 (struct captured_main_args *context)
|
|||
|
||||
int i;
|
||||
int save_auto_load;
|
||||
struct objfile *objfile;
|
||||
int ret = 1;
|
||||
|
||||
#ifdef HAVE_USEFUL_SBRK
|
||||
|
@ -1124,7 +1123,7 @@ captured_main_1 (struct captured_main_args *context)
|
|||
We wait until now because it is common to add to the source search
|
||||
path in local_gdbinit. */
|
||||
global_auto_load = save_auto_load;
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
load_auto_scripts_for_objfile (objfile);
|
||||
|
||||
/* Process '-x' and '-ex' options. */
|
||||
|
|
|
@ -348,7 +348,6 @@ maintenance_info_sections (const char *arg, int from_tty)
|
|||
printf_filtered (_("file type %s.\n"), bfd_get_target (exec_bfd));
|
||||
if (arg && *arg && match_substring (arg, "ALLOBJ"))
|
||||
{
|
||||
struct objfile *ofile;
|
||||
struct obj_section *osect;
|
||||
|
||||
/* Only this function cares about the 'ALLOBJ' argument;
|
||||
|
@ -358,7 +357,7 @@ maintenance_info_sections (const char *arg, int from_tty)
|
|||
if (strcmp (arg, "ALLOBJ") == 0)
|
||||
arg = NULL;
|
||||
|
||||
ALL_OBJFILES (ofile)
|
||||
for (objfile *ofile : all_objfiles (current_program_space))
|
||||
{
|
||||
printf_filtered (_(" Object file: %s\n"),
|
||||
bfd_get_filename (ofile->obfd));
|
||||
|
|
|
@ -972,8 +972,6 @@ find_methods (char type, const char *theclass, const char *category,
|
|||
const char *selector,
|
||||
std::vector<const char *> *symbol_names)
|
||||
{
|
||||
struct objfile *objfile = NULL;
|
||||
|
||||
const char *symname = NULL;
|
||||
|
||||
char ntype = '\0';
|
||||
|
@ -986,7 +984,7 @@ find_methods (char type, const char *theclass, const char *category,
|
|||
|
||||
gdb_assert (symbol_names != NULL);
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
unsigned int *objc_csym;
|
||||
struct minimal_symbol *msymbol = NULL;
|
||||
|
|
|
@ -1016,9 +1016,7 @@ objfile_has_symbols (struct objfile *objfile)
|
|||
int
|
||||
have_partial_symbols (void)
|
||||
{
|
||||
struct objfile *ofp;
|
||||
|
||||
ALL_OBJFILES (ofp)
|
||||
for (objfile *ofp : all_objfiles (current_program_space))
|
||||
{
|
||||
if (objfile_has_partial_symbols (ofp))
|
||||
return 1;
|
||||
|
@ -1033,9 +1031,7 @@ have_partial_symbols (void)
|
|||
int
|
||||
have_full_symbols (void)
|
||||
{
|
||||
struct objfile *ofp;
|
||||
|
||||
ALL_OBJFILES (ofp)
|
||||
for (objfile *ofp : all_objfiles (current_program_space))
|
||||
{
|
||||
if (objfile_has_full_symbols (ofp))
|
||||
return 1;
|
||||
|
@ -1072,9 +1068,7 @@ objfile_purge_solibs (void)
|
|||
int
|
||||
have_minimal_symbols (void)
|
||||
{
|
||||
struct objfile *ofp;
|
||||
|
||||
ALL_OBJFILES (ofp)
|
||||
for (objfile *ofp : all_objfiles (current_program_space))
|
||||
{
|
||||
if (ofp->per_bfd->minimal_symbol_count > 0)
|
||||
{
|
||||
|
@ -1145,9 +1139,7 @@ qsort_cmp (const void *a, const void *b)
|
|||
{
|
||||
/* Sort on sequence number of the objfile in the chain. */
|
||||
|
||||
const struct objfile *objfile;
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
if (objfile == objfile1)
|
||||
return -1;
|
||||
else if (objfile == objfile2)
|
||||
|
@ -1502,7 +1494,7 @@ shared_objfile_contains_address_p (struct program_space *pspace,
|
|||
}
|
||||
|
||||
/* The default implementation for the "iterate_over_objfiles_in_search_order"
|
||||
gdbarch method. It is equivalent to use the ALL_OBJFILES macro,
|
||||
gdbarch method. It is equivalent to use the all_objfiles iterable,
|
||||
searching the objfiles in the order they are stored internally,
|
||||
ignoring CURRENT_OBJFILE.
|
||||
|
||||
|
@ -1516,9 +1508,8 @@ default_iterate_over_objfiles_in_search_order
|
|||
void *cb_data, struct objfile *current_objfile)
|
||||
{
|
||||
int stop = 0;
|
||||
struct objfile *objfile;
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
stop = cb (objfile, cb_data);
|
||||
if (stop)
|
||||
|
|
|
@ -1788,10 +1788,8 @@ ppc_linux_spe_context_lookup (struct objfile *objfile)
|
|||
static void
|
||||
ppc_linux_spe_context_inferior_created (struct target_ops *t, int from_tty)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
|
||||
ppc_linux_spe_context_lookup (NULL);
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
ppc_linux_spe_context_lookup (objfile);
|
||||
}
|
||||
|
||||
|
|
|
@ -244,13 +244,12 @@ find_probes_in_objfile (struct objfile *objfile, const char *provider,
|
|||
struct bound_probe
|
||||
find_probe_by_pc (CORE_ADDR pc)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
struct bound_probe result;
|
||||
|
||||
result.objfile = NULL;
|
||||
result.prob = NULL;
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
if (!objfile->sf || !objfile->sf->sym_probe_fns
|
||||
|| objfile->sect_index_text == -1)
|
||||
|
@ -282,7 +281,6 @@ static std::vector<bound_probe>
|
|||
collect_probes (const std::string &objname, const std::string &provider,
|
||||
const std::string &probe_name, const static_probe_ops *spops)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
std::vector<bound_probe> result;
|
||||
gdb::optional<compiled_regex> obj_pat, prov_pat, probe_pat;
|
||||
|
||||
|
@ -296,7 +294,7 @@ collect_probes (const std::string &objname, const std::string &provider,
|
|||
obj_pat.emplace (objname.c_str (), REG_NOSUB,
|
||||
_("Invalid object file regexp"));
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
if (! objfile->sf || ! objfile->sf->sym_probe_fns)
|
||||
continue;
|
||||
|
|
|
@ -108,12 +108,6 @@ require_partial_symbols (struct objfile *objfile, int verbose)
|
|||
|
||||
#undef ALL_OBJFILE_PSYMTABS
|
||||
|
||||
/* Traverse all psymtabs in all objfiles. */
|
||||
|
||||
#define ALL_PSYMTABS(objfile, p) \
|
||||
ALL_OBJFILES (objfile) \
|
||||
ALL_OBJFILE_PSYMTABS_REQUIRED (objfile, p)
|
||||
|
||||
/* Helper function for psym_map_symtabs_matching_filename that
|
||||
expands the symtabs and calls the iterator. */
|
||||
|
||||
|
@ -1874,7 +1868,6 @@ maintenance_print_psymbols (const char *args, int from_tty)
|
|||
{
|
||||
struct ui_file *outfile = gdb_stdout;
|
||||
char *address_arg = NULL, *source_arg = NULL, *objfile_arg = NULL;
|
||||
struct objfile *objfile;
|
||||
struct partial_symtab *ps;
|
||||
int i, outfile_idx, found;
|
||||
CORE_ADDR pc = 0;
|
||||
|
@ -1944,7 +1937,7 @@ maintenance_print_psymbols (const char *args, int from_tty)
|
|||
}
|
||||
|
||||
found = 0;
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
int printed_objfile_header = 0;
|
||||
int print_for_objfile = 1;
|
||||
|
@ -2148,11 +2141,11 @@ maintenance_check_psymtabs (const char *ignore, int from_tty)
|
|||
struct compunit_symtab *cust = NULL;
|
||||
struct partial_symtab *ps;
|
||||
const struct blockvector *bv;
|
||||
struct objfile *objfile;
|
||||
struct block *b;
|
||||
int length;
|
||||
|
||||
ALL_PSYMTABS (objfile, ps)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
ALL_OBJFILE_PSYMTABS_REQUIRED (objfile, ps)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
||||
|
||||
|
|
|
@ -501,9 +501,7 @@ objfpy_build_id_matches (const struct bfd_build_id *build_id,
|
|||
static struct objfile *
|
||||
objfpy_lookup_objfile_by_name (const char *name)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
const char *filename;
|
||||
|
||||
|
@ -529,9 +527,7 @@ objfpy_lookup_objfile_by_name (const char *name)
|
|||
static struct objfile *
|
||||
objfpy_lookup_objfile_by_build_id (const char *build_id)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
const struct bfd_build_id *obfd_build_id;
|
||||
|
||||
|
|
|
@ -93,9 +93,7 @@ search_pp_list (PyObject *list, PyObject *value)
|
|||
static PyObject *
|
||||
find_pretty_printer_from_objfiles (PyObject *value)
|
||||
{
|
||||
struct objfile *obj;
|
||||
|
||||
ALL_OBJFILES (obj)
|
||||
for (objfile *obj : all_objfiles (current_program_space))
|
||||
{
|
||||
gdbpy_ref<> objf = objfile_to_objfile_object (obj);
|
||||
if (objf == NULL)
|
||||
|
|
|
@ -121,8 +121,6 @@ gdbpy_get_matching_xmethod_workers
|
|||
struct type *obj_type, const char *method_name,
|
||||
std::vector<xmethod_worker_up> *dm_vec)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
|
||||
gdb_assert (obj_type != NULL && method_name != NULL);
|
||||
|
||||
gdbpy_enter enter_py (get_current_arch (), current_language);
|
||||
|
@ -145,7 +143,7 @@ gdbpy_get_matching_xmethod_workers
|
|||
/* Gather debug method matchers registered with the object files.
|
||||
This could be done differently by iterating over each objfile's matcher
|
||||
list individually, but there's no data yet to show it's needed. */
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
gdbpy_ref<> py_objfile = objfile_to_objfile_object (objfile);
|
||||
|
||||
|
|
|
@ -101,9 +101,8 @@ static void
|
|||
append_ocl_sos (struct so_list **link_ptr)
|
||||
{
|
||||
CORE_ADDR *ocl_program_addr_base;
|
||||
struct objfile *objfile;
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
ocl_program_addr_base
|
||||
= (CORE_ADDR *) objfile_data (objfile, ocl_program_data_key);
|
||||
|
|
10
gdb/solib.c
10
gdb/solib.c
|
@ -677,12 +677,16 @@ solib_read_symbols (struct so_list *so, symfile_add_flags flags)
|
|||
TRY
|
||||
{
|
||||
/* Have we already loaded this shared object? */
|
||||
ALL_OBJFILES (so->objfile)
|
||||
so->objfile = nullptr;
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
if (filename_cmp (objfile_name (so->objfile), so->so_name) == 0
|
||||
&& so->objfile->addr_low == so->addr_low)
|
||||
if (filename_cmp (objfile_name (objfile), so->so_name) == 0
|
||||
&& objfile->addr_low == so->addr_low)
|
||||
{
|
||||
so->objfile = objfile;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (so->objfile == NULL)
|
||||
{
|
||||
section_addr_info sap
|
||||
|
|
|
@ -288,10 +288,10 @@ select_source_symtab (struct symtab *s)
|
|||
if (current_source_symtab)
|
||||
return;
|
||||
|
||||
ALL_OBJFILES (ofp)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
if (ofp->sf)
|
||||
s = ofp->sf->qf->find_last_source_symtab (ofp);
|
||||
if (objfile->sf)
|
||||
s = objfile->sf->qf->find_last_source_symtab (objfile);
|
||||
if (s)
|
||||
current_source_symtab = s;
|
||||
}
|
||||
|
|
|
@ -2000,12 +2000,11 @@ spu_objfile_from_frame (struct frame_info *frame)
|
|||
{
|
||||
struct gdbarch *gdbarch = get_frame_arch (frame);
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
struct objfile *obj;
|
||||
|
||||
if (gdbarch_bfd_arch_info (gdbarch)->arch != bfd_arch_spu)
|
||||
return NULL;
|
||||
|
||||
ALL_OBJFILES (obj)
|
||||
for (objfile *obj : all_objfiles (current_program_space))
|
||||
{
|
||||
if (obj->sections != obj->sections_end
|
||||
&& SPUADDR_SPU (obj_section_addr (obj->sections)) == tdep->id)
|
||||
|
|
|
@ -2351,14 +2351,18 @@ remove_symbol_file_command (const char *args, int from_tty)
|
|||
|
||||
addr = parse_and_eval_address (argv[1]);
|
||||
|
||||
ALL_OBJFILES (objf)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
if ((objf->flags & OBJF_USERLOADED) != 0
|
||||
&& (objf->flags & OBJF_SHARED) != 0
|
||||
&& objf->pspace == pspace && is_addr_in_objfile (addr, objf))
|
||||
if ((objfile->flags & OBJF_USERLOADED) != 0
|
||||
&& (objfile->flags & OBJF_SHARED) != 0
|
||||
&& objfile->pspace == pspace
|
||||
&& is_addr_in_objfile (addr, objfile))
|
||||
{
|
||||
objf = objfile;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (argv[0] != NULL)
|
||||
{
|
||||
/* Interpret the current argument as a file name. */
|
||||
|
@ -2368,15 +2372,18 @@ remove_symbol_file_command (const char *args, int from_tty)
|
|||
|
||||
gdb::unique_xmalloc_ptr<char> filename (tilde_expand (argv[0]));
|
||||
|
||||
ALL_OBJFILES (objf)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
if ((objf->flags & OBJF_USERLOADED) != 0
|
||||
&& (objf->flags & OBJF_SHARED) != 0
|
||||
&& objf->pspace == pspace
|
||||
&& filename_cmp (filename.get (), objfile_name (objf)) == 0)
|
||||
if ((objfile->flags & OBJF_USERLOADED) != 0
|
||||
&& (objfile->flags & OBJF_SHARED) != 0
|
||||
&& objfile->pspace == pspace
|
||||
&& filename_cmp (filename.get (), objfile_name (objfile)) == 0)
|
||||
{
|
||||
objf = objfile;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (objf == NULL)
|
||||
error (_("No symbol file found"));
|
||||
|
@ -3791,9 +3798,7 @@ expand_symtabs_matching
|
|||
gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
|
||||
enum search_domain kind)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
if (objfile->sf)
|
||||
objfile->sf->qf->expand_symtabs_matching (objfile, file_matcher,
|
||||
|
@ -3811,9 +3816,7 @@ void
|
|||
map_symbol_filenames (symbol_filename_ftype *fun, void *data,
|
||||
int need_fullname)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
if (objfile->sf)
|
||||
objfile->sf->qf->map_symbol_filenames (objfile, fun, data,
|
||||
|
|
|
@ -470,12 +470,11 @@ maintenance_print_symbols (const char *args, int from_tty)
|
|||
}
|
||||
else
|
||||
{
|
||||
struct objfile *objfile;
|
||||
struct compunit_symtab *cu;
|
||||
struct symtab *s;
|
||||
int found = 0;
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
int print_for_objfile = 1;
|
||||
|
||||
|
@ -690,7 +689,6 @@ maintenance_print_msymbols (const char *args, int from_tty)
|
|||
{
|
||||
struct ui_file *outfile = gdb_stdout;
|
||||
char *objfile_arg = NULL;
|
||||
struct objfile *objfile;
|
||||
int i, outfile_idx;
|
||||
|
||||
dont_repeat ();
|
||||
|
@ -734,7 +732,7 @@ maintenance_print_msymbols (const char *args, int from_tty)
|
|||
outfile = &arg_outfile;
|
||||
}
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
QUIT;
|
||||
if (objfile_arg == NULL
|
||||
|
|
60
gdb/symtab.c
60
gdb/symtab.c
|
@ -464,7 +464,6 @@ void
|
|||
iterate_over_symtabs (const char *name,
|
||||
gdb::function_view<bool (symtab *)> callback)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
gdb::unique_xmalloc_ptr<char> real_path;
|
||||
|
||||
/* Here we are interested in canonicalizing an absolute path, not
|
||||
|
@ -475,7 +474,7 @@ iterate_over_symtabs (const char *name,
|
|||
gdb_assert (IS_ABSOLUTE_PATH (real_path.get ()));
|
||||
}
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
if (iterate_over_some_symtabs (name, real_path.get (),
|
||||
objfile->compunit_symtabs, NULL,
|
||||
|
@ -486,7 +485,7 @@ iterate_over_symtabs (const char *name,
|
|||
/* Same search rules as above apply here, but now we look thru the
|
||||
psymtabs. */
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
if (objfile->sf
|
||||
&& objfile->sf->qf->map_symtabs_matching_filename (objfile,
|
||||
|
@ -1013,9 +1012,12 @@ matching_obj_sections (struct obj_section *obj_first,
|
|||
|
||||
/* Otherwise check that they are in corresponding objfiles. */
|
||||
|
||||
ALL_OBJFILES (obj)
|
||||
if (obj->obfd == first->owner)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
if (objfile->obfd == first->owner)
|
||||
{
|
||||
obj = objfile;
|
||||
break;
|
||||
}
|
||||
gdb_assert (obj != NULL);
|
||||
|
||||
if (obj->separate_debug_objfile != NULL
|
||||
|
@ -1033,7 +1035,6 @@ matching_obj_sections (struct obj_section *obj_first,
|
|||
void
|
||||
expand_symtab_containing_pc (CORE_ADDR pc, struct obj_section *section)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
struct bound_minimal_symbol msymbol;
|
||||
|
||||
/* If we know that this is not a text address, return failure. This is
|
||||
|
@ -1048,7 +1049,7 @@ expand_symtab_containing_pc (CORE_ADDR pc, struct obj_section *section)
|
|||
|| MSYMBOL_TYPE (msymbol.minsym) == mst_file_bss))
|
||||
return;
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
struct compunit_symtab *cust = NULL;
|
||||
|
||||
|
@ -2576,7 +2577,6 @@ struct block_symbol
|
|||
lookup_static_symbol (const char *name, const domain_enum domain)
|
||||
{
|
||||
struct symbol_cache *cache = get_symbol_cache (current_program_space);
|
||||
struct objfile *objfile;
|
||||
struct block_symbol result;
|
||||
struct block_symbol_cache *bsc;
|
||||
struct symbol_cache_slot *slot;
|
||||
|
@ -2592,7 +2592,7 @@ lookup_static_symbol (const char *name, const domain_enum domain)
|
|||
return result;
|
||||
}
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
result = lookup_symbol_in_objfile (objfile, STATIC_BLOCK, name, domain);
|
||||
if (result.symbol != NULL)
|
||||
|
@ -2793,7 +2793,6 @@ basic_lookup_transparent_type_1 (struct objfile *objfile, int block_index,
|
|||
struct type *
|
||||
basic_lookup_transparent_type (const char *name)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
struct type *t;
|
||||
|
||||
/* Now search all the global symbols. Do the symtab's first, then
|
||||
|
@ -2801,14 +2800,14 @@ basic_lookup_transparent_type (const char *name)
|
|||
of the desired name as a global, then do psymtab-to-symtab
|
||||
conversion on the fly and return the found symbol. */
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
t = basic_lookup_transparent_type_1 (objfile, GLOBAL_BLOCK, name);
|
||||
if (t)
|
||||
return t;
|
||||
}
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
t = basic_lookup_transparent_type_quick (objfile, GLOBAL_BLOCK, name);
|
||||
if (t)
|
||||
|
@ -2822,14 +2821,14 @@ basic_lookup_transparent_type (const char *name)
|
|||
of the desired name as a file-level static, then do psymtab-to-symtab
|
||||
conversion on the fly and return the found symbol. */
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
t = basic_lookup_transparent_type_1 (objfile, STATIC_BLOCK, name);
|
||||
if (t)
|
||||
return t;
|
||||
}
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
t = basic_lookup_transparent_type_quick (objfile, STATIC_BLOCK, name);
|
||||
if (t)
|
||||
|
@ -2877,7 +2876,7 @@ find_pc_sect_compunit_symtab (CORE_ADDR pc, struct obj_section *section)
|
|||
{
|
||||
struct compunit_symtab *cust;
|
||||
struct compunit_symtab *best_cust = NULL;
|
||||
struct objfile *objfile;
|
||||
struct objfile *obj_file;
|
||||
CORE_ADDR distance = 0;
|
||||
struct bound_minimal_symbol msymbol;
|
||||
|
||||
|
@ -2910,7 +2909,7 @@ find_pc_sect_compunit_symtab (CORE_ADDR pc, struct obj_section *section)
|
|||
It also happens for objfiles that have their functions reordered.
|
||||
For these, the symtab we are looking for is not necessarily read in. */
|
||||
|
||||
ALL_COMPUNITS (objfile, cust)
|
||||
ALL_COMPUNITS (obj_file, cust)
|
||||
{
|
||||
struct block *b;
|
||||
const struct blockvector *bv;
|
||||
|
@ -2929,12 +2928,12 @@ find_pc_sect_compunit_symtab (CORE_ADDR pc, struct obj_section *section)
|
|||
/* In order to better support objfiles that contain both
|
||||
stabs and coff debugging info, we continue on if a psymtab
|
||||
can't be found. */
|
||||
if ((objfile->flags & OBJF_REORDERED) && objfile->sf)
|
||||
if ((obj_file->flags & OBJF_REORDERED) && obj_file->sf)
|
||||
{
|
||||
struct compunit_symtab *result;
|
||||
|
||||
result
|
||||
= objfile->sf->qf->find_pc_sect_compunit_symtab (objfile,
|
||||
= obj_file->sf->qf->find_pc_sect_compunit_symtab (obj_file,
|
||||
msymbol,
|
||||
pc, section,
|
||||
0);
|
||||
|
@ -2948,8 +2947,8 @@ find_pc_sect_compunit_symtab (CORE_ADDR pc, struct obj_section *section)
|
|||
|
||||
ALL_BLOCK_SYMBOLS (b, iter, sym)
|
||||
{
|
||||
fixup_symbol_section (sym, objfile);
|
||||
if (matching_obj_sections (SYMBOL_OBJ_SECTION (objfile, sym),
|
||||
fixup_symbol_section (sym, obj_file);
|
||||
if (matching_obj_sections (SYMBOL_OBJ_SECTION (obj_file, sym),
|
||||
section))
|
||||
break;
|
||||
}
|
||||
|
@ -2967,13 +2966,13 @@ find_pc_sect_compunit_symtab (CORE_ADDR pc, struct obj_section *section)
|
|||
|
||||
/* Not found in symtabs, search the "quick" symtabs (e.g. psymtabs). */
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objf : all_objfiles (current_program_space))
|
||||
{
|
||||
struct compunit_symtab *result;
|
||||
|
||||
if (!objfile->sf)
|
||||
if (!objf->sf)
|
||||
continue;
|
||||
result = objfile->sf->qf->find_pc_sect_compunit_symtab (objfile,
|
||||
result = objf->sf->qf->find_pc_sect_compunit_symtab (objf,
|
||||
msymbol,
|
||||
pc, section,
|
||||
1);
|
||||
|
@ -2999,9 +2998,7 @@ find_pc_compunit_symtab (CORE_ADDR pc)
|
|||
struct symbol *
|
||||
find_symbol_at_address (CORE_ADDR address)
|
||||
{
|
||||
struct objfile *objfile;
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
if (objfile->sf == NULL
|
||||
|| objfile->sf->qf->find_compunit_symtab_by_address == NULL)
|
||||
|
@ -3352,7 +3349,6 @@ find_line_symtab (struct symtab *symtab, int line,
|
|||
BEST_INDEX and BEST_LINETABLE identify the item for it. */
|
||||
int best;
|
||||
|
||||
struct objfile *objfile;
|
||||
struct compunit_symtab *cu;
|
||||
struct symtab *s;
|
||||
|
||||
|
@ -3361,13 +3357,14 @@ find_line_symtab (struct symtab *symtab, int line,
|
|||
else
|
||||
best = 0;
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
if (objfile->sf)
|
||||
objfile->sf->qf->expand_symtabs_with_fullname (objfile,
|
||||
symtab_to_fullname (symtab));
|
||||
objfile->sf->qf->expand_symtabs_with_fullname
|
||||
(objfile, symtab_to_fullname (symtab));
|
||||
}
|
||||
|
||||
struct objfile *objfile;
|
||||
ALL_FILETABS (objfile, cu, s)
|
||||
{
|
||||
struct linetable *l;
|
||||
|
@ -5691,7 +5688,6 @@ static void
|
|||
find_main_name (void)
|
||||
{
|
||||
const char *new_main_name;
|
||||
struct objfile *objfile;
|
||||
|
||||
/* First check the objfiles to see whether a debuginfo reader has
|
||||
picked up the appropriate main name. Historically the main name
|
||||
|
@ -5699,7 +5695,7 @@ find_main_name (void)
|
|||
relies on the order of objfile creation -- which still isn't
|
||||
guaranteed to get the correct answer, but is just probably more
|
||||
accurate. */
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
if (objfile->per_bfd->name_of_main != NULL)
|
||||
{
|
||||
|
|
|
@ -415,7 +415,6 @@ windows_iterate_over_objfiles_in_search_order
|
|||
void *cb_data, struct objfile *current_objfile)
|
||||
{
|
||||
int stop;
|
||||
struct objfile *objfile;
|
||||
|
||||
if (current_objfile)
|
||||
{
|
||||
|
@ -424,7 +423,7 @@ windows_iterate_over_objfiles_in_search_order
|
|||
return;
|
||||
}
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
{
|
||||
if (objfile != current_objfile)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue