>I'm having problems to debug my multithread program :( on my IRIX 6.5 box.
>
>I have written this simple example and linked to -lpthread and I got the 
>same problem.
>
>#include <stdio.h>
>int main () {
>   printf ("Hello World\n");
>   return 0;
>}
>
>$ gcc hello.c -lpthread
>$ gdb a.out
>(gdb) run
>Starting program: /usr/people/alex/a.out
>warning: Signal ? does not exist on this system.

Get latest gdb (or at least 5.1).  The higher signal
numbers are available there.
signals above 32 from /usr/include/sys/signal.h:
#define SIGCKPT 33      /* Checkpoint warning */
#define SIGRESTART 34   /* Restart warning  */
#define SIGUME  35      /* Uncorrectable memory error */
/* Signals defined for Posix 1003.1c. */
#define SIGPTINTR       47
#define SIGPTRESCHED    48
/* Posix 1003.1b signals */
#define SIGRTMIN        49      /* Posix 1003.1b signals */
#define SIGRTMAX        64      /* Posix 1003.1b signals */

47 and 48 are used by pthreads...

However, that is *not* going to help you debug a pthreads app
on IRIX6.5.    To debug pthreads apps on IRIX6.5 requires
extensive use of libspypt.so by the debugger at
debugger-runtime and at present gdb has no support for that at
all I believe.

The notion here is that libspypt.so 'goes with the kernel' so
debuggers have a consistent interface to pthreads information
even though pthreads internals can change across releases.

The IRIX6.5 pthreads implementation is *totally* different
than IRIX6.4-and-earlier pthreads.
To get fully correct pthreads semantics required a new
implementation, I was told.

We've not made the information on libspypt.so  (the info on
controlling a pthreads app with a debugger) available, but that
is mainly an oversight.  If someone wants to take the time to
implement support in gdb I believe we would provide the
necessary information at no charge (we have done so
before).  It's not a secret, it just never got documented
publically and the headers necessary have still not gotten into
the IRIX release  :-(

Sorry. At present the only practical tools for IRIX6.5 pthreads
are dbx and WorkShop.  WorkShop (gui debugger) is not free...
And for best pthreads debugging one _really_ wants the absolute
_most recent WorkShop patch version.
(Ah. TotalView from Etnus
is another IRIX6.5 pthreads-aware debugger.)

[EMAIL PROTECTED]

_______________________________________________
Bug-gdb mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gdb

Reply via email to