* Segmentation fault when using gdb & pthreads
@ 2001-12-06 19:52 Evan Pollan
2001-12-07 15:08 ` Robert Collins
0 siblings, 1 reply; 2+ messages in thread
From: Evan Pollan @ 2001-12-06 19:52 UTC (permalink / raw)
To: cygwin
All--
I posted this a few weeks back and didn't get any response. I've searched
the
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
wanted
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
everything
up to the pthreads code. Is this a limitation w/ gdb or am I missing either
a
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()
call:
(gdb) run
Starting program:
/cygdrive/c/home/Evan/src/c++/QueueProcessor/Driver.exe
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 ()
(gdb)
thanks for the help,
Evan
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Segmentation fault when using gdb & pthreads
2001-12-06 19:52 Segmentation fault when using gdb & pthreads Evan Pollan
@ 2001-12-07 15:08 ` Robert Collins
0 siblings, 0 replies; 2+ messages in thread
From: Robert Collins @ 2001-12-07 15:08 UTC (permalink / raw)
To: Evan Pollan, cygwin
Try continuing. There is some memory access checks in place, that will
return a error to the app, but under a debugger throw a segv.
Rob
===
----- Original Message -----
From: "Evan Pollan" <evan_pollan@yahoo.com>
To: <cygwin@cygwin.com>
Sent: Friday, December 07, 2001 2:23 PM
Subject: Segmentation fault when using gdb & pthreads
> All--
>
> I posted this a few weeks back and didn't get any response. I've
searched
> the
> 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
> wanted
> 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
> everything
> up to the pthreads code. Is this a limitation w/ gdb or am I missing
either
> a
> 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()
> call:
>
> (gdb) run
> Starting program:
> /cygdrive/c/home/Evan/src/c++/QueueProcessor/Driver.exe
>
> 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 ()
> (gdb)
>
>
> thanks for the help,
> Evan
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-12-07 22:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-06 19:52 Segmentation fault when using gdb & pthreads Evan Pollan
2001-12-07 15:08 ` Robert Collins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).