From: Abhijit Halder <abhijit.k.halder@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org, sergiodj@redhat.com,
jan.kratochvil@redhat.com, tromey@redhat.com,
pedro@codesourcery.com
Subject: Re: [PATCH][TEST-CASE][DOC] Implementation of pipe to pass GDB's command output to the shell.
Date: Sun, 28 Aug 2011 08:52:00 -0000 [thread overview]
Message-ID: <CAOhZP9xjcmu+JHxn8h5g2cqzx3XzTgtSi9cuWEJrhkMPb59TYQ@mail.gmail.com> (raw)
In-Reply-To: <83pqjsfjsy.fsf@gnu.org>
On Fri, Aug 26, 2011 at 5:48 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Fri, 26 Aug 2011 17:13:28 +0530
>> From: Abhijit Halder <abhijit.k.halder@gmail.com>
>> Cc: Eli Zaretskii <eliz@gnu.org>, Sergio Durigan Junior <sergiodj@redhat.com>,
>> Jan Kratochvil <jan.kratochvil@redhat.com>, Tom Tromey <tromey@redhat.com>,
>> Pedro Alves <pedro@codesourcery.com>
>>
>> I am creating this new thread as the earlier threads went very long.
>> This patch contains code change, test-cases and documentation as well.
>
> Thanks.
>
>> +@node Output Redirection
>> +@chapter Redirecting @value{GDBN}'s Command Output to the Shell
>
> I'd rather not make this a new chapter. I think a subsection of the
> Input/Output node is a much better place.
>
Actually I could not find such section. Can someone please direct me
to the appropriate section?
>> +@value{GDBN}'s command output can be redirected to the shell using @code{pipe}
> ^^^^^^^^^^^^
> "to a shell command", I think.
Yes. I will correct this.
>
>> Even if the environment variable
>> +@code{SHELL} is set, the default shell (@file{/bin/sh} on Unix systems,
>> +@file{COMMAND.COM} on MS-DOS, etc.) is used.
>
> This might be seen by some as a
>
Sorry I am getting this. Please give me some more context.
>> The @code{pipe} command expects
>> +in its argument a delimiter string (without having any whitespace), followed by
>> +a @value{GDBN} command, followed by the same delimiter string and finally a
>> +shell command. The delimiter should not contain any leading `-'.
>> +
>> +@smallexample
>> +(@value{GDBP}) @b{pipe | thread apply all bt | cat >./analyze_threads.log}
>> +@end smallexample
>
> Please explain which part is the "delimiter" here. Since you are
> using the "normal" shell pipe character `|', the above explanation
> about the delimiter string will raise a few brows. A word about why
> you need something beyond the usual `|' would also be nice.
>
Sure.
> In addition, I think we should explain which parts of the command are
> passed to the shell verbatim and which parts are processed by GDB. If
> the last part ("cat >./analyze_threads.log") is passed to the shell,
> then it must use the shell syntax (e.g., backslashes on MS-DOS/Windows).
>
Sure.
> Finally, can we have a more useful example than just redirecting the
> output to a file? Such redirection can be achieved without this
> command at all.
>
Sure. I will try to provide some useful application.
> Please also remove the @b markup, it is not used anywhere in the
> examples we have in the manual.
>
Ok, I think when we need to show the command output along with the
command itself, the only the command has to be within @b markup.
>> +* New command "pipe" has been added to make GDB command output available to the
>> + shell for processing.
>
> "available to shell commands"
>
next prev parent reply other threads:[~2011-08-28 8:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-26 11:43 Abhijit Halder
2011-08-26 12:18 ` Eli Zaretskii
2011-08-28 8:52 ` Abhijit Halder [this message]
2011-08-28 9:25 ` Eli Zaretskii
2011-08-28 9:51 ` Eli Zaretskii
2011-08-28 10:12 ` Eli Zaretskii
2011-08-30 13:58 ` Abhijit Halder
2011-08-30 14:27 ` Pedro Alves
2011-08-30 14:32 ` Abhijit Halder
2011-08-30 14:49 ` Abhijit Halder
2011-08-30 16:38 ` Abhijit Halder
2011-08-30 18:07 ` Eli Zaretskii
2011-08-31 8:44 ` Abhijit Halder
2011-08-31 11:01 ` Eli Zaretskii
2011-08-31 12:42 ` Abhijit Halder
2011-08-31 13:26 ` Eli Zaretskii
2011-08-30 18:09 ` Eli Zaretskii
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=CAOhZP9xjcmu+JHxn8h5g2cqzx3XzTgtSi9cuWEJrhkMPb59TYQ@mail.gmail.com \
--to=abhijit.k.halder@gmail.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=pedro@codesourcery.com \
--cc=sergiodj@redhat.com \
--cc=tromey@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