This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
lin-lwp.c: stop_wait_callback() question
- To: Mark Kettenis <kettenis at wins dot uva dot nl>
- Subject: lin-lwp.c: stop_wait_callback() question
- From: Kevin Buettner <kevinb at cygnus dot com>
- Date: Wed, 28 Mar 2001 14:40:59 -0700
- Cc: gdb-patches at sources dot redhat dot com
Mark,
In the following bit of code from lin-lwp.c...
static int
stop_wait_callback (struct lwp_info *lp, void *data)
{
if (! lp->stopped && lp->signalled)
{
pid_t pid;
int status;
gdb_assert (lp->status == 0);
...can you explain the reasoning behind the above gdb_assert
condition?
I've been playing around with debugging xmms on one of my machines.
If I let it run for a while and then hit Ctrl-C in gdb, I sometimes
see the above assert triggered when I step or continue. My
recollection from my debugging session of last night is that the
lp->status value is 0x27f. (Which I believe indicates that the thread
has stopped due to a SIGINT.)
When I comment out the assert, gdb seems to work much better. It
occurs to me though that there is probably a very good reason for this
assert and that perhaps we need to handle the non-zero lp->status
condition elsewhere.
Kevin