delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/03/06/09:17:30

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
Date: Thu, 6 Mar 2003 15:16:37 +0100 (MET)
From: Klaus DOT Moschner AT gmx DOT de
To: "Max Bowsher" <maxb AT ukf DOT net>
Cc: cygwin AT cygwin DOT com
MIME-Version: 1.0
References: <00c701c2e3e2$db82c650$78d96f83 AT pomello>
Subject: Re: gcc Core Dump
X-Priority: 3 (Normal)
X-Authenticated-Sender: #0001000612 AT gmx DOT net
X-Authenticated-IP: [217.33.215.170]
Message-ID: <674.1046960197@www8.gmx.net>
X-Flags: 0001

Hi Max,

I tried gdb and followed the code from asm instance to asm instance.
This is what I get in the code:
Unable to Read Instructions at 0x61007730 in the _libkernel32_a_iname
function. It seems to be somewhere inside <__main> after <__alloc> is finished.
Actually the first command in <__main> is a jump that seems to fail.

If I do it with the console and run, I get a message that my stack will be
dumped to a stackdumpfile.

Does this help to trace the problem?

Cheers,
Klaus


> Klaus DOT Moschner AT gmx DOT de wrote:
> > Hi,
> >
> > I'm a newbie in programming under Cygwin, and I have a very basic
> > problem with gcc:
> > Any help is appreciated.
> 
> OK, right mailing list this time, but, as I said in my previous reply, it
> works fine for me. So, you are going to have to try to debug it a bit more
> yourself.
> 
> Ever used gdb?
> 
> You could try:
> $ gdb prog3
> (gdb) run
> (gdb) bt
> 
> and post the output of the 'bt' command.
> 
> Max.
> 
> 
> > This code compiles and runs without any problems under Dev++
> >
> > This is the output when I compile and run:
> > $ gcc -Wall prog3.c -o prog3
> >
> > $ ./prog3.exe
> > Hello World
> > Segmentation fault (core dumped)
> >
> > $
> >
> > This is the source code:
> >
> > /* Include Files */
> > #include <stdio.h>
> > #include <stdlib.h>
> >
> > /* Function Declarations */
> > void PrintHW();
> >
> > int main()
> > {
> >     char quit;
> >     printf("Hello World\n");
> >     PrintHW();    /* Prints Hello Function */
> >     printf("Hello World\n");
> >     quit = '\0';
> >
> >     return 0;
> > }
> >
> >
> > void PrintHW()
> > {
> >     printf("Hello Function\n");
> > }
> 

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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