X-Spam-Check-By: sourceware.org
Message-ID: <45F04A49.EAD9A6E5@dessent.net>
Date: Thu, 08 Mar 2007 09:39:21 -0800
From: Brian Dessent <brian@dessent.net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: GDB problem (under cygwin)
References: <ee84e5f30703061114q58aa0675jd4d4a69c759442a5@mail.gmail.com> <Pine.GSO.4.63.0703061451230.6189@access1.cims.nyu.edu> <esnbau$5m8$1@sea.gmane.org> <45EF3A38.8030205@cygwin.com> <esp7en$qqu$1@sea.gmane.org> <039501c761a3$58af5e80$2e08a8c0@CAM.ARTIMI.COM> <esphd3$6b7$1@sea.gmane.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Raymond Miller wrote:

> No, I don't think that my program has a bug.
> Ok, this is the code of my program (C):
> 
> #include <stdio.h>
> 
> int main ()
> {
> printf("hello");
> return 0;
> }
> 
> Another code with the same problem (Segmentation fault)
> 
> int main ()
> {
> return 0;
> }
> 
> And I could follow writting codes because all have the same problem.

Works fine here:

$ cat bug.c
#include <stdio.h>

int main ()
{
printf("hello");
return 0;
}

$ gcc -g -o bug bug.c

$ gdb --silent ./bug
(gdb) start
Breakpoint 1 at 0x401075: file bug.c, line 4.
Starting program: /tmp/bug.exe 
Loaded symbols for /winxp/system32/ntdll.dll
Loaded symbols for /winxp/system32/kernel32.dll
Loaded symbols for /usr/bin/cygwin1.dll
Loaded symbols for /winxp/system32/advapi32.dll
Loaded symbols for /winxp/system32/rpcrt4.dll
main () at bug.c:4
4       {
(gdb) c
Continuing.
hello
Program exited normally.
(gdb) quit

> > you haven't given an adequate description of the problem.
> 
> Do you say that for my english? (if so, I'm sorry but cannot do more)
> If not, then tell me what I must explain more.

You have to explain *exactly* what you do to experience the bug, not
just say "it gets a segmentation fault".  Copy and paste the exact
commands and output, don't describe.

Brian

--
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/

