+ clear_proceed_status (0);
+ proceed ((CORE_ADDR) -1, oursig);
+}
+
+/* Queue a signal to be delivered to the current thread. */
+
+static void
+queue_signal_command (char *signum_exp, int from_tty)
+{
+ enum gdb_signal oursig;
+ struct thread_info *tp;
+
+ ERROR_NO_INFERIOR;
+ ensure_not_tfind_mode ();
+ ensure_valid_thread ();
+ ensure_not_running ();
+
+ if (signum_exp == NULL)
+ error_no_arg (_("signal number"));
+
+ /* It would be even slicker to make signal names be valid expressions,
+ (the type could be "enum $signal" or some such), then the user could
+ assign them to convenience variables. */
+ oursig = gdb_signal_from_name (signum_exp);
+
+ if (oursig == GDB_SIGNAL_UNKNOWN)
+ {
+ /* No, try numeric. */
+ int num = parse_and_eval_long (signum_exp);
+
+ if (num == 0)
+ oursig = GDB_SIGNAL_0;
+ else
+ oursig = gdb_signal_from_command (num);
+ }
+
+ if (oursig != GDB_SIGNAL_0
+ && !signal_pass_state (oursig))
+ error (_("Signal handling set to not pass this signal to the program."));
+
+ tp = inferior_thread ();
+ tp->suspend.stop_signal = oursig;
+}
+
+/* Data for the FSM that manages the until (with no argument)
+ command. */
+
+struct until_next_fsm
+{
+ /* The base class. */
+ struct thread_fsm thread_fsm;
+
+ /* The thread that as current when the command was executed. */
+ int thread;
+};
+
+static int until_next_fsm_should_stop (struct thread_fsm *self,
+ struct thread_info *thread);
+static void until_next_fsm_clean_up (struct thread_fsm *self,
+ struct thread_info *thread);
+static enum async_reply_reason
+ until_next_fsm_async_reply_reason (struct thread_fsm *self);
+
+/* until_next_fsm's vtable. */
+
+static struct thread_fsm_ops until_next_fsm_ops =
+{
+ NULL, /* dtor */
+ until_next_fsm_clean_up,
+ until_next_fsm_should_stop,
+ NULL, /* return_value */
+ until_next_fsm_async_reply_reason,
+};
+
+/* Allocate a new until_next_fsm. */
+
+static struct until_next_fsm *
+new_until_next_fsm (struct interp *cmd_interp, int thread)
+{
+ struct until_next_fsm *sm;
+
+ sm = XCNEW (struct until_next_fsm);
+ thread_fsm_ctor (&sm->thread_fsm, &until_next_fsm_ops, cmd_interp);
+
+ sm->thread = thread;
+
+ return sm;