Re: [AVR-Chat] AVRavel AVR program analyzer
2003-12-12 by Dave VanHorn
At 10:18 AM 12/12/2003 +1100, Rob Storey wrote: > > > A very common problem is where one routine messes with another's variables. > > Either by direct reference, or indexed as My_Ram+5 accidentally stepping on > > Your_Ram >The trouble here is the concept of "ownership" of the variables (This is >clearly defined and controlled in high level OOP languages, but not in >assembler). The same problem arises in detecting corruption of variables >by interrupt handlers - it alters a register, but should the ISR have >preserved the register, or does it "own" the register and therefore the >action is legitimate? That's for me to decide, but if routine X uses Thing_A by name, and routine Y uses the same address in ram by Thing_D+14, then I would suspect a collision. Just having an absolute, and automated search for all refs to a given sram or register var would be a big help. Atmel seems to not get that a very frequent debug problem is "who hosed my data". Breakpoint on write to X isn't in the cards, apparently. >Don't know, but I'd be looking for one! 'twas a general comment that >comtemplating techniques like that is a dead giveaway that you've >outgrown your hardware capacity. In this case, it was a tour de force :)