From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4625 invoked by alias); 17 Sep 2013 14:06:06 -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 4616 invoked by uid 89); 17 Sep 2013 14:06:06 -0000 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 17 Sep 2013 14:06:06 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 222601163C2; Tue, 17 Sep 2013 10:06:18 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id K3DbNAODReE9; Tue, 17 Sep 2013 10:06:18 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id E57B8116369; Tue, 17 Sep 2013 10:06:17 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id E8F6FE1290; Tue, 17 Sep 2013 07:06:03 -0700 (PDT) Date: Tue, 17 Sep 2013 14:06:00 -0000 From: Joel Brobecker To: Yao Qi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 0/4] Match \r\r\n in testsuite Message-ID: <20130917140603.GK3132@adacore.com> References: <87a9ldyu8k.fsf@fleche.redhat.com> <1379423179-8515-1-git-send-email-yao@codesourcery.com> <20130917133530.GH3132@adacore.com> <52386003.2050501@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52386003.2050501@codesourcery.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-09/txt/msg00513.txt.bz2 > Yeah, that is fine to me. Considering patch 4/4, I'd like introduce > two variables, $cr and $eol, which can be defined like this, > > if [istarget "*-*-mingw*"] { > set cr "\r\r" > } else { > set cr "\r" > } > > set eol "${cr}\n" > > In this way, patch 3/4 can be updated to something like, > > - set mi_gdb_prompt "\[(\]gdb\[)\] \r\n" > + set mi_gdb_prompt "\[(\]gdb\[)\] ${eol}" > > and patch 4/4 can be updated to something like, > > -gdb_test "info trace" "in gdb_recursion_test.*$srcfile:$testline2. > +gdb_test "info trace" "in gdb_recursion_test.*$srcfile:$testline2${cr} > > patch 1/4/ and 2/4 can be unchanged. What do you think? Can we look at fixing gdb_test to use that $eol instead? Is that even necessary? I see the implementation is: return [gdb_test_multiple $command $message { -re "\[\r\n\]*($pattern)\[\r\n\]+$gdb_prompt $" { if ![string match "" $message] then { pass "$message" } } It seems to me that it should match ${eol} already, no? -- Joel