On Tue, Oct 6, 2009 at 4:44 PM, Pedro Alves wrote: >> Perhaps a better fix is to skip this check altogether, and always use >> dlopen on Linux? > > I guess your patch's already doing that. It did that IFF it could find some libthread_db. Now it will just always use libdl. If libthread_db usable by the inferior is found at runtime, it will be used; if not, tough luck. > Could you tweak the interface a bit, to return a boolean indicating > if the command was handled or not? Good call. Patch attached. > Might want to > force a whitespace after "set libthread-db-search-path", so that > "set libthread-db-search-pathfoofoo" isn't accepted while at it. Done and re-tested. Thanks, -- Paul Pluzhnikov doc/ 2009-10-06 Paul Pluzhnikov * gdb.texinfo (Server): Document libthread-db-search-path. gdbserver/ 2009-10-06 Paul Pluzhnikov * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove. * configure.ac: Adjust. * linux-low.h (struct process_info_private): Move members to struct thread_db. (thread_db_free): New prototype. * linux-low.c (linux_remove_process): Adjust. (linux_wait_for_event_1, linux_look_up_symbols): Likewise. * server.c (handle_query): Move code ... (handle_monitor_command): ... here. New function. * target.h (struct target_ops): New member. * thread-db.c (struct thread_db): New. (libthread_db_search_path): New variable. (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. (thread_db_free): New function. (thread_db_handle_monitor_command): Likewise.