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] Reduce number of libthread_db load attempts


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


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