* 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
29
gdb/target.c
29
gdb/target.c
|
@ -1752,11 +1752,18 @@ target_pre_inferior (int from_tty)
|
|||
(gdb) attach 4712
|
||||
Cannot access memory at address 0xdeadbeef
|
||||
*/
|
||||
no_shared_libraries (NULL, from_tty);
|
||||
|
||||
invalidate_target_mem_regions ();
|
||||
/* In some OSs, the shared library list is the same/global/shared
|
||||
across inferiors. If code is shared between processes, so are
|
||||
memory regions and features. */
|
||||
if (!gdbarch_has_global_solist (target_gdbarch))
|
||||
{
|
||||
no_shared_libraries (NULL, from_tty);
|
||||
|
||||
target_clear_description ();
|
||||
invalidate_target_mem_regions ();
|
||||
|
||||
target_clear_description ();
|
||||
}
|
||||
}
|
||||
|
||||
/* This is to be called by the open routine before it does
|
||||
|
@ -1790,9 +1797,14 @@ target_preopen (int from_tty)
|
|||
void
|
||||
target_detach (char *args, int from_tty)
|
||||
{
|
||||
/* If we're in breakpoints-always-inserted mode, have to
|
||||
remove them before detaching. */
|
||||
remove_breakpoints ();
|
||||
if (gdbarch_has_global_solist (target_gdbarch))
|
||||
/* Don't remove global breakpoints here. They're removed on
|
||||
disconnection from the target. */
|
||||
;
|
||||
else
|
||||
/* If we're in breakpoints-always-inserted mode, have to remove
|
||||
them before detaching. */
|
||||
remove_breakpoints ();
|
||||
|
||||
(current_target.to_detach) (args, from_tty);
|
||||
}
|
||||
|
@ -1802,8 +1814,9 @@ target_disconnect (char *args, int from_tty)
|
|||
{
|
||||
struct target_ops *t;
|
||||
|
||||
/* If we're in breakpoints-always-inserted mode, have to
|
||||
remove them before disconnecting. */
|
||||
/* If we're in breakpoints-always-inserted mode or if breakpoints
|
||||
are global across processes, we have to remove them before
|
||||
disconnecting. */
|
||||
remove_breakpoints ();
|
||||
|
||||
for (t = current_target.beneath; t != NULL; t = t->beneath)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue