On 5/30/19 2:07 PM, Michael Rolnik wrote: > From: Sarah Harris <s.e.har...@kent.ac.uk> > > AVR CPUs have a BREAK instruction which behaves differently depending on > whether debugging is enabled. > Since the hardware fuses that normally control this are difficult to emulate, > and the BREAK instruction is useful for testing, the BREAK instruction is > instead enabled/disabled depending on whether a GDB session is attached.
I don't think that this is the right way to model this. I think that BREAK should always raise an exception and return to the main loop. If there we find that the debugger is not attached, the main loop will simply continue. Which becomes a nop, as documented. r~