aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r--gdb/solib-svr4.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index e454254..af08b75 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -2715,8 +2715,8 @@ svr4_solib_ops::enable_break (svr4_info *info, int from_tty) const
linker. Warn and drop into the old code. */
bkpt_at_symbol:
warning (_("Unable to find dynamic linker breakpoint function.\n"
- "GDB will be unable to debug shared library initializers\n"
- "and track explicitly loaded dynamic code."));
+ "GDB will be unable to debug shared library initializers\n"
+ "and track explicitly loaded dynamic code."));
}
/* Scan through the lists of symbols, trying to look up the symbol and
@@ -3591,16 +3591,11 @@ find_debug_base_for_solib (const solib *solib)
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;
}
@@ -3720,11 +3715,8 @@ svr4_solib_ops::get_solibs_in_ns (int nsid) const
CORE_ADDR debug_base = info->namespace_id[nsid];
std::unordered_map<std::string, const lm_info_svr4 *> namespace_solibs;
for (svr4_so &so : info->solib_lists[debug_base])
- {
- namespace_solibs[so.name]
- = gdb::checked_static_cast<const lm_info_svr4 *>
- (so.lm_info.get ());
- }
+ namespace_solibs[so.name] = so.lm_info.get ();
+
for (const solib &so: current_program_space->solibs ())
{
auto *lm_inferior