WARDuino icon indicating copy to clipboard operation
WARDuino copied to clipboard

On arithmetic exceptions, the stack should be restored prior to the exception

Open carllocos opened this issue 1 year ago • 1 comments

When a division by zero is triggered and a snapshot of the state would be dumped. The tool client would not be able to see the 2 arguments of the division operation since the stack pointer is modified prior on raising the exception.

carllocos avatar Apr 26 '23 14:04 carllocos

I don't see this as a bug but rather a different way of doing things or a new feature. Maybe we can put this one commit on its own branch with a PR to develop and include it in the next version as well?

It does seems like technically in the spec the values are removed from the stack: image

But perhaps since this is too useful for our debugger tools, we can depart from the spec here.

Probably something we want to discuss with @chscholl.

tolauwae avatar Apr 27 '23 09:04 tolauwae