This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Reduce number of libthread_db load attempts
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 21 May 2012 21:30:15 +0200
- Subject: Re: [patch] Reduce number of libthread_db load attempts
- References: <20120417185602.GB7008@host2.jankratochvil.net> <4F918107.4010302@redhat.com>
On Fri, 20 Apr 2012 17:30:15 +0200, Pedro Alves wrote:
> Won't this break, e.g., static executables with separate debug info?
> IOW, an explanation of _why_ is it safe to skip this with "just a
> separate symbol file" is missing.
Do you find the comment enough?
I will check it in in some time.
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 f78f662..49425f8 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1132,6 +1132,12 @@ thread_db_new_objfile (struct objfile *objfile)
correctly. */
if (objfile != NULL
+ /* libpthread with separate debug info has its debug info file already
+ loaded (and notified without successfult thread_db initialization))
+ the time observer_notify_new_objfile is called for the library itself.
+ Static executables have their separate debug info loaded already
+ before the inferior has started. */
+ && objfile->separate_debug_objfile_backlink == NULL
/* Only check for thread_db if we loaded libpthread,
or if this is the main symbol file.
We need to check OBJF_MAINLINE to handle the case of debugging