From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Abhijit Halder <abhijit.k.halder@gmail.com>
Cc: "gdb-patches@sourceware.org ml" <gdb-patches@sourceware.org>
Subject: Re: [RFA 0/4] Implement | (pipe) command.
Date: Mon, 22 Apr 2019 21:14:00 -0000 [thread overview]
Message-ID: <1555967647.22002.7.camel@skynet.be> (raw)
In-Reply-To: <CAOhZP9yLdXh6gyabNZL7E12ORfhFvtHxJSsyJv29bGd9bbDyEQ@mail.gmail.com>
Hello Abhijit,
Yes, the fact that the command line interface of GDB has
no 'formal grammar' is sometimes making things difficult.
In this case, I thought it was not particularly important
to support | characters in the gdb command, but I might be wrong.
If we want to handle this case, then I would prefer
to have an optional argument: e.g. pipe [-dX] ... would indicate
to use the character X as delimiter between the GDB command
and the shell command.
This syntax is lightweight, and still allows by default to
re-run the previous command with
|| some_shell_command
In any case, I agree that either such case should be properly
handled e.g. with [-dX] or at least the limitation should
be documented in the user manual.
Thanks for the feedback,
Philippe
On Tue, 2019-04-23 at 02:14 +0530, Abhijit Halder wrote:
> Hi Philippe,
>
> If I see it correctly, the syntax of the command is
> pipe <gdb command> | <shell command>
> If the gdb command contains '|' the above syntax will be a problem.
> I suggest below syntaxÂ
> pipe <delimiter> <gdb command> <delimiter> <shell command>
> Here the advantage is the delimiter can be anything and conveniently be chosen by the user.
>
> I made a similar attempt few years back.
> https://sourceware.org/ml/gdb-patches/2012-01/msg00098.html
>
> This you can take this as a reference.
>
> Thanks,
> Abhijit Halder
>
>
>
> On Sun, Apr 21, 2019 at 2:52 AM Philippe Waroquiers <philippe.waroquiers@skynet.be> wrote:
> > This patch series adds the pipe command, that allows to send the output
> > of a GDB command to a shell command.
> >
> > The first patch allows a command to repeat a previous command.
> > Currently only used by the pipe command added in this series, but
> > the idea is that the slash command will also use this feature to
> > repeat a previous command.
> >
> >
> >
next prev parent reply other threads:[~2019-04-22 21:14 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-20 21:22 Philippe Waroquiers
2019-04-20 21:22 ` [RFA 1/4] Add previous_saved_command_line to allow a command to repeat a previous command Philippe Waroquiers
2019-04-24 20:51 ` Tom Tromey
2019-04-20 21:22 ` [RFA 2/4] Implement | (pipe) command Philippe Waroquiers
2019-04-21 5:19 ` Eli Zaretskii
2019-04-21 9:40 ` Philippe Waroquiers
2019-04-21 10:18 ` Eli Zaretskii
2019-04-22 10:30 ` Philippe Waroquiers
2019-04-22 11:08 ` Eli Zaretskii
2019-04-22 13:15 ` Philippe Waroquiers
2019-04-22 13:21 ` Eli Zaretskii
2019-04-24 20:50 ` Tom Tromey
2019-04-25 5:58 ` Eli Zaretskii
2019-04-20 21:22 ` [RFA 3/4] Test the " Philippe Waroquiers
2019-04-24 20:52 ` Tom Tromey
2019-04-20 21:22 ` [RFA 4/4] NEWS and documentation for " Philippe Waroquiers
2019-04-21 5:22 ` Eli Zaretskii
2019-04-22 20:45 ` [RFA 0/4] Implement " Abhijit Halder
2019-04-22 21:14 ` Philippe Waroquiers [this message]
2019-04-24 20:53 ` Tom Tromey
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=1555967647.22002.7.camel@skynet.be \
--to=philippe.waroquiers@skynet.be \
--cc=abhijit.k.halder@gmail.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