This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [MI non-stop 05/11, RFA] -exec-continue/-exec-interrupt --all
- From: Daniel Jacobowitz <drow at false dot org>
- To: Vladimir Prus <vladimir at codesourcery dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Fri, 11 Jul 2008 09:34:34 -0400
- Subject: Re: [MI non-stop 05/11, RFA] -exec-continue/-exec-interrupt --all
- References: <200806282045.39438.vladimir@codesourcery.com>
On Sat, Jun 28, 2008 at 08:45:39PM +0400, Vladimir Prus wrote:
> + if (non_stop && all_threads)
> + /* Don't error out current thread is running, because there may
> + be other stopped threads. */
> + iterate_over_threads (proceed_thread_callback, NULL);
"if the current thread"; also extra indentation here.
> +void
> +interrupt_target_1 (int all_threads)
> +{
Tom pointed out the indentation problem here.
> @@ -177,8 +177,12 @@ mi_cmd_exec_return (char *command, char **argv, int argc)
> void
> mi_cmd_exec_continue (char *command, char **argv, int argc)
> {
> - /* FIXME: Should call a libgdb function, not a cli wrapper. */
> - return mi_execute_async_cli_command ("continue", argv, argc);
> + if (argc == 0)
> + continue_1 (0);
> + else if (argc == 1 && strcmp (argv[0], "--all") == 0)
> + continue_1 (1);
> + else
> + error ("Usage: -exec-continue [--all]");
> }
>
> /* Interrupt the execution of the target. Note how we must play around
I suggest you use mi_getopt instead, for consistency.
--
Daniel Jacobowitz
CodeSourcery