PATCH
Mike Frysinger
vapier@gentoo.org
Tue Jul 12 20:43:00 GMT 2011
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
More information about the Gdb-patches
mailing list