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] Allow gdbserver to dynamically lookup libthread_db.so.1


On Wed, Sep 2, 2009 at 10:15 AM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
> On Wed, Sep 2, 2009 at 9:47 AM, Pedro Alves<pedro@codesourcery.com> wrote:
>
>> Since you're touching this, how about loading a thread_db per-process
>> like gdb/linux-thread-db.c already does?
>
> Oh, I've had this patch locally for so long, I didn't realize gdbserver
> is now multi-process as well. Will fix.

Here is the fix.

Since we can have several inferiors and several different libthread_db's,
it no longer makes sense to check for td_thr_tls_get_addr at configure time.

Also, previous patch was failing try_thread_db_load_1 on non-essential
functions.

Thanks,
-- 
Paul Pluzhnikov

doc/
2009-10-02  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* gdb.texinfo (Server): Document libthread-db-search-path.

gdbserver/
2009-10-02  Paul Pluzhnikov  <ppluzhnikov@google.com>


	* acinclude.m4: Link with libdl.
	* server.c (libthread_db_search_path): New variable.
	(handle_query): Set it.
	* linux-low.h (struct process_info_private): New members.
	* linux-low.c (linux_remove_process): Adjust.
	* thread-db.c (thread_db_create_event, thread_db_enable_reporting)
	(find_one_thread, maybe_attach_thread, find_new_threads_callback)
	(thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
	(try_thread_db_load_1, dladdr_to_soname): New functions.
	(try_thread_db_load, thread_db_load_search): New functions.
	(thread_db_init): Search for libthread_db.

Attachment: gdb-gdbserver-threaddb-search-20091002.txt
Description: Text document


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