This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix internal-error on dead LWPs with no associated thread
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Date: Mon, 29 Jun 2009 11:36:28 +0100
- Subject: Re: [patch] Fix internal-error on dead LWPs with no associated thread
- References: <20090629100922.GA26882@host0.dyn.jankratochvil.net>
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