This is the mail archive of the cygwin@sources.redhat.com 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
list.

--- Leon@caresystems.com.au 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:earnie_boyd@yahoo.com

---         <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 cygwin-unsubscribe@sourceware.cygnus.com


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