Make sure target supports non-stop.

* infcmd.c (run_command_1, attach_command): If non-stop mode
        is requested, verify the target supports it.
        * linux-nat.c (linux_nat_supports_non_stop): New.
        (linux_nat_add_target): Register the above.
        * target.c (find_default_supports_non_stop)
        (target_supports_non_stop): New.
        (init_dummy_target): Register find_default_supports_non_stop.
        * target.h (struct target_ops): New field to_supports_non_stop.
        (target_supports_non_stop): New.
This commit is contained in:
Vladimir Prus
2008-08-19 13:22:14 +00:00
parent c6ebd6cf99
commit 9908b56683
5 changed files with 53 additions and 0 deletions

View File

@@ -503,6 +503,9 @@ run_command_1 (char *args, int from_tty, int tbreak_at_main)
exec_file = (char *) get_exec_file (0);
if (non_stop && !target_supports_non_stop ())
error (_("The target does not support running in non-stop mode."));
/* We keep symbols from add-symbol-file, on the grounds that the
user might want to add some symbols before running the program
(right?). But sometimes (dynamic loading where the user manually
@@ -2020,6 +2023,9 @@ attach_command (char *args, int from_tty)
this function should probably be moved into target_pre_inferior. */
target_pre_inferior (from_tty);
if (non_stop && !target_supports_non_stop ())
error (_("Cannot attach to this target in non-stop mode"));
if (args)
{
async_exec = strip_bg_char (&args);