Per-thread commands.
[deliverable/binutils-gdb.git] / gdb / top.c
index 84894346697c35b5a5c94105daca72f29f045e29..fe4b1d0aebdf27383f64807e9d81c7405fffb6d2 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -418,7 +418,8 @@ execute_command (char *p, int from_tty)
       /* If the target is running, we allow only a limited set of
          commands. */
       if (target_can_async_p ()
-         && any_running ()
+         && ((!non_stop && any_running ())
+             || (non_stop && is_running (inferior_ptid)))
          && !get_cmd_async_ok (c))
        error (_("Cannot execute this command while the target is running."));
 
This page took 0.026714 seconds and 4 git commands to generate.