This is the mail archive of the 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]

[patch] 7.3 regression for corrupted core files threads - also for old OS core files


the patch
	[patchv2 1/2] 7.3 regression for corrupted core files threads

on RHEL-5 (which has the old nptl) still (newly with the new testcase) FAILs
	info threads^M
	Cannot find new threads: debugger service failed^M
	(gdb) FAIL: gdb.threads/gcore-thread.exp: core0file: corefile contains at least two threads

But I find the workaround does not need to be applied for core files.

I will check it in.


2012-07-03  Jan Kratochvil  <>

	* linux-thread-db.c (thread_db_find_new_threads_silently): Do not apply
	nptl <2.7 bug workaround for core files.

diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index dff8fc2..f988e54 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -709,9 +709,10 @@ thread_db_find_new_threads_silently (ptid_t ptid)
 	 If the nptl bug is present in the inferior return 0 to silently ignore
 	 such errors, and let gdb enumerate threads again later.  In such case
 	 GDB cannot properly display LWPs if the inferior thread list is
-	 corrupted.  */
+	 corrupted.  For core files it does not apply, no 'later enumeration'
+	 is possible.  */
-      if (!inferior_has_bug ("nptl_version", 2, 7))
+      if (!target_has_execution || !inferior_has_bug ("nptl_version", 2, 7))
 	  exception_fprintf (gdb_stderr, except,
 			     _("Warning: couldn't activate thread debugging "

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