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]

Re: please help

I'll try to help but you would receive faster help if you asked an appropriate

--- wrote:
> hi there

Hi Leon,

> i have read cygwin archives to find that there was someone having a 
> similar problem - sigmentation fault when running programs from gdb - 
> but all is fine when running programs by themselves - the issue from 
> what i could understand was the mixed envirnoment.

Your problem is an indication that your program is referencing an uninitialized
pointer.  That uninitialized pointer gets a different value when run via gdb. 
The value of the pointer is indeterminable and can be within valid limits for
the process or outside the valid limits for the process.  If it is outside the
valid limits for the process then you get a segmentation fault (SIGSEGV) error.

You segmentation fault has nothing to do with a "mixed environment" as in
reality it is the same OS just different runtimes.  You could even receive a
SIGSEGV if you move your executable to a different computer or just by
rearranging the order of include files.

I was taught that the best rule of thumb is to always initialize and I still
follow that rule.

> i am using mingw32 binaries - and would like to know where i could 
> possibly find compatible gdb (i presume cygwin distribution is not 
> compatible)?

As I've said the Cygwin gdb should work fine for you but the MinGW gdb can be
found at
and a windows native version of Insight (the TK windows version of gdb) can be
found at  Unfortunately I can't find the
windows binary for insight on any of the listed mirrors so you'll have probably
have problems getting to it as the limit is 30 users.


Earnie Boyd

---         <>         ---
--- Cygwin: POSIX on Windows <> ---
---   Minimalist GNU for Windows <>   ---

Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.

Want to unsubscribe from this list?
Send a message to

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