From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16621 invoked by alias); 30 Sep 2013 09:38:11 -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 16610 invoked by uid 89); 30 Sep 2013 09:38:11 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Sep 2013 09:38:11 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8U9c465022685 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 30 Sep 2013 05:38:04 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r8U9c2aZ016438; Mon, 30 Sep 2013 05:38:03 -0400 Message-ID: <52494679.5090603@redhat.com> Date: Mon, 30 Sep 2013 09:38:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Pierre Muller CC: "'Yao Qi'" , "'Tom Tromey'" , "'gdb-patches'" Subject: Re: [RFC 3/6] mingw-hdep: Add "maint set testuite-mode on/off" command. References: <002901cebaf2$35ec65a0$a1c530e0$@muller@ics-cnrs.unistra.fr> <33207.6293569573$1380225714@news.gmane.org> <87pprufgl8.fsf@fleche.redhat.com> <5245c3a0.a3e2440a.4b98.ffffd279SMTPIN_ADDED_BROKEN@mx.google.com> <5245DE52.8080800@redhat.com> <52482EBA.5010209@codesourcery.com> <5248768B.4090705@redhat.com> <003701cebd67$4c9ea6b0$e5dbf410$@muller@ics-cnrs.unistra.fr> In-Reply-To: <003701cebd67$4c9ea6b0$e5dbf410$@muller@ics-cnrs.unistra.fr> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-09/txt/msg01002.txt.bz2 On 09/29/2013 11:57 PM, Pierre Muller wrote: > I found out that this patch > > $ cvs diff -up > cvs diff: Diffing . > Index: gdb.exp > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v > retrieving revision 1.246 > diff -u -p -r1.246 gdb.exp > --- gdb.exp 20 Sep 2013 21:47:05 -0000 1.246 > +++ gdb.exp 29 Sep 2013 22:50:10 -0000 > @@ -1454,6 +1454,9 @@ proc default_gdb_start { } { > perror "Spawning $GDB failed." > return 1 > } > + if [ishost "*-*-mingw*"] { > + fconfigure $res -translation {crlf crlf} > + } > gdb_expect 360 { > -re "\[\r\n\]$gdb_prompt $" { > verbose "GDB initialized." > > > works... That's great news! > but only for cygwin dejagnu... > > It doesn't on the dejagnu I found for msys system :( > After a looong debugging, it seems to turn out to be because > > (on msys)$ runtest --version > WARNING: Couldn't find the global config file. > Expect version is 5.26 > Tcl version is 8.4 > Framework version is 1.4.2.x > > while on cygwin: > $ runtest --version > Expect version is 5.45 > Tcl version is 8.5 > Framework version is 1.5 > > Which leads to the fact that remote_spawn directly calls spawn in 5.26, > while it uses open command in version 5.45... > The problem is that only the open command returns a channeled suitable for > fconfigure... > which leads to the following error on msys: > > ERROR: tcl error sourcing ../../../puresrc/gdb/testsuite/gdb.base/co1.exp. > ERROR: can not find channel named "6" > while executing > "fconfigure $res -translation {crlf crlf}" > invoked from within > "if [ishost "*-*-mingw*"] { > fconfigure $res -translation {crlf crlf} > }" > (procedure "default_gdb_start" line 37) > invoked from within > "default_gdb_start" > (procedure "gdb_start" line 2) > invoked from within > "gdb_start" > (procedure "clean_restart" line 7) > invoked from within > "clean_restart $executable" > (procedure "prepare_for_testing" line 6) > invoked from within > "prepare_for_testing $testfile.exp $testfile [list $srcfile $srcfile2] {debug n > owarnings}" > (file "../../../puresrc/gdb/testsuite/gdb.base/co1.exp" line 1) > ("uplevel" body line 1) > invoked from within > "catch "uplevel #0 source $test_file_name"" > > Any suggestions, other that throwing away the old dejagnu ... You can always try overriding remote_spawn -- in tcl, whatever definition of a procedure is loaded last overrides previous definitions. You could try copying new newer remote_spawn that uses open to your board file. Or copy the older remote_spawn, and tweak it just enough to use open. I have no idea if that would require a cascading series of replacements or other functions, but maybe still worth a try. But, anyway, if an easy workaround is not found, just requiring a newer dejagnu is reasonable and the way to go, IMO. -- Pedro Alves