STATUS_ACCESS_VIOLATION in __main
Robert Owens
Robert.Owens@psislidell.com
Wed Feb 24 12:18:00 GMT 1999
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
More information about the Cygwin
mailing list