From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23647 invoked by alias); 26 Sep 2013 20:05:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 23633 invoked by uid 89); 26 Sep 2013 20:05:02 -0000 Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.222.215) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 26 Sep 2013 20:05:02 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.4 required=5.0 tests=AWL,BAYES_50,MSGID_MULTIPLE_AT,SPAM_SUBJECT autolearn=no version=3.3.2 X-HELO: mailhost.u-strasbg.fr Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antispam (Postfix) with ESMTP id 0E616A1081 for ; Thu, 26 Sep 2013 22:04:45 +0200 (CEST) Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antivirus (Postfix) with ESMTP id F2FFCA110A for ; Thu, 26 Sep 2013 22:04:44 +0200 (CEST) Received: from md16.u-strasbg.fr (md16.u-strasbg.fr [130.79.200.206]) by mr5.u-strasbg.fr (Postfix) with ESMTP id BD8F0A10F3 for ; Thu, 26 Sep 2013 22:04:43 +0200 (CEST) Received: from ms18.u-strasbg.fr (ms18.u-strasbg.fr [130.79.204.118]) by md16.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id r8QK4h9R018062 for ; Thu, 26 Sep 2013 22:04:43 +0200 (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (Authenticated sender: mullerp) by ms18.u-strasbg.fr (Postfix) with ESMTPSA id 1329B1FD77 for ; Thu, 26 Sep 2013 22:04:42 +0200 (CEST) From: "Pierre Muller" To: "'gdb-patches'" References: <002901cebaf2$35ec65a0$a1c530e0$@muller@ics-cnrs.unistra.fr> In-Reply-To: <002901cebaf2$35ec65a0$a1c530e0$@muller@ics-cnrs.unistra.fr> Subject: [RFC 6/6] Fix remaining failures in gdb.base/printcmds.exp for mingw hosts. Date: Thu, 26 Sep 2013 20:05:00 -0000 Message-ID: <003b01cebaf3$a2d79620$e886c260$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-SW-Source: 2013-09/txt/msg00943.txt.bz2 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 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