From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13798 invoked by alias); 28 Feb 2002 11:09:33 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 13596 invoked from network); 28 Feb 2002 11:09:28 -0000 Received: from unknown (HELO executor.cambridge.redhat.com) (195.224.55.237) by sources.redhat.com with SMTP; 28 Feb 2002 11:09:28 -0000 Received: from prospero.cambridge.redhat.com (dell-paw-2.cambridge.redhat.com [195.224.55.226]) by executor.cambridge.redhat.com (Postfix) with ESMTP id 87D41ABB0C; Thu, 28 Feb 2002 11:09:27 +0000 (GMT) Received: by prospero.cambridge.redhat.com (Postfix, from userid 4046) id DBA8CF79EC; Thu, 28 Feb 2002 11:08:25 +0000 (GMT) To: gdb-patches@sources.redhat.com Cc: Jason Merrill Subject: PATCH to dejagnu/lib/remote.exp:check_for_board_status From: Jason Merrill Date: Thu, 28 Feb 2002 03:09:00 -0000 Message-ID: User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i686-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2002-02/txt/msg00735.txt.bz2 --=-=-= Content-length: 431 The status wrapper adds "*** EXIT code n" to the output. check_for_board_status tries to strip this, but the old regexp would only strip a CR or an LF, not both, so we were left with a trailing CR if the target uses the DOS EOL convention. Fixed thus. OK? 2002-02-28 Jason Merrill * lib/remote.exp (check_for_board_status): Remove both CR and LF at the beginning of the status wrapper output. --=-=-= Content-Type: text/x-patch Content-Disposition: inline Content-length: 928 *** remote.exp.~1~ Thu Feb 28 10:44:49 2002 --- remote.exp Thu Feb 28 02:31:07 2002 *************** proc check_for_board_status { variable *** 1057,1063 **** if [regexp "(^|\[\r\n\])\\*\\*\\* EXIT code" $output] { regsub "^.*\\*\\*\\* EXIT code " $output "" result; regsub "\[\r\n\].*$" $result "" result; ! regsub -all "(^|\[\r\n\])\\*\\*\\* EXIT code \[^\r\n\]*(\[\r\n\]\[\r\n\]?|$)" $output "" output; regsub "^\[^0-9\]*" $result "" result regsub "\[^0-9\]*$" $result "" result verbose "got board status $result" 3 --- 1057,1063 ---- if [regexp "(^|\[\r\n\])\\*\\*\\* EXIT code" $output] { regsub "^.*\\*\\*\\* EXIT code " $output "" result; regsub "\[\r\n\].*$" $result "" result; ! regsub -all "(^|\r?\n)\\*\\*\\* EXIT code \[^\r\n\]*(\r?\n|$)" $output "" output; regsub "^\[^0-9\]*" $result "" result regsub "\[^0-9\]*$" $result "" result verbose "got board status $result" 3 --=-=-=--