This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] Remove explicit leading space in query strings
- From: Patrick Palka <patrick at parcs dot ath dot cx>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Sun, 1 Nov 2015 10:25:05 -0500
- Subject: Re: [PATCH] Remove explicit leading space in query strings
- Authentication-results: sourceware.org; auth=none
- References: <1446122592-23638-1-git-send-email-patrick at parcs dot ath dot cx> <20151029182908 dot GE4009 at adacore dot com>
On Thu, Oct 29, 2015 at 2:29 PM, Joel Brobecker <email@example.com> wrote:
> On Thu, Oct 29, 2015 at 08:43:12AM -0400, Patrick Palka wrote:
>> Instead of requiring each caller of the query() family of functions to
>> add a leading space to the inputted query string (so that there is a
>> separator between the query string and the "(y or n)" suffix that is
>> appended to it), this patch instead makes the callee always add this
>> leading space before appending the "(y or n)" suffix, so that each caller
>> won't have to. (Some existing query strings passed to the query()
>> family of function did not yet have a leading space. This patch
>> also implicitly fixes such occurrences.)
>> I discovered the list of queries to change in this patch by grepping for
>> the string "? \")".
> The only comment I have is "leading" -> "trailing" ;-)
> Let's hope you see that before you push!
Oops, that is quite the mistake :)
I have not committed this patch yet. It causes a number of FAILs in
the testsuite due to a regex mismatch on some prompts that before
lacked a (ahem) leading space before "(y or n)" so these regexes
should be relaxed first or in tandem with this patch.