A patch for gnu-regex
H . J . Lu
hjl@lucon.org
Thu Mar 9 13:24:00 GMT 2000
On Thu, Mar 09, 2000 at 07:32:01PM +0100, Guenther Grau wrote:
> >
> > --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
As far as I know, the only change is the filename. The contents
are the same.
>
> 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.
Let me repeat: the regex in gdb is a verbatim copy of the regex
in the Linux C library.
>
> 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.
1. A broken gdb caused by a broken regex in glibc is not the first
thing a glibc user should worry about. If it tells him/her that
his/her glibc is broken, it is a bonus.
2. You can still use the regex in gdb via a config option.
>
> 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
You are more than welcome to send in a patch to do it. But it should
go into glibc's testsuite first.
H.J.
More information about the Gdb
mailing list