From: Abhijit Halder <abhijit.k.halder@gmail.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: Tom Tromey <tromey@redhat.com>, gdb-patches@sourceware.org
Subject: Re: PATCH
Date: Fri, 15 Jul 2011 14:15:00 -0000 [thread overview]
Message-ID: <CAOhZP9wFida5yEsH3s-_QzHLoUR0L6=D4fkLyFF8C5ecfzrpqA@mail.gmail.com> (raw)
In-Reply-To: <CAOhZP9ynU6DvYGojD_O6KFu4m=jxmjaxTho58Ct5ZE9sr86H+A@mail.gmail.com>
Hi,
I have made the changes to handle following cases. Should I re-submit
the new patch in the same thread, or I change the subject line (as it
does not reveal much the problem definition) and re-submit the patch
in a new thread?
On Wed, Jul 13, 2011 at 12:39 PM, Abhijit Halder
<abhijit.k.halder@gmail.com> wrote:
> Just a quick thought. How if we can do something like this:
>
> (gdb) gdb_command_with_arguments | "shell_command_with_argument"
>
> Since pipe (|) as c operator will never expect any rvalue within
> string, we are safe. We just have to ensure that odd number of
> double-quote (") not present before (left-side of) the pipe to
> safe-guard a case like below.
>
> (gdb) p "Hi | Bye"
>
> Further, the shell command may itself contain double-quote. We have to
> allow nested double-quote.
>
> (gdb) thread apply all bt | " grep "foobar" "
>
>
> On Wed, Jul 13, 2011 at 2:00 AM, Mike Frysinger <vapier@gentoo.org> wrote:
>> On Tue, Jul 12, 2011 at 15:25, Tom Tromey wrote:
>>>>>>>> "Abhijit" == Abhijit Halder writes:
>>> Abhijit> How if we just put a condition check whether the entered string after
>>> Abhijit> pipe (|) is numeric. [...]
>>>
>>> I was too terse yesterday. The big problem with any generic approach is
>>> that GDB syntax is free-form: each command defines its own syntax. So,
>>> for any syntax you think up, there is a decent chance that it already
>>> means something to some command, or could.
>>>
>>> This doesn't mean it is impossible, just difficult.
>>
>> i was also pondering reversing the order. rather than being a suffix
>> that gets mucked up in syntax, add a pass through. but that too can
>> get ugly.
>>
>> pipe <command to pipe into> <normal command> <command args>
>> (gdb) pipe "vim -" thread apply all bt
>>
>>> We already have "set logging". This isn't as convenient to use, but it
>>> could certainly be extended to allow pipes.
>>
>> when i thought of a secondary command, i think half the power of what
>> Abhijit proposes is having it in a single command. especially when
>> shell scripting is all about slightly tweaking the command and looking
>> at the result. that way you dont keep flipping between the two -- one
>> to update the command to pipe into, and two to update the stuff you're
>> piping out.
>> -mike
>>
>
next prev parent reply other threads:[~2011-07-15 6:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-09 13:09 PATCH Abhijit Halder
2011-07-09 19:06 ` PATCH oza Pawandeep
2011-07-11 12:13 ` PATCH Abhijit Halder
2011-07-11 13:42 ` PATCH Abhijit Halder
2011-07-10 7:47 ` PATCH Mike Frysinger
2011-07-11 21:10 ` PATCH Tom Tromey
2011-07-12 0:51 ` PATCH Abhijit Halder
2011-07-12 7:15 ` PATCH Abhijit Halder
2011-07-12 8:34 ` PATCH Mike Frysinger
2011-07-12 9:01 ` PATCH Abhijit Halder
2011-07-12 17:31 ` PATCH Mike Frysinger
2011-07-12 17:49 ` PATCH Matt Rice
2011-07-12 19:25 ` PATCH Mike Frysinger
2011-07-12 19:49 ` PATCH Tom Tromey
2011-07-12 20:43 ` PATCH Mike Frysinger
2011-07-13 8:45 ` PATCH Abhijit Halder
2011-07-15 14:15 ` Abhijit Halder [this message]
2011-07-15 20:49 ` PATCH Tom Tromey
2011-07-20 19:25 ` PATCH Sergio Durigan Junior
2011-07-21 11:08 ` gdb output pipelining to shell (was: Re: PATCH) 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='CAOhZP9wFida5yEsH3s-_QzHLoUR0L6=D4fkLyFF8C5ecfzrpqA@mail.gmail.com' \
--to=abhijit.k.halder@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
--cc=vapier@gentoo.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