Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: "gdb-patches@sourceware.org ml" <gdb-patches@sourceware.org>
Subject: Re: [RFA 1/3] Linespec rewrite: Parsing
Date: Mon, 26 Mar 2012 20:36:00 -0000	[thread overview]
Message-ID: <4F70D32A.4020600@redhat.com> (raw)
In-Reply-To: <877gy788hz.fsf@fleche.redhat.com>

On 03/26/2012 12:31 PM, Tom Tromey wrote:
>>>>>> "Keith" == Keith Seitz<keiths@redhat.com>  writes:
>
> Keith>  +/* A convenience macro for trimming trailing whitespace
> Keith>  +   from string P.  */
>
> We have remove_trailing_whitespace now, see cli-utils.h.

[cough] I even wrote that... I've changed to using it.

> Keith>  +      *(_p + 1) = '\0';					\
>
> I'm curious if this is writing into temporary strings or into the input
> string.

This is called from copy_token_string. The string is allocated via 
savestring, so it should be safe to modify the string like this.

> I ask because I think the module would generally be friendlier if it
> were const-correct and did not write into the input strings.  This would
> make its behavior more predictable.  However I didn't audit it to see
> whether this is reasonably practical; and the language parsers may throw
> a wrench into this idea.

This was a goal. The input stream is never modified. Only a pointer to 
it is advanced, just like we do today.

> I only skimmed the rest, since:
>
> Keith>  I have pushed a patch to my archer branch which permits
> Keith>  quote-encapsulating the linespec. I have also reverted the
> Keith>  "invalid" linespec tests.
>
> ... I think it is time to send fresh patches.

Will do. [And I will follow Pedro's advice.]

Keith


      reply	other threads:[~2012-03-26 20:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-19 21:21 Keith Seitz
2012-03-20  3:56 ` Eli Zaretskii
2012-03-20  5:31   ` Keith Seitz
2012-03-20 17:26     ` Eli Zaretskii
2012-03-24 13:03 ` asmwarrior
2012-03-24 17:23   ` Keith Seitz
2012-03-25 12:27     ` asmwarrior
2012-03-26 13:23       ` asmwarrior
2012-03-25 12:28     ` asmwarrior
2012-03-26  0:40     ` Daniel Jacobowitz
2012-03-26 16:26       ` Tom Tromey
2012-03-26 18:52         ` Keith Seitz
2012-03-26 19:05       ` André Pönitz
2012-03-26 19:31 ` Tom Tromey
2012-03-26 20:36   ` Keith Seitz [this message]

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=4F70D32A.4020600@redhat.com \
    --to=keiths@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /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