On Tue, 2007-01-30 at 11:11 -0800, Harold Hallikainen wrote: > I agree! The optimization away from debug does code reuse, so it the > program counter really wanders around the address space. You were probably > trying to set a break point on some point where the code "wandered away" > from that particular point in the source code, so it really didn't know > where to put the breakpoint. It's an interesting optimization. Pretty much > turns your code into spaghetti. I find that if I have the room, while developing, I always turn pretty much all of the more "fancy" optimizations off. It just gets too frustrating trying to figure out whether the issue you're seeing is because of something you did yourself, or something fancy the compiler is doing to optimize things. Certain optimizations are safe from a debug point of view, but some as you've described can REALLY result in "weird" behaviour. Of course one may not have the luxury of turning optimizations off (i.e. chip is close to full). It's for reasons like that that I always try to prototype on the absolute largest reasonable part possible. TTYL -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist