Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3A5244A6.494B4089@eagercon.com> Date: Tue, 02 Jan 2001 13:14:14 -0800 From: Michael Eager X-Mailer: Mozilla 4.76 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: SEGV running programs under GDB 5.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I installed Cygwin 1.1.7. Running even trivial programs under GDB get a SEGV before reaching main(). Any suggestions on what is going on? Here is the GCC for compiling a trivial "Hello World" program: $ gcc -v -g -o t.exe t.c Reading specs from /bin/../lib/gcc-lib/i686-pc-cygwin/2.95.2-5/specs gcc version 2.95.2-5 19991024 (cygwin experimental) /bin/../lib/gcc-lib/i686-pc-cygwin/2.95.2-5/cpp.exe -lang-c -v -iprefix /bin/../lib/gcc-lib/i686-pc -cygwin/2.95.2-5/ -D__GNUC__=2 -D__GNUC_MINOR__=95 -Di386 -D__386__ -D__i386 -D_X86=1 -D__STDC__=1 - D__stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attri bute__((x)) -D__i386__ -D__386__ -D__i386 -D_X86=1 -D__STDC__=1 -D__stdcall=__attribute__((__stdcall __)) -D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) -D__i386 -Asystem(winnt ) -Acpu(i386) -Amachine(i386) -g -remap -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di68 6 -Dpentiumpro -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ -D__CYGWIN32__ -D__CYGWIN__ -Duni x -D__unix__ -D__unix -D_WIN32 -DWINNT -isystem /usr/include/w32api t.c /cygdrive/c/TEMP/ccQaKyGy.i GNU CPP version 2.95.2-5 19991024 (cygwin experimental) (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: /usr/include/w32api /bin/../lib/gcc-lib/i686-pc-cygwin/2.95.2-5/include /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-5/../../../../include /usr/include /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-5/include /usr/include End of search list. The following default directories have been omitted from the search path: /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-5/../../../../include/g++-3 End of omitted list. /bin/../lib/gcc-lib/i686-pc-cygwin/2.95.2-5/cc1.exe /cygdrive/c/TEMP/ccQaKyGy.i -quiet -dumpbase t. c -g -version -o /cygdrive/c/TEMP/ccgbKM35.s GNU C version 2.95.2-5 19991024 (cygwin experimental) (i686-pc-cygwin) compiled by GNU C version 2.9 5.2-5 19991024 (cygwin experimental). t.c: In function `main': t.c:4: warning: return type of `main' is not `int' /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-5/../../../../i686-pc-cygwin/bin/as.exe -o /cygdrive/c/TEMP/ ccUM1zAJ.o /cygdrive/c/TEMP/ccgbKM35.s /bin/../lib/gcc-lib/i686-pc-cygwin/2.95.2-5/collect2.exe -Bdynamic -o t.exe /usr/lib/crt0.o -L/bin/ ../lib/gcc-lib/i686-pc-cygwin/2.95.2-5 -L/bin/../lib/gcc-lib -L/usr/lib/gcc-lib/i686-pc-cygwin/2.95. 2-5 -L/usr/lib/mingw /cygdrive/c/TEMP/ccUM1zAJ.o -lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 -lshe ll32 -lgcc Running gdb: $ gdb -nw t.exe GNU gdb 5.0 Copyright 2000 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-cygwin"... (gdb) run Starting program: /tmp/t.exe Program received signal SIGSEGV, Segmentation fault. 0x77f6ce4c in ?? () (gdb) where #0 0x77f6ce4c in ?? () #1 0x77f67586 in ?? () #2 0x10003985 in ?? () #3 0x10002da1 in ?? () #4 0x10002551 in ?? () #5 0x100022c0 in ?? () #6 0x10010150 in ?? () #7 0x77f635ab in ?? () #8 0x77f6b5fe in ?? () #9 0x77f63b86 in ?? () #10 0x77f13ac2 in ?? () #11 0x77f137da in ?? () #12 0x77e7a810 in _size_of_stack_reserve__ () #13 0x77f635ab in ?? () #14 0x77f6b5fe in ?? () #15 0x77f63b86 in ?? () #16 0x77f13ac2 in ?? () #17 0x77f13838 in ?? () #18 0x77f137ca in ?? () #19 0x6100163e in _size_of_stack_reserve__ () #20 0x6100b507 in _size_of_stack_reserve__ () #21 0x61003983 in _size_of_stack_reserve__ () #22 0x61003aec in _size_of_stack_reserve__ () -- Michael Eager Eager Consulting eager AT eagercon DOT com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077 -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple