This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A patch for gnu-regex


"H . J . Lu" wrote:
> 
> On Thu, Mar 09, 2000 at 04:29:45PM +0100, Guenther Grau wrote:
> > Andrew Cagney wrote:
> > >
> > [...]
> > > > http://sourceware.cygnus.com/ml/gdb-patches/2000-q1/msg00562.html
> > > > http://sourceware.cygnus.com/ml/gdb-patches/2000-q1/msg00566.html
> > >
> > > This patch is definitly much better than the original.
> > >
> > > Unfortunatly, I don't think that selecting a pre-installed regexp should
> > > be the default.  My rationale (As Mark? noted) is that ensuring that a
> > > GDB release provides consistent behavour between systems (1) is more
> > > important than having it select the latest/greatest random regexp.
> >
> > I support this (not that it matters :-). If H.J. Lu wants it on
> > Linux, he can ./configure --with-libc-regex or --with-native-regex,
> 
> --with-libc-regex and --with-native-regex are misleading since
> the regex in gdb coms from the Linux C library.

It might be a derived version, but it is not the same.
So what's the problem with these names? And if you don't
like them, find another name that suits you :-) How about

--with-linux-libc-regex-and-not-the-linux-libc-derived-version-within-gdb

or

--with-working-native-regex

;-) ?

What, if the gdb regex-implementation were not derived from
the linux libc-regex implementation? Would you still care
about the name of the option? Is this a problem of gdb not
giving credit to the linux regex implementation? There is
a lot of stuff in linux which doesn't give proper credit
to the original work it was derived from.

> > but the default should be the regex within gdb.
> 
> Are you speaking as a Linux/Hurd user? As far as I know, my patch will

No.

> only affect Linux and Hurd? If you are a Linux/Hurd user, do you
> have a "known to work" regex in your C library? If not, should you
> be worried?

Well, that depends. People running an old Linux with a broken
regex should probably be worried, but if they are still using it,
they haven't encountered the bugs yet, so why worry? If they
encounter the bug later somewhen with a different application,
they probably blame the other application, but not gdb.
If they put the next gdb release on their system and it doesn't
run properly due to regex problems, they blame gdb, not the 
broken regex implementation in libc. This is what we should avoid.

IMHO, the best solution would be to create a set of tests, which
check if the native regex implementation works properly and decide
which implementation to use based on this result (and maybe even
tell the user to upgrade their bogus version of libc). This is what
./configure is all about. The only problem is that it is a lot
more work.

  Guenther

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]