From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Pedro Alves <palves@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [RFA] Make first and last lines of 'command help documentation' consistent.
Date: Mon, 29 Jul 2019 21:27:00 -0000 [thread overview]
Message-ID: <1564435657.1435.4.camel@skynet.be> (raw)
In-Reply-To: <662100d4-a245-8010-f1bc-a75987ef54f9@redhat.com>
On Thu, 2019-07-11 at 14:49 +0100, Pedro Alves wrote:
> On 6/16/19 8:58 PM, Philippe Waroquiers wrote:
> > @@ -448,8 +448,8 @@ _initialize_interpreter (void)
> > c = add_cmd ("interpreter-exec", class_support,
> > interpreter_exec_cmd, _("\
> > Execute a command in an interpreter.\n\
> > -It takes two arguments:\n\
> > +Usage: interpreter-exec INTERPRETER COMMAND...\n\
> > The first argument is the name of the interpreter to use.\n\
> > -The second argument is the command to execute."), &cmdlist);
> > +The following arguments are the commands to execute."), &cmdlist);
>
> This sentence is incorrect -- there's only one command to execute.
The code loops over a set of strings,
and execute each of these strings.
When trying:
(gdb) interpreter-exec console bt bt
#0Â Â 0x00007ffff78fe603 in select () at ../sysdeps/unix/syscall-template.S:84
#1Â Â 0x0000555555554f5e in sleeper_or_burner (v=0x7fffffffdf30) at sleepers.c:86
#2Â Â 0x000055555555549d in main (argc=1, argv=0x7fffffffe0b8) at sleepers.c:194
#0Â Â 0x00007ffff78fe603 in select () at ../sysdeps/unix/syscall-template.S:84
#1Â Â 0x0000555555554f5e in sleeper_or_burner (v=0x7fffffffdf30) at sleepers.c:86
#2Â Â 0x000055555555549d in main (argc=1, argv=0x7fffffffe0b8) at sleepers.c:194
(gdb)
Now, I have to admit that at least for the console interpreter, unclear where
the syntax for the arguments is described.
Looks like the below works:
(gdb) interpreter-exec console bt\ 1 bt\ 2
#0Â Â 0x00007ffff78fe603 in select () at ../sysdeps/unix/syscall-template.S:84
(More stack frames follow...)
#0Â Â 0x00007ffff78fe603 in select () at ../sysdeps/unix/syscall-template.S:84
#1Â Â 0x0000555555554f5e in sleeper_or_burner (v=0x7fffffffdf30) at sleepers.c:86
(More stack frames follow...)
(gdb)Â
This also works:
(gdb) interpreter-exec console "bt 1" "bt 2"
#0Â Â 0x00007ffff78fe603 in select () at ../sysdeps/unix/syscall-template.S:84
(More stack frames follow...)
#0Â Â 0x00007ffff78fe603 in select () at ../sysdeps/unix/syscall-template.S:84
#1Â Â 0x0000555555554f5e in sleeper_or_burner (v=0x7fffffffdf30) at sleepers.c:86
(More stack frames follow...)
(gdb)Â
So, it looks like really several commands can be given, but I am not sure
if the commands and argument syntax is the same for all interpreters.
Also, when looking at some mi documentation, we again see only one command
mentionned:
The '-interpreter-exec' Command
-------------------------------
Synopsis
--------
     -interpreter-exec INTERPRETER COMMAND
   Execute the specified COMMAND in the given INTERPRETER.
> You meant to say that it's the command to execute and its arguments.
> As it was before was also correct, IMHO.
>
> > set_cmd_completer (c, interpreter_completer);
> > }
>
> Thanks,
> Pedro Alves
next prev parent reply other threads:[~2019-07-29 21:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-16 19:58 Philippe Waroquiers
2019-07-05 20:04 ` PING " Philippe Waroquiers
2019-07-10 17:02 ` Tom Tromey
2019-07-10 22:31 ` Philippe Waroquiers
2019-07-11 12:22 ` Tom Tromey
2019-07-11 12:53 ` Pedro Alves
2019-07-11 13:12 ` Tom Tromey
2019-07-11 15:49 ` Pedro Alves
2019-07-11 15:51 ` Pedro Alves
2019-07-11 15:58 ` Tom Tromey
2019-07-11 15:44 ` Pedro Alves
2019-07-11 13:49 ` Pedro Alves
2019-07-29 21:27 ` Philippe Waroquiers [this message]
2019-07-11 14:18 ` Pedro Alves
2019-07-11 15:39 ` Pedro Alves
2019-07-11 15:43 ` Pedro Alves
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=1564435657.1435.4.camel@skynet.be \
--to=philippe.waroquiers@skynet.be \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/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