This is the mail archive of the cygwin@sourceware.cygnus.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]
STATUS_ACCESS_VIOLATION in __main
- To: <cygwin@sourceware.cygnus.com>
- Subject: STATUS_ACCESS_VIOLATION in __main
- From: "Robert Owens" <Robert.Owens@psislidell.com>
- Date: Wed, 24 Feb 1999 14:15:33 -0600
- Delivered-To: listarch-cygwin@sourceware.cygnus.com
- Delivered-To: mailing list cygwin@sourceware.cygnus.com
- Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
- Sender: cygwin-owner@sourceware.cygnus.com
Howdy
I have been looking through the archives and didn't have much luck with my
problem.
I have a couple of C programs I am trying to compile and run under cygwin.
The main() compiles into:
0x41bd2c <main>: push %ebp
0x41bd2d <main+1>: mov %esp,%ebp
0x41bd2f <main+3>: sub $0x630,%esp
0x41bd35 <main+9>: push %ebx
0x41bd36 <main+10>: call 0x4f7430 <__main>
...
The __main() looks like:
0x4f7430 <__main>: jmp *0x11cb5e0
0x4f7436 <__main+6>: nop
0x4f7437 <__main+7>: nop
When run I ususally get:
0x4f7430 in __main ()
(gdb) stepi
Cannot access memory at address 0x2000000. (A STATUS_ACCESS_VIOLATION
exception)
I can even get this behavior from the following program under DDD (but only
while single stepping machine instructions).
#include <stdio.h>
int main()
{
printf("Hello there.\n");
return 0;
}
I tried to override __main() but it must be in the startup code since I was
not able to get my __main() to be used.
Thanks in advance.
Robert Owens
Robert.Owens@psislidell.com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com