This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFC 6/6] Fix remaining failures in gdb.base/printcmds.exp for mingw hosts.
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'gdb-patches'" <gdb-patches at sourceware dot org>
- Date: Thu, 26 Sep 2013 22:04:40 +0200
- Subject: [RFC 6/6] Fix remaining failures in gdb.base/printcmds.exp for mingw hosts.
- Authentication-results: sourceware.org; auth=none
- References: <002901cebaf2$35ec65a0$a1c530e0$ at muller@ics-cnrs.unistra.fr>
Subject: [PATCH
This last patch fixes the remaining failures in
testsuite/gdb.base/printcmds.exp
for mingw hosts.
The first part has to do with the fact that GDB prints
the memory address and the closest symbol while the test
doesn't cope for this.
I simply fixed this by setting/unsetting printing of
addresses and symbols at specific locations.
The last errors were generated by the use of Ctrl-V
to avoid problems with possible association of @ to kill command.
mingw GDB doesn't handle this Ctrl-V, so I conditionally removed it for
*-*-mingw* hosts.
Pierre Muller
GDB pascal language maintainer
2013-09-26 Pierre Muller <muller@sourceware.org>
printcmds.exp (test_print_trings): Disable and reenable printing of
addresses and symbols.
(test_artificial_arrays): Disable Ctrl-V use for mingw hosts.
---
gdb/testsuite/gdb.base/printcmds.exp | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.base/printcmds.exp
b/gdb/testsuite/gdb.base/printcmds.exp
index 60e4a7f..128c5e1 100644
--- a/gdb/testsuite/gdb.base/printcmds.exp
+++ b/gdb/testsuite/gdb.base/printcmds.exp
@@ -488,6 +488,9 @@ proc test_print_strings {} {
# Test that setting print elements unlimited doesn't completely
suppress
# printing; this was a bug in older gdb's.
+ gdb_test_no_output "set print address off"
+ gdb_test_no_output "set print symbol off"
+
gdb_test_no_output "set print elements 0"
gdb_test "p teststring" \
" = (.unsigned char .. )?\"teststring contents\"" "p teststring with
elements set to 0"
@@ -504,6 +507,7 @@ proc test_print_strings {} {
gdb_test "p teststring" \
" = (.unsigned char .. )?\"teststring contents\"" "p teststring with
elements set to 20"
+ gdb_test_no_output "set print symbol on"
gdb_test_no_output "set print elements 8"
gdb_test "p &ctable1\[0\]" \
@@ -622,8 +626,14 @@ 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" \
+ # Mingw hosts do not seem to handle this correctly.
+ 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.7.9