[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
debugging linuxthreads with gdb on ppc
From: |
rsreelat |
Subject: |
debugging linuxthreads with gdb on ppc |
Date: |
Wed, 25 Jul 2001 18:45:00 +0530 |
Hello,
I am running GDB on the SuSe 7.1 for PPC32 on a SMP and UNI processor
machine. When I try to run the program under gdb, gdb causes a
Segmentation Violation.
Here is a small program test.c :
_________________________________________________________________
#include <stdio.h>
#include <pthread.h>
void * sec_thrd_fn( void *arg)
{
printf("the argument passed to sec thread is %d\n",(int)arg);
return 0;
}
main()
{
int rc;
pthread_t newthr;
rc = pthread_create(&newthr,NULL,sec_thrd_fn,(void*)0);
if(rc!=0) {(&newthr,NULL,sec_thrd_fn,(void*)0);)arg);____cessor
printf("Error while creating the thread\n");
exit(1);
}
}
______________________________________________________________________
I compile this program using " gcc -o test -lpthread -g test.c".
Now run this program in a gdb session, the gdb terminates with segmentation
violation.
However, when I link pthread library statically while compiling , gdb does
not give a segmentation violation fault. Also, I have found that this
happen only with libpthread.so shared library on a Power PC machine.
Is this a known bug? Is there a patch for this bug?
A reply will be greatly appreciated.
thanks in advance,
regards,
________________________________
R.Sreelatha
internet mail id : address@hidden
- debugging linuxthreads with gdb on ppc,
rsreelat <=