Dear NG

First thing first : This is a newbee question.

I use a GNU port under Windows 95. About a year ago, I downloaded from
Cygnus (not RedHat yet) their beta 20 port. And I started playing around
with GCC/GDB. I more or less figured out how to compile a simple program.
Unfortunately, I never figured out how to debug it. GDB always reported a
SIGSEV error and that essentially precluded any effective debugging.
I left all these issues dormant until yesterday, when I downloaded from
Cygnus/RedHat the latest update. (from
http://programming.ccp14.ac.uk/ftp-mirror/programming/cygwin/pub/cygwin/late
st). After figuring out the new way of installing the software, getting
familliar with the Unix-style directory structure, I set out to try again
the compiler/debugger.
When loading the debuggee, GDB is complaining with the following error
message :
gdb-internal-error: sect_index_bss not initialized.

More precisely, here is a screenshot of what I do :
>gdb -nw
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, .... etc <skipped>
This GDB was configured as "i686-pc-cygwin".
(gdb) file simple.exe
Reading symbols from simple.exe...gdb-internal-error: sect_index_bss not
initialized
An internal GDB error was detected.  This may make make further debugging
unreliable.  Continue this debugging session? (y or n) y
Create a core file containing the current state of GDB? (y or n) y
(gdb) run
Starting program: /cygdrive/e/francois/thunks/simple.exe
Program received signal SIGSEGV, Segmentation fault.
0xbff76ede in ?? ()
(gdb) step
Cannot find bounds of current function
(gdb) stepi
Program exited normally.
(gdb) quit

FYI, I compiled -successfully, as far as I can tell...- the simple.c program
from Colins Peter, (http://www.geocities.com/Tokyo/Towers/6162/index.html).

Note that strangely enough, if I single step the instruction, the program
runs properly to completion.

Also, I use the following ultra-simple (too simple ?) makefile :

test.exe : test.o
 gcc test.o -o test.exe  -mwindows -mno-cygwin
test.o : test.c
 gcc test.c -o test.o -c -g


I looked in sources.redhat.com discussions, and found the following :
http://sources.redhat.com/ml/gdb/2000-05/msg00041.html

I am not sure whether this is relevant to my problem, however...

What can I do to make GDB work ? (I can not really afford to download huge
source files and recompile...). Is there any compiler / linker / loader
option(s) that may solve the problem ?

Any help or explanations about what's going here (and with SIGSEV stuff) on
appreciated.
Any good pointers to explanations for building Win32 applications with GNU
welcomed as well.

Regards
__________________________________
François Robert
To mail me : reverse order of all characters in address


Reply via email to