pthread_create does not return when remote debugging
Jon Ringle
jon.ringle@comdial.com
Sat Jun 28 22:49:00 GMT 2003
On Saturday 28 June 2003 04:01 pm, Daniel Jacobowitz wrote:
> On Sat, Jun 28, 2003 at 01:11:06PM -0400, Jon Ringle wrote:
> > > > Could the problem be on the gdbserver side not sending back anything
> > > > in response to gdb Sending packet: &c#63...Ack?
> > >
> > > No. That's a continue request. The target isn't stopping again, but
> > > that's not gdbserver's fault... it won't respond to the client until
> > > the program stops.
> > >
> > > Find out why it's not stopping...
> >
> > I turned on remote_debug = 1, and debug_threads = 1 on gdbserver, and I
> > get the following on the target when I continue. The signal 32 looks
> > suspect to me.
>
> It is correct. The thread manager uses that. What are you running on
> the ARM board? What's the rest of the gdbserver log?
The ARM board is running linux-2.2.16 w/ glibc-2.1.3. The arm-linux-gcc
version is 2.95.2.
I am using the following small test program:
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
void* thread (void* parm)
{
int iteration = (int) parm;
while (iteration)
{
fprintf (stderr, "GDBTEST: thread loop: %d\n", iteration--);
sleep (1);
}
return (void*) 1234;
}
int main(int argc, char **argv)
{
pthread_t tid;
int thread_rc;
fprintf (stderr, "GDBTEST: calling pthread_create\n");
pthread_create (&tid, NULL, thread, ((void*) 10));
fprintf (stderr, "GDBTEST: returned from pthread_create\n");
fflush (stderr);
fprintf (stderr, "GDBTEST: calling pthread_join\n");
pthread_join (tid,(void**) &thread_rc);
fprintf (stderr, "GDBTEST: returned from pthread_join = %d\n",
thread_rc);
return 0;
}
Attached are two log files: gdb.log and gdbserver.log. In gdbserver.log I have
inserted the commands entered on the host gdb (marked by #host#).
Thanks for your help.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb.log
Type: text/x-log
Size: 5749 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb/attachments/20030628/f8fc1436/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdbserver.log
Type: text/x-log
Size: 47815 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb/attachments/20030628/f8fc1436/attachment-0001.bin>
More information about the Gdb
mailing list