This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Segmentation fault when using gdb & pthreads


I posted this a few weeks back and didn't get any response.  I've searched
archives and haven't seen anything helpful, so I'm reposting...

I'm trying to use gdb on a simple pthreads app. The app runs fine, but I
to give the gdb a test drive.  However, whenever I step into or over any
pthread code, I get a segmentation fault.  In my case, a call to
pthread_cond_init() causes the SIGSEGV.

The code is compiled w/ -g, and I can step through the execution for
up to the pthreads code.  Is this a limitation w/ gdb or am I missing either
compilation or debugging flag?  I'm using the full cygwin distribution as of
cygwin-1.3.5-3 on Win2000.

Here's the seg fault as it appears when I encounter the pthread_cond_init()

    (gdb) run
    Starting program:

    Breakpoint 1, QueueProcessor::QueueProcessor (this=0x22fd54)
        at QueueProcessor.cpp:39
    39    {
    Current language:  auto; currently c++
    (gdb) step
    41    rc = pthread_cond_init(&_condition, NULL);
    (gdb) print rc
    $1 = 0
    (gdb) step

    Program received signal SIGSEGV, Segmentation fault.
    0x77e86e72 in _libkernel32_a_iname ()

thanks for the help,

Do You Yahoo!?
Get your free address at

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]