This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH] [testsuite] Disable Ctrl-V use for mingw hosts.
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Yao Qi'" <yao at codesourcery dot com>, "'Joel Brobecker'" <brobecker at adacore dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Tue, 8 Apr 2014 10:09:43 +0200
- Subject: RE: [PATCH] [testsuite] Disable Ctrl-V use for mingw hosts.
- Authentication-results: sourceware.org; auth=none
- References: <1395712934-29531-1-git-send-email-yao at codesourcery dot com> <533A2362 dot 3030405 at codesourcery dot com> <20140407163922 dot GB4250 at adacore dot com> <53439192 dot 9040801 at codesourcery dot com>
Hi all,
the comment is a more useful addition to the patch
than the change itself, so please don't forget to add
your name to mine in the ChangeLog entry!
Pierre Muller
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Yao Qi
> Envoyà : mardi 8 avril 2014 08:05
> Ã : Joel Brobecker
> Cc : gdb-patches@sourceware.org
> Objet : Re: [PATCH] [testsuite] Disable Ctrl-V use for mingw hosts.
>
> On 04/08/2014 12:39 AM, Joel Brobecker wrote:
> > Sorry about the wait. OK, but with a small change in the comment
> > to say that the ctrl-v character is not only unnecessary on MinGW
> > but actually harmful for the test because that character isn't
> > recognized as an escape character.
>
> OK, comments are updated. Patch below is pushed in.
>
> >
> > It'd be nice to know when @ is actually an escape character (just
> > thinking out loud, not asking you to do the research - a google
> > research doesn't quite clarify this for me).
>
> I don't know either.
>
> --
> Yao (éå)
>
> gdb/testsuite:
>
> 2014-04-08 Pierre Muller <muller@sourceware.org>
>
> * gdb.base/printcmds.exp (test_artificial_arrays): Disable
> Ctrl-V use for mingw hosts.
> ---
> gdb/testsuite/gdb.base/printcmds.exp | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.base/printcmds.exp
> b/gdb/testsuite/gdb.base/printcmds.exp
> index 8f38aca..3253d91 100644
> --- a/gdb/testsuite/gdb.base/printcmds.exp
> +++ b/gdb/testsuite/gdb.base/printcmds.exp
> @@ -631,8 +631,16 @@ proc test_print_typedef_arrays {} {
>
> proc test_artificial_arrays {} {
> # Send \026@ instead of just @ in case the kill character is @.
> - gdb_test_escape_braces "p int1dim\[0\]\026@2" " = {0, 1}" {p
> int1dim[0]@2}
> - gdb_test_escape_braces "p int1dim\[0\]\026@2\026@3" \
> + # \026 (ctrl-v) is to escape the next character (@), but it is
> + # not only unnecessary to do so on MingW hosts, but also harmful
> + # for the test because that character isn't recognized as an
> + # escape character.
> + set ctrlv "\026"
> + if [ishost *-*-mingw*] {
> + set ctrlv ""
> + }
> + gdb_test_escape_braces "p int1dim\[0\]${ctrlv}@2" " = {0, 1}" {p
> int1dim[0]@2}
> + gdb_test_escape_braces "p int1dim\[0\]${ctrlv}@2${ctrlv}@3" \
> "({{0, 1}, {2, 3}, {4, 5}}|\[Cc\]annot.*)" \
> {p int1dim[0]@2@3}
> gdb_test_escape_braces {p/x (short [])0x12345678} \
> --
> 1.8.1.4