From: Pierre Muller Date: Tue, 25 Mar 2014 00:37:36 +0000 (+0800) Subject: [testsuite] Disable Ctrl-V use for mingw hosts. X-Git-Tag: gdb-7.8-release~639 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ae1d276159c3cfb29caacdf567aea01f433f78b0;p=thirdparty%2Fbinutils-gdb.git [testsuite] Disable Ctrl-V use for mingw hosts. On mingw host, we have seen two fails as below, p int1dim[0]^V@2 Invalid character '^V' in expression. (gdb) FAIL: gdb.base/printcmds.exp: p int1dim[0]@2 p int1dim[0]^V@2^V@3 Invalid character '^V' in expression. (gdb) FAIL: gdb.base/printcmds.exp: p int1dim[0]@2@3 In the test, the comment says "# Send \026@ instead of just @ in case the kill character is @". Historically, kill character was @, and Ctrl-V (\026) is to escape the next character. However, we don't have to do so on mingw. This patch is to disable ctrl-v usage on mingw hots. With this patch applied, it becomes: p int1dim[0]@2 $607 = {0, 1} (gdb) PASS: gdb.base/printcmds.exp: p int1dim[0]@2 p int1dim[0]@2@3 $608 = {{0, 1}, {2, 3}, {4, 5}} Note that this patch is picked from Pierre's submission, [RFC 6/6] Fix remaining failures in gdb.base/printcmds.exp for mingw hosts. https://www.sourceware.org/ml/gdb-patches/2013-09/msg00943.html gdb/testsuite: 2014-04-08 Pierre Muller * gdb.base/printcmds.exp (test_artificial_arrays): Disable Ctrl-V use for mingw hosts. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 6826ec4bf65..5fca9d2243b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-04-08 Pierre Muller + + * gdb.base/printcmds.exp (test_artificial_arrays): Disable + Ctrl-V use for mingw hosts. + 2014-04-07 Siva Chandra Reddy * gdb.python/py-value.c: Improve test case. diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp index a4b5b475834..c667aa9a0f6 100644 --- a/gdb/testsuite/gdb.base/printcmds.exp +++ b/gdb/testsuite/gdb.base/printcmds.exp @@ -622,8 +622,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} \