This is the mail archive of the
mailing list for the Cygwin project.
SV: Segmentation fault when debugging C++ with gdb.
- From: "Mikael Rosbacke" <Mikael dot Rosbacke at tritech dot se>
- To: <cygwin at cygwin dot com>
- Date: Fri, 16 Jun 2006 15:23:44 +0200
- Subject: SV: Segmentation fault when debugging C++ with gdb.
Thank you for the answer. Tried searching "cygwin C++ gdb" and variants in Google and mailing lists, but to no use. Sorry for the duplicate email but I got a no-delivery notification for sourceware.org.
I'll try to see if I can get a better behaviour with stock gcc and a recently built gdb from source. But since the issue should be resolved with version 1.5.20 I could probably wait for that version.
--- Mikael R
Från: Igor Peshansky [mailto:email@example.com]
Skickat: den 16 juni 2006 15:04
Till: Mikael Rosbacke
Ämne: Re: Segmentation fault when debugging C++ with gdb.
On Fri, 16 Jun 2006, Mikael Rosbacke wrote:
> I'm having problem to debug my C++ programs using GDB under cygwin. I
> get a seg-fault in the c-startup before the main function has been
> Trying to compile and run this program in cygwin give me the following
> Program received signal SIGSEGV, Segmentation fault.
> 0x610ae938 in pthread_key_create () from /usr/bin/cygwin1.dll
> Seems like the initialization of the static iostream objects causes the
Searching this list for "SEGFAULT pthread_key_create" would have shown you
the solution (and all of the information I'm providing below).
> I've tried to download gcc version 4.0 and a new gdb as tarballs and
> compiled it from source. Using these tools it seems to work. But it is
> not a good solution for us to have a separate compiler from the rest of
> the distribution. Any ideas how to fix this?
This is exactly the fix (well, you can use stock gcc, but you *will* need
to build gdb from source). Until Cygwin 1.5.20 comes out, that's your
ideal course of action. Once the new Cygwin version is out, the new gdb
should be released that will contain that fix, and you'll be able to
switch to stock gdb as well.
P.S. There was no need to repost this -- we heard you the first time.
cygwin.com and sourceware.org are the same machine.
|\ _,,,---,,_ firstname.lastname@example.org | email@example.com
ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
|,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html