I attach the listing of our program, I tried it on ELDK4.2 Freescale (kernel 2.6.24.6 by Freescale, your rootfs) and it's still giving me problems: if I issue
br PrintHello
then cont-inue for some times, after a while gdb stops responding and is not even getting CTRL-C or CTRL-Z.

Of course the same works fine on i686.

I tried both gdbserver and gdb and even rebuilt the file with the target gcc.

Thank you,
Daniele

==== CUT HERE ====
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>

#define NUM_THREADS     5

void *PrintHello(void *threadid)
{
    int c = 0;
   int tid;
   tid = (int)threadid;

   while (++c < 100) {
   printf("Hello World! It's me, thread #%d!\n", tid);
   sleep (1);
   }
   pthread_exit(NULL);
}

int main (int argc, char *argv[])
{
    printf ("Hello world\n");
   pthread_t threads[NUM_THREADS];
   int rc, t;
   for(t=0; t<NUM_THREADS; t++){
      printf("In main: creating thread %d\n", t);
      rc = pthread_create(&threads[t], NULL, PrintHello, (void *)t);
      if (rc){
         printf("ERROR; return code from pthread_create() is %d\n", rc);
         exit(-1);
      }
   }
   pthread_exit(NULL);
}

==== CUT HERE ====

Wolfgang Denk ha scritto:
Dear Daniele Bosi,

In message <[EMAIL PROTECTED]> you wrote:
  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    

Please post plain text only on mailing lists.

  
I encountered several problem debugging multithreated software with gdb
on mpc512x, remotely (gdbserver) and locally.<br>
I built gdb 6.8 from scratch, but it's crashing when I stop execution
into a thread.<br>
<br>
Did anyone get it to work correctly?<br>
    

We use GDB 6.7 in our ELDK 4.2; we didn't encounter such problems in
our tests.

Best regards,

Wolfgang Denk

  

--



Daniele Bosi

DIGITEK S.p.A.

Via L. Romagnoli 24,
41033 Concordia sulla Secchia
Modena (MO), Italy

Tel: +39-(0)53556942 Fax. +39-(0)53554550

Web:     http://www.digitek.it

Mail to: [EMAIL PROTECTED]

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to