Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Stan Shebs <stan@codesourcery.com>
To: Doug Evans <dje@google.com>
Cc: Stan Shebs <stan@codesourcery.com>,
	 "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: [RFC] Collecting strings at tracepoints
Date: Wed, 16 Jun 2010 18:18:00 -0000	[thread overview]
Message-ID: <4C191555.5060404@codesourcery.com> (raw)
In-Reply-To: <AANLkTinKFgQapDhpUZKHakyV2qq-qOb1FWo0Kl7yOUrU@mail.gmail.com>

Doug Evans wrote:
> On Tue, Jun 15, 2010 at 5:09 PM, Stan Shebs <stan@codesourcery.com> wrote:
>   
>> I just threw "@/" out there as something that was parseable.  @ is a totally
>> general binary operator, the second argument doesn't have to be a constant
>> (not even for tracing).  So any extensions to it need to be something that
>> is not ambiguous with anything else.  "@@" for the common case seemed
>> logical.  Allowing both "@@" and "@@<expr>" 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 @@<expr>.
> Guessing, you're not really extending @ except visually.
>
>   

That's right.  Partly because the expedient for string collection right 
now is "*str@40", so it extends a known behavior, and partly because '@' 
is about the only character that isn't already claimed by language 
and/or GDB command syntax.

As far as parsing goes, it wasn't obvious to me whether it make more 
sense to add new tokens like "@@" etc, or to add syntax rules using 
single-char tokens.  I haven't actually tried implementing anything yet, 
although looking at the calendar, I think I'd better get busy. :-)

It occurs to me that /s and @@ are not mutually exclusive, and it 
wouldn't be bad if both forms were available.  Users like it when they 
can guess at the syntax and everything works as expected. :-)

Stan


  reply	other threads:[~2010-06-16 18:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-04 22:53 Stan Shebs
2010-06-04 23:00 ` Michael Snyder
2010-06-08 21:19 ` Tom Tromey
2010-06-15 22:51 ` Doug Evans
2010-06-16  0:09   ` Stan Shebs
2010-06-16 18:00     ` Doug Evans
2010-06-16 18:18       ` Stan Shebs [this message]
2010-06-16 18:27         ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C191555.5060404@codesourcery.com \
    --to=stan@codesourcery.com \
    --cc=dje@google.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox