On 03/17/2011 01:57 AM, Anders Törnqvist wrote: > > > 1. Why is the debug stepping "hopping"? > Yes, your guess that it is due to compiler optimization is correct. The kernel code is optimized aggressively, which makes source level debugging difficult to impossible unless you debug at the assembly language level. In addition to execution not tracking the C source linearly (jumping around), many variables will be optimized out, and some called functions will be inlined.
At some point a while back I made a quick attempt to build the kernel with optimization disabled for just the code I was debugging, but it caused an abi problem during the link, or some such. I've been meaning to investigate this further. Meantime, I've gotten good at scrutinizing assembly code and interpreting the actions of the compiler. If anyone has insight on this, I'd be curious to hear it. Mike _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
