This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
lin-lwp.c question
- To: Mark Kettenis <kettenis at wins dot uva dot nl>
- Subject: lin-lwp.c question
- From: Kevin Buettner <kevinb at cygnus dot com>
- Date: Sun, 17 Sep 2000 01:16:05 -0700
- Cc: gdb at sourceware dot cygnus dot com
Hi Mark,
In stop_wait_callback () in lin-lwp.c, there is the following
code:
if (WIFEXITED (status) || WIFSIGNALED (status))
{
gdb_assert (num_lwps > 1);
gdb_assert (! is_cloned (lp->pid));
gdb_assert (in_thread_list (lp->pid));
if (lp->pid != inferior_pid)
delete_thread (lp->pid);
printf_unfiltered ("[%s exited]\n",
target_pid_to_str (lp->pid));
delete_lwp (lp->pid);
return 0;
}
I'm wondering about the reason for the following line:
gdb_assert (! is_cloned (lp->pid));
I have a simple test program in which I'm (occasionally) seeing
assertion failures due to the above line. Unfortunately, it's
not consistently reproducible, but I can send you the test program
if you wish to try it for yourself.
If I understand it properly, the only way to get past this assert
is for lp->pid to have it's LWP component and PID component equal.
In other words, we'll only get past the above assert for the main
process, right?
Kevin