This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 1/3] Linespec rewrite: Parsing


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]