Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <vladimir@codesourcery.com>
To: Daniel Jacobowitz <dan@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Make -exec-run and -exec-until into 'real' MI commands
Date: Wed, 24 Feb 2010 07:34:00 -0000	[thread overview]
Message-ID: <201002241034.07535.vladimir@codesourcery.com> (raw)
In-Reply-To: <201002221723.48625.vladimir@codesourcery.com>

[-- Attachment #1: Type: Text/Plain, Size: 957 bytes --]

On Monday 22 February 2010 17:23:48 Vladimir Prus wrote:

> > > I believe the fact that no known frontends use args was raised the last time,
> > > but you still wanted to assume they exist.
> > 
> > Blech, I hate having to argue with myself.
> > 
> > I suggest asking for a second opinion then.  I don't think this
> > quoting is good enough to be a good idea.  I think we can get away
> > without it for -exec-run.  I don't know about -exec-until.
> 
> Apparently, nobody seem to have a second opinion :-(
> So, unless I hear objections by tomorrow, I will commit a patch that:
> 
> a) make -exec-run refuse to accept any parameters, as no frontend
> that cares is known.
> b) does nothing with -exec-until, since your point about \t seems like
> a killer. I'll fix -exec-until for MI3, whenever that comes around.

Nobody has spoked up, so I've checked in the below.

Thanks,

-- 
Vladimir Prus
CodeSourcery
vladimir@codesourcery.com
(650) 331-3385 x722

[-- Attachment #2: exec-run.diff --]
[-- Type: text/x-patch, Size: 2354 bytes --]

commit c5b28d25aa4e6126c642cfa72285041f7641aeae
Author: Vladimir Prus <vladimir@codesourcery.com>
Date:   Fri Dec 25 16:04:03 2009 +0300

    Make -exec-run a proper MI commands.
    
    	* mi/mi-cmds.h (mi_cmd_exec_run): Declare.
    	* mi/mi-cmds.c (mi_cmds): Adjust.
    	* mi/mi-main.c (mi_cmd_exec_run): New.

diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c
index 201d66b..1acd54c 100644
--- a/gdb/mi/mi-cmds.c
+++ b/gdb/mi/mi-cmds.c
@@ -65,7 +65,7 @@ struct mi_cmd mi_cmds[] =
   { "exec-next", { NULL, 0 }, mi_cmd_exec_next},
   { "exec-next-instruction", { NULL, 0 }, mi_cmd_exec_next_instruction},
   { "exec-return", { NULL, 0 }, mi_cmd_exec_return},
-  { "exec-run", { "run", 1 }, NULL},
+  { "exec-run", { NULL, 0}, mi_cmd_exec_run},
   { "exec-step", { NULL, 0 }, mi_cmd_exec_step},
   { "exec-step-instruction", { NULL, 0 }, mi_cmd_exec_step_instruction},
   { "exec-until", { "until", 1 }, NULL},
diff --git a/gdb/mi/mi-cmds.h b/gdb/mi/mi-cmds.h
index f76e217..7feb1c2 100644
--- a/gdb/mi/mi-cmds.h
+++ b/gdb/mi/mi-cmds.h
@@ -54,13 +54,14 @@ extern mi_cmd_argv_ftype mi_cmd_env_path;
 extern mi_cmd_argv_ftype mi_cmd_env_pwd;
 extern mi_cmd_argv_ftype mi_cmd_exec_continue;
 extern mi_cmd_argv_ftype mi_cmd_exec_finish;
+extern mi_cmd_argv_ftype mi_cmd_exec_interrupt;
 extern mi_cmd_argv_ftype mi_cmd_exec_jump;
 extern mi_cmd_argv_ftype mi_cmd_exec_next;
 extern mi_cmd_argv_ftype mi_cmd_exec_next_instruction;
 extern mi_cmd_argv_ftype mi_cmd_exec_return;
+extern mi_cmd_argv_ftype mi_cmd_exec_run;
 extern mi_cmd_argv_ftype mi_cmd_exec_step;
 extern mi_cmd_argv_ftype mi_cmd_exec_step_instruction;
-extern mi_cmd_argv_ftype mi_cmd_exec_interrupt;
 extern mi_cmd_argv_ftype mi_cmd_file_list_exec_source_file;
 extern mi_cmd_argv_ftype mi_cmd_file_list_exec_source_files;
 extern mi_cmd_argv_ftype mi_cmd_gdb_exit;
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 9d9e3da..f1b745c 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -330,6 +330,13 @@ mi_cmd_exec_interrupt (char *command, char **argv, int argc)
     error ("Usage: -exec-interrupt [--all|--thread-group id]");
 }
 
+void
+mi_cmd_exec_run (char *command, char **argv, int argc)
+{
+  mi_execute_cli_command ("run", target_can_async_p (),
+			  target_can_async_p () ? "&" : NULL);
+}
+
 static int
 find_thread_of_process (struct thread_info *ti, void *p)
 {

      reply	other threads:[~2010-02-24  7:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13 13:29 Vladimir Prus
2010-01-13 13:44 ` Marc Khouzam
2010-01-13 15:00   ` Vladimir Prus
2010-01-13 20:10 ` Daniel Jacobowitz
2010-01-13 20:13   ` Vladimir Prus
2010-01-13 20:26     ` Daniel Jacobowitz
2010-01-14  4:46       ` Joel Brobecker
2010-02-22 14:24         ` Vladimir Prus
2010-02-25 17:25           ` Joel Brobecker
2010-02-22 14:23       ` Vladimir Prus
2010-02-24  7:34         ` Vladimir Prus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201002241034.07535.vladimir@codesourcery.com \
    --to=vladimir@codesourcery.com \
    --cc=dan@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox