const bfd_build_id *core_build_id
= build_id_bfd_get (current_program_space->core_bfd ());
- for (const auto &iter : mapped_files)
+ for (const auto &[filename, file_data] : mapped_files)
{
- const std::string &filename = iter.first;
- const mapped_file &file_data = iter.second;
-
/* If this mapped file has the same build-id as was discovered for
the core-file itself, then we assume this is the main
executable. Record the filename as we can use this later. */
retval->n_allocated_dictionaries = nsyms.size ();
int idx = 0;
- for (const auto &pair : nsyms)
- {
- enum language language = pair.first;
- std::vector<symbol *> symlist = pair.second;
-
- retval->dictionaries[idx++]
- = dict_create_hashed (obstack, language, symlist);
- }
+ for (const auto &[language, symlist] : nsyms)
+ retval->dictionaries[idx++] = dict_create_hashed (obstack, language,
+ symlist);
return retval;
}
retval->n_allocated_dictionaries = nsyms.size ();
int idx = 0;
- for (const auto &pair : nsyms)
- {
- enum language language = pair.first;
- std::vector<symbol *> symlist = pair.second;
-
- retval->dictionaries[idx++]
- = dict_create_linear (obstack, language, symlist);
- }
+ for (const auto &[language, symlist] : nsyms)
+ retval->dictionaries[idx++] = dict_create_linear (obstack, language,
+ symlist);
return retval;
}
gdb::unordered_map<enum language, std::vector<symbol *>> nsyms
= collate_pending_symbols_by_language (symbol_list);
- for (const auto &pair : nsyms)
+ for (const auto &[language, symlist] : nsyms)
{
- enum language language = pair.first;
- std::vector<symbol *> symlist = pair.second;
struct dictionary *dict = find_language_dictionary (mdict, language);
if (dict == nullptr)
auto *lm_info
= gdb::checked_static_cast<const lm_info_svr4 *> (solib->lm_info.get ());
- for (const auto &tuple : info->solib_lists)
- {
- CORE_ADDR debug_base = tuple.first;
- const std::vector<svr4_so> &sos = tuple.second;
-
- for (const svr4_so &so : sos)
- if (svr4_same (solib->original_name.c_str (), so.name.c_str (),
- *lm_info, *so.lm_info))
- return debug_base;
- }
+ for (const auto &[debug_base, sos] : info->solib_lists)
+ for (const svr4_so &so : sos)
+ if (svr4_same (solib->original_name.c_str (), so.name.c_str (), *lm_info,
+ *so.lm_info))
+ return debug_base;
return 0;
}
bool ns_separator = false;
- for (auto &solibs_pair : all_solibs_to_print)
+ for (const auto &[ns, solibs_to_print] : all_solibs_to_print)
{
if (ns_separator)
uiout->message ("\n\n");
else
ns_separator = true;
- int ns = solibs_pair.first;
- std::vector<const solib *> solibs_to_print = solibs_pair.second;
+
if (solibs_to_print.size () == 0)
{
uiout->message (_("Linker namespace [[%d]] is not active.\n"), ns);
const char *last_filename = "";
const symbol *last_module_symbol = nullptr;
- for (const module_symbol_search &ms : module_symbols)
+ for (const auto &[p, q] : module_symbols)
{
- const symbol_search &p = ms.first;
- const symbol_search &q = ms.second;
-
gdb_assert (q.symbol != nullptr);
if (last_module_symbol != p.symbol)
});
}
- for (const auto &iter : set_options)
- {
- thread_info *thread = iter.first;
- gdb_thread_options options = iter.second;
-
- if (thread->thread_options != options)
- {
- threads_debug_printf ("[options for %s are now %s]\n",
- target_pid_to_str (thread->id).c_str (),
- to_string (options).c_str ());
+ for (const auto [thread, options] : set_options)
+ if (thread->thread_options != options)
+ {
+ threads_debug_printf ("[options for %s are now %s]\n",
+ target_pid_to_str (thread->id).c_str (),
+ to_string (options).c_str ());
- thread->thread_options = options;
- }
- }
+ thread->thread_options = options;
+ }
write_ok (own_buf);
return;