diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2008-08-19 13:22:14 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2008-08-19 13:22:14 +0000 |
commit | 9908b56683c3fce81b58ff5ee888741790f516d0 (patch) | |
tree | 05b062f89b7a634c46c5830d54824e00df366c40 /gdb/infcmd.c | |
parent | c6ebd6cf9956565b8b2c3e14a54dea6c467f48d4 (diff) | |
download | gdb-9908b56683c3fce81b58ff5ee888741790f516d0.zip gdb-9908b56683c3fce81b58ff5ee888741790f516d0.tar.gz gdb-9908b56683c3fce81b58ff5ee888741790f516d0.tar.bz2 |
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.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r-- | gdb/infcmd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 82d4710..02ec980 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -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); |