mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
gdb/
Add from_tty to solib_create_inferior_hook. * infcmd.c (post_create_inferior): Move solib_add after solib_create_inferior_hook. Pass from_tty to solib_create_inferior_hook. Call solib_add and SOLIB_ADD with 0 from_tty and comment why. * infrun.c (follow_exec): Pass from_tty solib_create_inferior_hook as 0. * linux-nat.c (linux_child_follow_fork): Likewise. * nto-procfs.c (procfs_post_attach, procfs_create_inferior): Likewise. * solib-darwin.c (darwin_solib_create_inferior_hook): New parameter from_tty. * solib-frv.c (frv_solib_create_inferior_hook): Likewise. * solib-irix.c (irix_solib_create_inferior_hook): Likewise. * solib-null.c (null_solib_create_inferior_hook): Likewise. * solib-osf.c (osf_solib_create_inferior_hook): Likewise. * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise. * solib-som.c (som_solib_create_inferior_hook): Likewise. * solib-spu.c (spu_solib_create_inferior_hook): New parameter from_tty. Pass it to svr4_so_ops.solib_create_inferior_hook. * solib-sunos.c (sunos_solib_create_inferior_hook): New parameter from_tty. * solib-svr4.c (enable_break): New parameter from_tty. Pass it to solib_add. (svr4_solib_create_inferior_hook): New parameter from_tty. Pass it to enable_break. * solib-target.c (solib_target_solib_create_inferior_hook): New parameter from_tty. * solib.c (solib_create_inferior_hook): New parameter from_tty. Pass it to ops->solib_create_inferior_hook. (reload_shared_libraries): Pass from_tty to solib_create_inferior_hook. Move solib_add after solib_create_inferior_hook, call it now with from_tty as 0. New comment there. * solib.h (solib_create_inferior_hook): New parameter from_tty. * solist.h (struct target_so_ops <solib_create_inferior_hook>): Likewise.
This commit is contained in:
36
gdb/infcmd.c
36
gdb/infcmd.c
@@ -397,22 +397,6 @@ post_create_inferior (struct target_ops *target, int from_tty)
|
||||
/* Now that we know the register layout, retrieve current PC. */
|
||||
stop_pc = regcache_read_pc (get_current_regcache ());
|
||||
|
||||
/* If the solist is global across processes, there's no need to
|
||||
refetch it here. */
|
||||
if (exec_bfd && !gdbarch_has_global_solist (target_gdbarch))
|
||||
{
|
||||
/* Sometimes the platform-specific hook loads initial shared
|
||||
libraries, and sometimes it doesn't. Try to do so first, so
|
||||
that we can add them with the correct value for FROM_TTY.
|
||||
If we made all the inferior hook methods consistent,
|
||||
this call could be removed. */
|
||||
#ifdef SOLIB_ADD
|
||||
SOLIB_ADD (NULL, from_tty, target, auto_solib_add);
|
||||
#else
|
||||
solib_add (NULL, from_tty, target, auto_solib_add);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (exec_bfd)
|
||||
{
|
||||
/* Create the hooks to handle shared library load and unload
|
||||
@@ -420,7 +404,25 @@ post_create_inferior (struct target_ops *target, int from_tty)
|
||||
#ifdef SOLIB_CREATE_INFERIOR_HOOK
|
||||
SOLIB_CREATE_INFERIOR_HOOK (PIDGET (inferior_ptid));
|
||||
#else
|
||||
solib_create_inferior_hook ();
|
||||
solib_create_inferior_hook (from_tty);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* If the solist is global across processes, there's no need to
|
||||
refetch it here. */
|
||||
if (exec_bfd && !gdbarch_has_global_solist (target_gdbarch))
|
||||
{
|
||||
/* Sometimes the platform-specific hook loads initial shared
|
||||
libraries, and sometimes it doesn't. If it doesn't FROM_TTY will be
|
||||
incorrectly 0 but such solib targets should be fixed anyway. If we
|
||||
made all the inferior hook methods consistent, this call could be
|
||||
removed. Call it only after the solib target has been initialized by
|
||||
solib_create_inferior_hook. */
|
||||
|
||||
#ifdef SOLIB_ADD
|
||||
SOLIB_ADD (NULL, 0, target, auto_solib_add);
|
||||
#else
|
||||
solib_add (NULL, 0, target, auto_solib_add);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user