[uClinux-dev] leon, uclibc and vfork()

John Williams jwilliams at itee.uq.edu.au
Wed Mar 26 19:21:25 EST 2003


Hi Andrew,

Andrew Hall wrote:

> I can't exactly pinpoint where it is doing it because it gives the appearance of not executing the commands in order. Execution jumpsd backwards through the source a few lines frequently. I imagine this behaviour is due to the internal scheduling of the kernel as it goes about its business, or insight playing tricks on me.

Sorry I can't offer any specific advice, however this odd execution 
order is probably explained by compiler optimisations.  At -O2 (a 
typical "production" level) the compiler streamlines things by 
re-ordering instructions in such a way that the overall functional 
effect of a code block is unaffected.

However, the side effect is that symbolic debugging of code compiled at 
-O2 is a bizarre experience, and not recommended if you wish to preserve 
your sanity! :)

So, maybe try modifying the makefile, winding it back to -O1 (or even 
-O0) and see if that helps your debugging efforts.

Cheers,

John






More information about the uClinux-dev mailing list