Subject: Re: please help
From: Earnie Boyd <[email-masked]>
To: [email-masked]
Cc: cygwin users <[email-masked]>, "mingw-users at lists.sourceforge.net" <[email-masked]>
Date: Tue, 28 Nov 2000 06:17:21 -0800 (PST)

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

--- [email-masked] 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
ftp://ftp.nanotech.wisc.edu/pub/khan/gnu-win32/mingw32/ports/gdb-4.18-mingw32.zip
and a windows native version of Insight (the TK windows version of gdb) can be
found at http://sources.redhat.com/insight.  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.

Cheers,

=====
Earnie Boyd
mailto:[email-masked]

---         <http://earniesystems.safeshopper.com>         ---
--- Cygwin: POSIX on Windows <http://gw32.freeyellow.com/> ---
---   Minimalist GNU for Windows <http://www.mingw.org/>   ---

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

--
Want to unsubscribe from this list?
Send a message to [email-masked]