This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] Reduce number of libthread_db load attempts
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 17 Apr 2012 20:56:02 +0200
- Subject: [patch] Reduce number of libthread_db load attempts
Hi,
I have noticed GDB tries to load libthread_db again even if just a separate
symbol file was loaded (producing more warning lines in the previous patch).
No regressions on {x86_64,x86_64-m32,i686}-fedora17-linux-gnu.
Thanks,
Jan
gdb/
2012-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
* linux-thread-db.c (thread_db_new_objfile): Exclude debug files.
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 4d09c6e..3da206c 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1094,6 +1107,7 @@ thread_db_new_objfile (struct objfile *objfile)
For dynamically linked executables, libpthread can be near the end
of the list of shared libraries to load, and in an app of several
thousand shared libraries, this can otherwise be painful. */
+ && objfile->separate_debug_objfile_backlink == NULL
&& ((objfile->flags & OBJF_MAINLINE) != 0
|| libpthread_name_p (objfile->name)))
check_for_thread_db ();