This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 1/3] Linespec rewrite: Parsing
- From: Tom Tromey <tromey at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: "gdb-patches\ at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Date: Mon, 26 Mar 2012 13:31:04 -0600
- Subject: Re: [RFA 1/3] Linespec rewrite: Parsing
- References: <4F67A319.4090608@redhat.com>
>>>>> "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.
Keith> + *(_p + 1) = '\0'; \
I'm curious if this is writing into temporary strings or into the input
string.
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.
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.
Tom