[patch] Fix internal-error on dead LWPs with no associated thread
Pedro Alves
pedro@codesourcery.com
Mon Jun 29 10:35:00 GMT 2009
On Monday 29 June 2009 11:09:22, Jan Kratochvil wrote:
> original bugreport:
> https://bugzilla.redhat.com/show_bug.cgi?id=471819
>
> linux-nat.c:1662: internal-error: linux_nat_resume: Assertion `lp != NULL' failed.
>
> A reproducing testcase included.
> No regressions on {x86_64,i686}-fedora-linux-gnu.
Please try the below patchlet instead. Do you have any other case where this
would be needed?
Does anyone know why does the new_thread_event bit need to resume the target
at all? Removing that resume should fix the issue too.
---
gdb/infrun.c | 2 ++
1 file changed, 2 insertions(+)
Index: src/gdb/infrun.c
===================================================================
--- src.orig/gdb/infrun.c 2009-06-29 11:29:58.000000000 +0100
+++ src/gdb/infrun.c 2009-06-29 11:30:36.000000000 +0100
@@ -2746,6 +2746,8 @@ targets should add new threads to the th
in either the OS or the native code). Therefore we need to
continue all threads in order to make progress. */
+ if (!ptid_equal (ecs->ptid, inferior_ptid))
+ context_switch (ecs->ptid);
target_resume (RESUME_ALL, 0, TARGET_SIGNAL_0);
prepare_to_wait (ecs);
return;
--
Pedro Alves
More information about the Gdb-patches
mailing list