From: Yao Qi <yao@codesourcery.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH] [testsuite] Disable Ctrl-V use for mingw hosts.
Date: Tue, 08 Apr 2014 06:07:00 -0000 [thread overview]
Message-ID: <53439192.9040801@codesourcery.com> (raw)
In-Reply-To: <20140407163922.GB4250@adacore.com>
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
next prev parent reply other threads:[~2014-04-08 6:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 2:05 Yao Qi
2014-04-01 2:26 ` Yao Qi
2014-04-07 16:39 ` Joel Brobecker
2014-04-08 6:07 ` Yao Qi [this message]
2014-04-08 8:09 ` Pierre Muller
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=53439192.9040801@codesourcery.com \
--to=yao@codesourcery.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/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