[PATCH 1/4] libthread_db initialization changes related to upcoming glibc-2.34

Kevin Buettner kevinb@redhat.com
Fri Jun 11 21:24:40 GMT 2021


On Fri, 11 Jun 2021 15:10:54 -0400
Simon Marchi <simon.marchi@polymtl.ca> wrote:

> > diff --git a/gdb/solib.c b/gdb/solib.c
> > index 2df52118143..88b201ff6a0 100644
> > --- a/gdb/solib.c
> > +++ b/gdb/solib.c
> > @@ -900,12 +900,18 @@ Do you need \"set solib-search-path\" or \"set sysroot\"?"),
> >  
> >     Uses a fairly simplistic heuristic approach where we check
> >     the file name against "/libpthread".  This can lead to false
> > -   positives, but this should be good enough in practice.  */
> > +   positives, but this should be good enough in practice.
> > +
> > +   In glibc-2.34 (and later), functions formerly residing
> > +   in libpthread have been moved to libc, so "/libc." needs
> > +   to be checked too.  (Matching the "." will avoid matching
> > +   libraries such as libcrypt.)  */  
> 
> I'd prefer that you use "As of glibc-2.34...", as you've used
> elsewhere.  Saying "In glibc-2.34 and later" assumes that it will be
> like this forever, which we don't know.
> 
> Otherwise, LGTM.

I've revised that comment as requested.  That portion of the comment
now looks like this:

   As of glibc-2.34, functions formerly residing in libpthread have
   been moved to libc, so "/libc." needs to be checked too.  (Matching
   the "." will avoid matching libraries such as libcrypt.) */

Kevin



More information about the Gdb-patches mailing list