This is the mail archive of the gdb-patches@sources.redhat.com 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]

lin-lwp.c: stop_wait_callback() question


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


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