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


>>>>> "hjl" == H J Lu <hjl@lucon.org> writes:
hjl> The current master copy of GNU regex is in glibc. I'd like to be
hjl> able to compile gdb on a known good glibc base system using the
hjl> GNU regex in glibc. 

The problem, as I see it, with linking with a host's regex library is
that gdb does not know whether or not it is "good".  We could write an
autoconf test that attempts to verify the library, or some heuristic
like __GLIBC__ && __GLIBC__ >= 2, but neither is as safe as using the
known good version of the library that is bundled with GDB.  One could
argue that if we're worried about regex, why aren't we worried about a
hundred other things and provide local copies of them.  I'll concede
that that would be silly, but I believe that historical problems with
the regex code makes it a special case.

Having said all that, I'm not opposed to using the host regex.  I'd
like to see us change the regex usage within GDB to use the POSIX.2
API so that we can link with any modern hosts library.  But since the
benefits are small and the risks large, I think it's not the type of
change we want to be making while were trying to wrap up a release.

hjl> I don't want to spend time to check if gdb has the updated regex
hjl> or not.

It doesn't matter much to me.  It's a known good implementation that
works well enough for GDB's purposes.  

        --jtc

-- 
J.T. Conklin
RedBack Networks

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