This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [MI non-stop 05/11, RFA] -exec-continue/-exec-interrupt --all


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]