if (!breakpoints_always_inserted_mode ()
&& (target_has_execution
- || (gdbarch_has_global_solist (target_gdbarch)
- && target_supports_multi_process ())))
+ || gdbarch_has_global_breakpoints (target_gdbarch)))
/* update_global_location_list does not insert breakpoints
when always_inserted_mode is not enabled. Explicitly
insert them now. */
/* If breakpoint locations are shared across processes, then there's
nothing to do. */
- if (gdbarch_has_global_solist (target_gdbarch))
+ if (gdbarch_has_global_breakpoints (target_gdbarch))
return;
ALL_BP_LOCATIONS (bpt)
if (breakpoints_always_inserted_mode () && should_insert
&& (target_has_execution
- || (gdbarch_has_global_solist (target_gdbarch)
- && target_supports_multi_process ())))
+ || (gdbarch_has_global_breakpoints (target_gdbarch))))
insert_breakpoint_locations ();
do_cleanups (cleanups);
set_solib_ops (gdbarch, &solib_target_so_ops);
/* Every process, although has its own address space, sees the same
- list of shared libraries. */
+ list of shared libraries. There's no "main executable" in DICOS,
+ so this accounts for all code. */
set_gdbarch_has_global_solist (gdbarch, 1);
+ /* The DICOS breakpoint API takes care of magically making
+ breakpoints visible to all inferiors. */
+ set_gdbarch_has_global_breakpoints (gdbarch, 1);
+
/* There's no (standard definition of) entry point or a guaranteed
text location with a symbol where to place the call dummy, so we
put it on the stack. */
gdbarch_get_siginfo_type_ftype *get_siginfo_type;
gdbarch_record_special_symbol_ftype *record_special_symbol;
int has_global_solist;
+ int has_global_breakpoints;
};
0, /* get_siginfo_type */
0, /* record_special_symbol */
0, /* has_global_solist */
+ 0, /* has_global_breakpoints */
/* startup_gdbarch() */
};
/* Skip verify of get_siginfo_type, has predicate */
/* Skip verify of record_special_symbol, has predicate */
/* Skip verify of has_global_solist, invalid_p == 0 */
+ /* Skip verify of has_global_breakpoints, invalid_p == 0 */
buf = ui_file_xstrdup (log, &dummy);
make_cleanup (xfree, buf);
if (strlen (buf) > 0)
fprintf_unfiltered (file,
"gdbarch_dump: get_siginfo_type = <%s>\n",
host_address_to_string (gdbarch->get_siginfo_type));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: has_global_breakpoints = %s\n",
+ plongest (gdbarch->has_global_breakpoints));
fprintf_unfiltered (file,
"gdbarch_dump: has_global_solist = %s\n",
plongest (gdbarch->has_global_solist));
gdbarch->has_global_solist = has_global_solist;
}
+int
+gdbarch_has_global_breakpoints (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ /* Skip verify of has_global_breakpoints, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n");
+ return gdbarch->has_global_breakpoints;
+}
+
+void
+set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch,
+ int has_global_breakpoints)
+{
+ gdbarch->has_global_breakpoints = has_global_breakpoints;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */
/* True if the list of shared libraries is one and only for all
processes, as opposed to a list of shared libraries per inferior.
- When this property is true, GDB assumes that since shared libraries
- are shared across processes, so is all code. Hence, GDB further
- assumes an inserted breakpoint location is visible to all processes. */
+ This usually means that all processes, although may or may not share
+ an address space, will see the same set of symbols at the same
+ addresses. */
extern int gdbarch_has_global_solist (struct gdbarch *gdbarch);
extern void set_gdbarch_has_global_solist (struct gdbarch *gdbarch, int has_global_solist);
+/* On some targets, even though each inferior has its own private
+ address space, the debug interface takes care of making breakpoints
+ visible to all address spaces automatically. For such cases,
+ this property should be set to true. */
+
+extern int gdbarch_has_global_breakpoints (struct gdbarch *gdbarch);
+extern void set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch, int has_global_breakpoints);
+
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
# True if the list of shared libraries is one and only for all
# processes, as opposed to a list of shared libraries per inferior.
-# When this property is true, GDB assumes that since shared libraries
-# are shared across processes, so is all code. Hence, GDB further
-# assumes an inserted breakpoint location is visible to all processes.
+# This usually means that all processes, although may or may not share
+# an address space, will see the same set of symbols at the same
+# addresses.
v:int:has_global_solist:::0:0::0
+
+# On some targets, even though each inferior has its own private
+# address space, the debug interface takes care of making breakpoints
+# visible to all address spaces automatically. For such cases,
+# this property should be set to true.
+v:int:has_global_breakpoints:::0:0::0
EOF
}
dont_repeat (); /* Not for the faint of heart */
- if (target_supports_multi_process ())
- /* Don't complain if we can be attached to multiple processes. */
+ if (gdbarch_has_global_solist (target_gdbarch))
+ /* Don't complain if all processes share the same symbol
+ space. */
;
else if (target_has_execution)
{
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)
+ /* If breakpoints are global, insert them now. */
+ if (gdbarch_has_global_breakpoints (target_gdbarch)
&& breakpoints_always_inserted_mode ())
insert_breakpoints ();
}
{
struct target_ops* t;
- if (gdbarch_has_global_solist (target_gdbarch))
+ if (gdbarch_has_global_breakpoints (target_gdbarch))
/* Don't remove global breakpoints here. They're removed on
disconnection from the target. */
;