This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch][rfc] Allow GDB to search for the right libthread_db.so.1
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 25 Aug 2015 20:01:00 +0200
- Subject: Re: [patch][rfc] Allow GDB to search for the right libthread_db.so.1
- Authentication-results: sourceware.org; auth=none
- References: <20090406203920 dot CCD6F19C4EC at localhost>
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