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 Mon, 06 Apr 2009 22:39:20 +0200, Paul Pluzhnikov wrote:
> We have perhaps uncommon setup here, where we have several installed
> versions of glibc, and need to debug executables which are compiled
> and linked against them (using -rpath).
> 
> Currently, GDB will dlopen("libthread_db.so.1", ...), which means that
> in order debug "non-standard" binary, one has to set LD_LIBRARY_PATH to
> point to correct libthread_db before invoking GDB, or it will refuse to
> see threads in the inferior. This is not automatic, and error prone.

Just out of curiosity:

libthread_db should be compatible with any libpthread thanks to:

$ nm /lib64/libpthread.so.0|grep _thread_db_
0000003d1b812010 r _thread_db_dtv_dtv
0000003d1b812004 r _thread_db_dtv_t_pointer_val
0000003d1b81201c r _thread_db_link_map_l_tls_modid
0000003d1b8120c4 r _thread_db_list_t_next
0000003d1b8120b8 r _thread_db_list_t_prev
[39 lines total]

Do you use non-glibc libthread_db/libpthread (Bionic?) or this _thread_db_*
compatibility API does not work even for glibc versions?


Thanks,
Jan


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