This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [patch][rfc] Allow GDB to search for the right libthread_db.so.1


On Tue, 25 Aug 2015 20:13:54 +0200, Paul Pluzhnikov wrote:
> We've had a lot of systems where installed /lib64/libthread_db was
> from glibc-2.7, while target binary was using glibc-2.3.6, and I am
> 99.99% sure that combination didn't work.

Pedro explained that glibc also does:

# $ grep -rn nptl_version nptl*
# nptl/ChangeLog.old:7461:        * init.c (nptl_version): Add __attribute_used__ to nptl_version.
# nptl/nptl-init.c:68:static const char nptl_version[] __attribute_used__ = VERSION;
# nptl_db/td_ta_new.c:42:  if (td_lookup (ps, SYM_nptl_version, &versaddr) != PS_OK)
# nptl_db/structs.def:53:DB_SYMBOL (nptl_version)
#
# So that alone makes a libthread_db.so for glibc 2.x refuse to work with glibc 2.y.

BTW the nptl_version check seems to predate the _thread_db_* symbols.


Thanks,
Jan


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