From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24114 invoked by alias); 22 Oct 2008 14:15:13 -0000 Received: (qmail 24102 invoked by uid 22791); 22 Oct 2008 14:15:12 -0000 X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 22 Oct 2008 14:13:19 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.2/jtpda-5.5pre1) with ESMTP id m9MEDEAd034573 ; Wed, 22 Oct 2008 16:13:14 +0200 (CEST) Received: from mailserver.u-strasbg.fr (ms2.u-strasbg.fr [IPv6:2001:660:2402::142]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id m9MEDEBi084736 ; Wed, 22 Oct 2008 16:13:14 +0200 (CEST) Received: from d620muller (www-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id m9MEDD9q081832 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Wed, 22 Oct 2008 16:13:14 +0200 (CEST) (envelope-from muller@ics.u-strasbg.fr) From: "Pierre Muller" To: "'Denis PILAT'" Cc: "'gdb-patches'" References: <48FC4417.2030807@st.com> <000001c9342a$189a83a0$49cf8ae0$@u-strasbg.fr> <48FF24D8.4080204@st.com> In-Reply-To: <48FF24D8.4080204@st.com> Subject: RE: Mingw gdb validation Date: Wed, 22 Oct 2008 14:15:00 -0000 Message-ID: <000a01c93450$52e50aa0$f8af1fe0$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Content-Language: en-us X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (mailhost.u-strasbg.fr [IPv6:2001:660:2402::155]); Wed, 22 Oct 2008 16:13:15 +0200 (CEST) X-Virus-Status: Clean 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 X-SW-Source: 2008-10/txt/msg00542.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Denis PILAT > Envoy=E9=A0: Wednesday, October 22, 2008 3:04 PM > =C0=A0: Pierre Muller > Cc=A0: 'gdb-patches' > Objet=A0: Re: Mingw gdb validation >=20 >=20 >=20 > Pierre Muller wrote: > > I thought about this a while ago also, > > and I was wondering if the best solution would not be to > > have a global nl variable defined in gdb.exp > > that would depend on the target you are testing. > > I also thought at that time that we should > > define two global variables: nl and nls. > > "nl" as being something that is a single newline > > defined generally as "\[\r\n\]" but probably as "\[\r\n\]\n?" for > mingw32 > > and > > "nls" if more than one newline is allowed and should generally be > simply > > "\[\r\n\]*" > > > If it's more than one we should use "\[\r\n\]+". I agree=20 grep -o '\\\[\\r\\n\\\]+' | wc -l gives me 654 matching's for "\[\r\n\]+" pattern nevertheless, grep -o '\\\[\\r\\n\\\]\*' | wc -l also finds 47 matchs for "\[\r\n\]*" pattern. Finally=20 grep -o '\\\[\\r\\n\\\]\*' | wc -l gives me 1048 matching's... Lengthy work indeed, but rather straightforward if we can write a bullet-proof sed substitution rule... So maybe we would really need three variants: one for "\[\r\n\]+" one for "\[\r\n\]*" and a third one for all other "\[\r\n\]" appearances... By the way, there is also one "\[\n\r\]" occurrence: in gdb.stabs/exclfwd.exp: set eol "\[ \t\]*\[\n\r\]+" which, despite being semantically equal to the usual "\[\r\n\]" pattern used, could be forgotten in the change... Maybe we can create a group even for the special mingw case that would allow the + and * modifiers in the regular expressions to work as expected... But the trickiness on regular expression inside expect (or is it tcl per-se?)=20 > > Nevertheless, changing all tests to use nl and nls > > is probably not an easy task... > > > That's just a long task, but I think it's easier than understanding why > some tests require end-of-line testing, and some tests do not. See my > previous mail about gdb.cp/userdef.exp. I completely agree with you here, I would not like to try to understand for each individual=20 use of the "\[\r\n\]" pattern, why it was inserted and why there is (or is not) a '*' or '+' modifier on it! > I'm afraid there could be some tests that has been written to match the > gdb behavior, even if it was not a correct behavior. I hope that, if we are able to generate a loooong single patch containing all those changes and have no effect on the testsuite results on a ordinary target, it would be very unlikely that we break anything on other targets. But of course, we need to get feedback from our global maintainers on that issue. Pierre Muller Pascal language support maintainer for GDB