From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8639 invoked by alias); 12 Jul 2011 20:30:45 -0000 Received: (qmail 8630 invoked by uid 22791); 12 Jul 2011 20:30:45 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-iy0-f169.google.com (HELO mail-iy0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Jul 2011 20:30:20 +0000 Received: by iyl8 with SMTP id 8so5858115iyl.0 for ; Tue, 12 Jul 2011 13:30:20 -0700 (PDT) Received: by 10.42.28.198 with SMTP id o6mr301292icc.415.1310502620152; Tue, 12 Jul 2011 13:30:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.213.134 with HTTP; Tue, 12 Jul 2011 13:30:00 -0700 (PDT) In-Reply-To: References: From: Mike Frysinger Date: Tue, 12 Jul 2011 20:43:00 -0000 Message-ID: Subject: Re: PATCH To: Tom Tromey Cc: Abhijit Halder , gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00321.txt.bz2 On Tue, Jul 12, 2011 at 15:25, Tom Tromey wrote: >>>>>> "Abhijit" =3D=3D 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. =A0The big problem with any generic approach is > that GDB syntax is free-form: each command defines its own syntax. =A0So, > 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 (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