From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12975 invoked by alias); 16 Jun 2010 18:00:01 -0000 Received: (qmail 12917 invoked by uid 22791); 16 Jun 2010 17:59:59 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Jun 2010 17:59:51 +0000 Received: from kpbe18.cbf.corp.google.com (kpbe18.cbf.corp.google.com [172.25.105.82]) by smtp-out.google.com with ESMTP id o5GHxnAV017434 for ; Wed, 16 Jun 2010 10:59:49 -0700 Received: from vws2 (vws2.prod.google.com [10.241.21.130]) by kpbe18.cbf.corp.google.com with ESMTP id o5GHwwkk027061 for ; Wed, 16 Jun 2010 10:59:48 -0700 Received: by vws2 with SMTP id 2so318603vws.1 for ; Wed, 16 Jun 2010 10:59:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.63.12 with SMTP id z12mr5333060vch.120.1276711187671; Wed, 16 Jun 2010 10:59:47 -0700 (PDT) Received: by 10.220.189.201 with HTTP; Wed, 16 Jun 2010 10:59:47 -0700 (PDT) In-Reply-To: <4C18163D.5090802@codesourcery.com> References: <4C0983C3.6000604@codesourcery.com> <4C18163D.5090802@codesourcery.com> Date: Wed, 16 Jun 2010 18:00:00 -0000 Message-ID: Subject: Re: [RFC] Collecting strings at tracepoints From: Doug Evans To: Stan Shebs Cc: "gdb@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-06/txt/msg00060.txt.bz2 On Tue, Jun 15, 2010 at 5:09 PM, Stan Shebs wrote: > As Tom points out, it would actually be "*str@@" etc. Yeah, I know. I left that out as it wasn't germane to my msg. >> That feels too inconsistent: "@@" triggers the special "up until the >> first \0", *except* when its @/. >> "up until the first \0" is one thing and specifying a limit is an >> add-on. =A0Each should have their own syntax (e.g. str@@/80; it's >> perhaps klunkier, but @@ is klunky to begin with. :-)] >> > > I just threw "@/" out there as something that was parseable. =A0@ is a to= tally > general binary operator, the second argument doesn't have to be a constant > (not even for tracing). =A0So any extensions to it need to be something t= hat > is not ambiguous with anything else. =A0"@@" for the common case seemed > logical. =A0Allowing both "@@" and "@@" could get us into dangling-= else > style ambiguity; given that this is our arbitrary extension, why create > parsing ambiguity if there is no language syntax forcing us to? I don't quite follow. You're going from @ being a binary operator and extending it, to concerns of @@ vs @@. Guessing, you're not really extending @ except visually. > Second, it would apply to > everything in the collection line, whether you realized it or not; I can = see > users getting burned because FUNKYTYPE is typedef'ed to char on some > machines and not others, and so "collect /s str, funkytown" may fill the > trace buffer unexpectedly quickly. Ah. I wasn't aware one could do "collect a,b,c,d".