[prog] Segmentation fault :-(

Sujita Purushothaman sujita at mimos.my
Tue Sep 24 13:54:30 EST 2002


Hi,
 I'm trying to debug a C++ program (not written by me).
This program gives a segmentation fault at the line :
temp = BaseSocket::Receive(unsigned char *a,int b, int c);
I went into the function BaseSocket::Receive and made the
very first line a printf message, which didn't get printed.
But a printf before the temp= statement printed. Now I
can't figure out where the segmentation fault is.
The unsigned char * getting passed is originally
declared as an array of chars.
Also, this function is in a shared library, so if someone
knows how I can use gdb to single step into shared libs
I'd be eternally grateful if you taught me. :-)
and yes, i'm using Electric Fence.
Thanks,
Sujita




More information about the Programming mailing list