From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: "'Denis PILAT'" <denis.pilat@st.com>
Cc: "'gdb-patches'" <gdb-patches@sourceware.org>
Subject: RE: Mingw gdb validation
Date: Wed, 22 Oct 2008 14:15:00 -0000 [thread overview]
Message-ID: <000a01c93450$52e50aa0$f8af1fe0$@u-strasbg.fr> (raw)
In-Reply-To: <48FF24D8.4080204@st.com>
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Denis PILAT
> Envoyé : Wednesday, October 22, 2008 3:04 PM
> À : Pierre Muller
> Cc : 'gdb-patches'
> Objet : Re: Mingw gdb validation
>
>
>
> 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
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
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?)
> > 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
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
next prev parent reply other threads:[~2008-10-22 14:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-20 8:41 Denis PILAT
2008-10-22 9:40 ` Pierre Muller
2008-10-22 13:05 ` Denis PILAT
2008-10-22 14:15 ` Pierre Muller [this message]
2008-10-22 13:27 ` Daniel Jacobowitz
2008-10-22 13:32 ` Pedro Alves
2008-10-22 13:38 ` Denis PILAT
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000a01c93450$52e50aa0$f8af1fe0$@u-strasbg.fr' \
--to=muller@ics.u-strasbg.fr \
--cc=denis.pilat@st.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox