From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103948 invoked by alias); 9 Nov 2016 03:02:30 -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 103930 invoked by uid 89); 9 Nov 2016 03:02:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=Hx-languages-length:1080 X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Nov 2016 03:02:27 +0000 Received: by simark.ca (Postfix, from userid 33) id 6B37A1E809; Tue, 8 Nov 2016 22:02:25 -0500 (EST) To: Pedro Alves Subject: Re: [PATCH v2 2/5] Further cleanup/modernization of gdb.base/commands.exp X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 09 Nov 2016 03:02:00 -0000 From: Simon Marchi Cc: gdb-patches@sourceware.org In-Reply-To: <1478650771-24430-3-git-send-email-palves@redhat.com> References: <1478650771-24430-1-git-send-email-palves@redhat.com> <1478650771-24430-3-git-send-email-palves@redhat.com> Message-ID: <994221f0964b21175ece863b9e4eed59@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.2 X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00204.txt.bz2 On 2016-11-08 19:19, Pedro Alves wrote: > - Use multi_line for matching multi-line GDB output. > > - Add a multi_line_input variant of multi_line to build GDB input and > use it throughout. > > (The two changes above make the tests much more readable, IMO.) > > - Remove gdb_stop_suppressing_tests uses. > > - tighten a few regexps. > > - Replace send_gdb/gdb_expect with gdb_test_multiple and simplify, > making pass/fail messages the same. I agree, the test is now much more readable. > + gdb_test \ > + [multi_line_input \ > + "while \$foo > 0" \ > + " p/x 0xfeedface" \ > + " set \$foo -= 1" \ > + "end"] \ > + [multi_line \ > + "\\\$\[0-9\]* = 0xfeedface\[^\n\]*" \ > + "\\\$\[0-9\]* = 0xfeedface\[^\n\]*" \ > + "\\\$\[0-9\]* = 0xfeedface\[^\n\]*" \ > + "\\\$\[0-9\]* = 0xfeedface\[^\n\]*" \ > + "\\\$\[0-9\]* = 0xfeedface"] \ > + "#1" In these instance, what is the [^\n] meant to match? Is it the \r? In that case, multi_line matches it, so I think we can get rid of them (throughout the file).