delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/07/14/20:17:24

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Originating-IP: [68.99.57.143]
X-Originating-Email: [davidaferguson_ng AT hotmail DOT com]
From: "David A. Ferguson" <DavidAFerguson_ng AT hotmail DOT com>
To: <cygwin AT cygwin DOT com>
Subject: cygwin GDB crashes on single step
Date: Mon, 14 Jul 2003 19:16:47 -0500
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <Law15-DAV17QPLnpFW400006d46@hotmail.com>
X-OriginalArrivalTime: 15 Jul 2003 00:16:54.0300 (UTC) FILETIME=[654A65C0:01C34A66]

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 AT sources DOT redhat DOT com:/cvs/src login
    cvs -z9 -d:pserver:anoncvs AT sources DOT redhat DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019