From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32055 invoked by alias); 12 Jul 2011 07:15:52 -0000 Received: (qmail 32045 invoked by uid 22791); 12 Jul 2011 07:15:51 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ey0-f169.google.com (HELO mail-ey0-f169.google.com) (209.85.215.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Jul 2011 07:15:36 +0000 Received: by eyd9 with SMTP id 9so1764506eyd.0 for ; Tue, 12 Jul 2011 00:15:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.33.12 with SMTP id f12mr1738925ebd.148.1310454934759; Tue, 12 Jul 2011 00:15:34 -0700 (PDT) Received: by 10.213.4.207 with HTTP; Tue, 12 Jul 2011 00:15:34 -0700 (PDT) In-Reply-To: <201107120117.42796.vapier@gentoo.org> References: <201107120117.42796.vapier@gentoo.org> Date: Tue, 12 Jul 2011 09:01:00 -0000 Message-ID: Subject: Re: PATCH From: Abhijit Halder To: Mike Frysinger Cc: gdb-patches@sourceware.org, Tom Tromey Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/msg00298.txt.bz2 Yes Mike. I am really sorry for this silly post made in hurry. Yes since the pipe (|) symbol is also a c operator, it will confuse gdb. Even if we use |& we may land up into a trouble situation. Breakpoint 1, main (argc=3D1, argv=3D0x7fffb6e506a8) at test.c:15 15 return (SUCCESS) ; (gdb) p argc|&*argc $1 =3D 1 (gdb) p argc |& *argc $2 =3D 1 (gdb) On Tue, Jul 12, 2011 at 10:47 AM, Mike Frysinger wrote: > On Tuesday, July 12, 2011 00:24:15 Abhijit Halder wrote: > > please do not top post in your replies > >> How if we just put a condition check whether the entered string after >> pipe (|) is numeric. For e.g. >> (gdb) thread apply all bt | grep foobar >> Here the entered string after | is grep foobar which is not numeric. >> But here (gdb) print var | 0x50 is numeric. > > that wont work as it's "EXPR | EXPR". =A0so you could do: > (gdb) print x | x > > or if your variable was named "vim", it's impossible to determine the use= r's > intention if they wrote something like: > (gdb) print x | vim > do they want the variable "vim" ? =A0or do they want to shell out to `vim= ` ? > > i think we'll have to introduce a dedicated operator here that doesn't sh= ow up > in C expressions. =A0how about "|&" ? =A0this is a bashism for doing > redirection+pipe in one go, so it'll be somewhat familiar to people. > > along those lines, i wonder if generic redirection operators would be use= ful > too. =A0something like: > (gdb) thread apply all bt >& file > -mike >