* remote.c (remote_start_remote): If the solib list is global,
fetch libraries and insert breakpoints after connecting. * infcmd.c (post_create_inferior): If the solist is shared between inferiors, no need to refetch it on every new inferior. (detach_command): If the shared library list is shared between inferiors, then don't clear it on every inferior detach. * gdbarch.sh (has_global_solist): New. * i386-dicos-tdep.c (i386_dicos_init_abi): Set gdbarch_has_global_solist. * target.c (target_pre_inferior): If the shared library list is shared between inferiors, then don't clear it here, neither invalidate the memory regions or clear the target description. (target_detach): If the shared library list is shared between inferiors, then don't remove breakpoints from the target here. (target_disconnect): Comment. * solib.c (update_solib_list): Check for null_ptid. * breakpoint.c (insert_breakpoints, update_global_location_list): If the shared library list is shared between inferiors, insert breakpoints even if there's no execution. (breakpoint_init_inferior): If the shared library list is shared between inferiors, don't delete breakpoints or mark them uninserted here. * gdbarch.c, gdbarch.h: Regenerate.
This commit is contained in:
parent
e03c1da340
commit
50c71eaf0e
10 changed files with 121 additions and 15 deletions
13
gdb/infcmd.c
13
gdb/infcmd.c
|
@ -398,7 +398,9 @@ post_create_inferior (struct target_ops *target, int from_tty)
|
|||
don't need to. */
|
||||
target_find_description ();
|
||||
|
||||
if (exec_bfd)
|
||||
/* 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
|
||||
|
@ -410,7 +412,10 @@ post_create_inferior (struct target_ops *target, int from_tty)
|
|||
#else
|
||||
solib_add (NULL, from_tty, target, auto_solib_add);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (exec_bfd)
|
||||
{
|
||||
/* Create the hooks to handle shared library load and unload
|
||||
events. */
|
||||
#ifdef SOLIB_CREATE_INFERIOR_HOOK
|
||||
|
@ -2341,7 +2346,11 @@ detach_command (char *args, int from_tty)
|
|||
{
|
||||
dont_repeat (); /* Not for the faint of heart. */
|
||||
target_detach (args, from_tty);
|
||||
no_shared_libraries (NULL, from_tty);
|
||||
|
||||
/* If the solist is global across inferiors, don't clear it when we
|
||||
detach from a single inferior. */
|
||||
if (!gdbarch_has_global_solist (target_gdbarch))
|
||||
no_shared_libraries (NULL, from_tty);
|
||||
|
||||
/* If the current target interface claims there's still execution,
|
||||
then don't mess with threads of other processes. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue