I found real bug in testing setup.
Now I have correct libc, it is returning from main ok and calling exit.
However, exit and abort are defined is testsuite exit.c as naked
function. Yet code tries to place exit code non-existent frame and it
crashes stack. This happens mostly when tests have optimisation -O0 (as
other levels would tend to remove frame)
I have no idea why we would need them to be naked. They are only used
as simulator breakpoints.
Likely it was not seen before as simulavr didn't squawk about the bad
access.
My code is now:
void
exit (int code); /*__attribute__ ((naked));*/
void
exit(int code)
{
exit_code = code;
if (code==0) abort();
for (;;);
}
void
abort (void); /* __attribute__ ((naked));*/
void
abort (void)
{ application_aborted = 1;
for (;;);
}
Weddington, Eric wrote:
-----Original Message-----
From: Paulo Marques [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 15, 2008 5:01 PM
To: [EMAIL PROTECTED]
Cc: Weddington, Eric; Andrew Hutchinson; [EMAIL PROTECTED];
[email protected]; KlausRudolph
Subject: RE: Simulator for GCC Testing [was: RE: [Fwd:
Re:[avr-gcc-list]GCC-AVR Register optimisations]]
Quoting William Rivet <[EMAIL PROTECTED]>:
BTW: Where would you host your new tool?
I still didn't look into it, but my idea was to host in place
that gave
the idea of "this is what you need to run the gcc testsuite for gcc"
and not so much "this is where you can find yet another avr
simulator".
I was just trying to make it work myself before thinking about an
official release.
FWIW, I'm willing to host it on the WinAVR CVS repository.
Thanks,
Eric Weddington
_______________________________________________
AVR-GCC-list mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list