From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19106 invoked by alias); 12 Jul 2011 17:31:37 -0000 Received: (qmail 19095 invoked by uid 22791); 12 Jul 2011 17:31:35 -0000 X-SWARE-Spam-Status: No, hits=-2.5 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-gw0-f41.google.com (HELO mail-gw0-f41.google.com) (74.125.83.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Jul 2011 17:31:20 +0000 Received: by gwaa12 with SMTP id a12so2394752gwa.0 for ; Tue, 12 Jul 2011 10:31:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.78.227 with SMTP id g63mr263810yhe.438.1310491879803; Tue, 12 Jul 2011 10:31:19 -0700 (PDT) Received: by 10.236.109.131 with HTTP; Tue, 12 Jul 2011 10:31:19 -0700 (PDT) In-Reply-To: References: <201107120117.42796.vapier@gentoo.org> Date: Tue, 12 Jul 2011 17:49:00 -0000 Message-ID: Subject: Re: PATCH From: Matt Rice To: Mike Frysinger Cc: Abhijit Halder , gdb-patches@sourceware.org, Tom Tromey 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/msg00305.txt.bz2 On Tue, Jul 12, 2011 at 8:59 AM, Mike Frysinger wrote: > On Tue, Jul 12, 2011 at 03:15, Abhijit Halder wrote: > > please dont top post in your replies > >> Yes Mike. I am really sorry for this silly post made in hurry. > > no need to apologize ... this is what code review is for > >> 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 =A0 =A0 =A0 =A0 =A0return (SUCCESS) ; >> (gdb) p argc|&*argc >> $1 =3D 1 >> (gdb) p argc |& *argc >> $2 =3D 1 >> (gdb) > > i'm not seeing this. =A0on an unmodified gdb-7.2, i get: > (gdb) p g > $1 =3D 0xa > (gdb) p g |& g > Argument to arithmetic operation not a number or boolean. > > so what am i missing ? > -mike > this one should work. p 0 |& argv[argc] - &argv[0]