cygwin GDB crashes on single step
David A. Ferguson
DavidAFerguson_ng@hotmail.com
Tue Jul 15 08:09:00 GMT 2003
cygwin GDB crashes on single step
I am trying to get Insight operational on cygwin. After building every
thing I was attempting to debug a simple program. I can start the
debugger and run to a break point. It is when I attempt to single step
that gdb faults.
$ gdb a.exe
GNU gdb 2003-07-14-cvs
Copyright 2003 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) list
1 #include <iostream>
2 using namespace std;
3
4 int main(int argc, char* argv[])
5 {
6 std::cout << "hi from C++\n";
7
8 for (int i = 0; i < argc; ++i)
9 {
10 cout << "Arg " << i << " = " << argv[i] << "\n";
(gdb) b 6
Breakpoint 1 at 0x4010c6: file hi.cpp, line 6.
(gdb) r
Starting program: /home/DAFerguson/src/hi/a.exe
Breakpoint 1, main (argc=1, argv=0xa042878) at hi.cpp:6
6 std::cout << "hi from C++\n";
(gdb) s
Segmentation fault (core dumped)
This produces gdb.exe.stackdump file. The first few lines of which are.
Exception: STATUS_ACCESS_VIOLATION at eip=0057F301
eax=00000000 ebx=1027CB50 ecx=1027CB50 edx=1030D810 esi=00000000
edi=00672B50
ebp=0022F618 esp=0022F5C0 program=D:\opt\cygwin\usr\local\bin\gdb.exe
Of course Insight fails also in a similar manner. I am pretty sure that
the problem is in the gdb engine.
I am running freshly downloaded and installed cygwin under Windows XP.
$ uname -a
CYGWIN_NT-5.1 fergusonda 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 unknown
unknown Cygwin
I retrieved the files from the CVS
cvs -z9 -d:pserver:anoncvs@sources.redhat.com:/cvs/src login
cvs -z9 -d:pserver:anoncvs@sources.redhat.com:/cvs/src co
insight+dejagnu
cd src
./configure
make
make install
I saw some advice in mail list archive about building gdb with the
debugging enabled in order to get a backtrace. So I did this:
make clean
make distclean
CFLAGS="-g" ./configure
make
make install
As a test I installed the gdb binary. It works fine
GNU gdb 2003-03-03-cvs (cygwin-special)
However, the whole purpose was to get Insight up and running. So using the
older GDB is not really a solutions.
I am new to GNU/GDB/*nix and apologize if I have missed something obvious.
I spent all day trying different things and googling for an answer and am
at wits end.
Thanks for you time.
Regards...David
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list