@@ -458,7 +458,7 @@ post_create_inferior (struct target_ops *target, int from_tty)
/* If the solist is global across processes, there's no need to
refetch it here. */
if (!gdbarch_has_global_solist (target_gdbarch ()))
- solib_add (NULL, 0, target, auto_solib_add);
+ solib_add (NULL, 0, auto_solib_add);
}
}
@@ -4097,7 +4097,7 @@ remote_start_remote (int from_tty, struct target_ops *target, int extended_p)
/* On OSs where the list of libraries is global to all
processes, we fetch them early. */
if (gdbarch_has_global_solist (target_gdbarch ()))
- solib_add (NULL, from_tty, target, auto_solib_add);
+ solib_add (NULL, from_tty, auto_solib_add);
if (target_is_non_stop_p ())
{
@@ -1145,7 +1145,7 @@ frv_fetch_objfile_link_map (struct objfile *objfile)
/* Cause frv_current_sos() to be run if it hasn't been already. */
if (main_lm_addr == 0)
- solib_add (0, 0, 0, 1);
+ solib_add (0, 0, 1);
/* frv_current_sos() will set main_lm_addr for the main executable. */
if (objfile == symfile_objfile)
@@ -1614,7 +1614,7 @@ svr4_fetch_objfile_link_map (struct objfile *objfile)
/* Cause svr4_current_sos() to be run if it hasn't been already. */
if (info->main_lm_addr == 0)
- solib_add (NULL, 0, ¤t_target, auto_solib_add);
+ solib_add (NULL, 0, auto_solib_add);
/* svr4_current_sos() will set main_lm_addr for the main executable. */
if (objfile == symfile_objfile)
@@ -2273,7 +2273,7 @@ enable_break (struct svr4_info *info, int from_tty)
mean r_brk has already been relocated. Assume the dynamic linker
is the object containing r_brk. */
- solib_add (NULL, from_tty, ¤t_target, auto_solib_add);
+ solib_add (NULL, from_tty, auto_solib_add);
sym_addr = 0;
if (info->debug_base && solib_svr4_r_map (info) != 0)
sym_addr = solib_svr4_r_brk (info);
@@ -2451,7 +2451,7 @@ enable_break (struct svr4_info *info, int from_tty)
info->debug_loader_name = xstrdup (interp_name);
info->debug_loader_offset_p = 1;
info->debug_loader_offset = load_addr;
- solib_add (NULL, from_tty, ¤t_target, auto_solib_add);
+ solib_add (NULL, from_tty, auto_solib_add);
}
/* Record the relocated start and end address of the dynamic linker
@@ -751,17 +751,10 @@ solib_used (const struct so_list *const known)
to the list, and leave their symbols_loaded flag clear.
If FROM_TTY is non-null, feel free to print messages about what
- we're doing.
+ we're doing. */
- If TARGET is non-null, add the sections of all new shared objects
- to TARGET's section table. Note that this doesn't remove any
- sections for shared objects that have been unloaded, and it
- doesn't check to see if the new shared objects are already present in
- the section table. But we only use this for core files and
- processes we've just attached to, so that's okay. */
-
-static void
-update_solib_list (int from_tty, struct target_ops *target)
+void
+update_solib_list (int from_tty)
{
const struct target_so_ops *ops = solib_ops (target_gdbarch ());
struct so_list *inferior = ops->current_sos();
@@ -962,11 +955,10 @@ libpthread_solib_p (struct so_list *so)
If READSYMS is 0, defer reading symbolic information until later
but still do any needed low level processing.
- FROM_TTY and TARGET are as described for update_solib_list, above. */
+ FROM_TTY is described for update_solib_list, above. */
void
-solib_add (const char *pattern, int from_tty,
- struct target_ops *target, int readsyms)
+solib_add (const char *pattern, int from_tty, int readsyms)
{
struct so_list *gdb;
@@ -991,7 +983,7 @@ solib_add (const char *pattern, int from_tty,
error (_("Invalid regexp: %s"), re_err);
}
- update_solib_list (from_tty, target);
+ update_solib_list (from_tty);
/* Walk the list of currently loaded shared libraries, and read
symbols for any that match the pattern --- or any whose symbols
@@ -1076,7 +1068,7 @@ info_sharedlibrary_command (char *pattern, int from_tty)
/* "0x", a little whitespace, and two hex digits per byte of pointers. */
addr_width = 4 + (gdbarch_ptr_bit (gdbarch) / 4);
- update_solib_list (from_tty, 0);
+ update_solib_list (from_tty);
/* make_cleanup_ui_out_table_begin_end needs to know the number of
rows, so we need to make two passes over the libs. */
@@ -1293,7 +1285,7 @@ static void
sharedlibrary_command (char *args, int from_tty)
{
dont_repeat ();
- solib_add (args, from_tty, (struct target_ops *) 0, 1);
+ solib_add (args, from_tty, 1);
}
/* Implements the command "nosharedlibrary", which discards symbols
@@ -1340,7 +1332,7 @@ handle_solib_event (void)
be adding them automatically. Switch terminal for any messages
produced by breakpoint_re_set. */
target_terminal_ours_for_output ();
- solib_add (NULL, 0, ¤t_target, auto_solib_add);
+ solib_add (NULL, 0, auto_solib_add);
target_terminal_inferior ();
}
@@ -1458,7 +1450,7 @@ reload_shared_libraries (char *ignored, int from_tty,
removed. Call it only after the solib target has been initialized by
solib_create_inferior_hook. */
- solib_add (NULL, 0, NULL, auto_solib_add);
+ solib_add (NULL, 0, auto_solib_add);
breakpoint_re_set ();
@@ -33,7 +33,7 @@ extern void clear_solib (void);
/* Called to add symbols from a shared library to gdb's symbol table. */
-extern void solib_add (const char *, int, struct target_ops *, int);
+extern void solib_add (const char *, int, int);
extern int solib_read_symbols (struct so_list *, int);
/* Function to be called when the inferior starts up, to discover the