From 50c71eaf0e6a7026633818a76f14b6ab4efec73c Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 3 Nov 2008 14:01:27 +0000 Subject: * 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. --- gdb/remote.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gdb/remote.c') diff --git a/gdb/remote.c b/gdb/remote.c index 9f10c2ac919..a5589f63215 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -2550,6 +2550,11 @@ remote_start_remote (struct ui_out *uiout, void *opaque) getpkt (&rs->buf, &rs->buf_size, 0); } + /* 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, args->from_tty, args->target, auto_solib_add); + /* Next, if the target can specify a description, read it. We do this before anything involving memory or registers. */ target_find_description (); @@ -2717,6 +2722,12 @@ remote_start_remote (struct ui_out *uiout, void *opaque) if (exec_bfd) /* No use without an exec file. */ remote_check_symbols (symfile_objfile); } + + /* If code is shared between processes, then breakpoints are global + too; Insert them now. */ + if (gdbarch_has_global_solist (target_gdbarch) + && breakpoints_always_inserted_mode ()) + insert_breakpoints (); } /* Open a connection to a remote debugger. -- cgit v1.2.1