DeZog icon indicating copy to clipboard operation
DeZog copied to clipboard

Cspect: Breakpoint not hit on first instruction in interrupt handler

Open taylorza opened this issue 2 years ago • 5 comments

Describe the bug This might be a CSpect issue as this does not occur when using serial debugging on real hardware. Setup NEXT IM2 hardware interrupts, in the interrupt handler put a breakpoint on the first instruction of the handler. The breakpoint is never hit. Moving the breakpoint to the second instruction works fine. It does not matter if the first instruction is a single or multibyte instruction.

To Reproduce Steps to reproduce the behavior:

  1. Load the CTC Sample project to debug in VS Code : https://gist.github.com/taylorza/5e0cd21acaba43e5369bb5270ed29d33
  2. Set a breakpoint on the first instruction in the ctc0handler, this is the instruction push af
  3. Launch the debugger and start running
  4. The breakpoint is not hit

Expected behavior The debugger to break into the code on the first instruction of the interrupt handler when the handler is executed.

Screenshots N/A

Version etc. (please complete the following information):

  • DeZog SW Version: v2.7.3
  • OS: Windows 11 and Mac OS (Tested on both)
  • Remote: CSpect ctctest.zip

taylorza avatar Sep 25 '22 20:09 taylorza

Could you maybe upload the complete project as a zip. You can attach it here in the issue. Best together with the .vscode/launch.son and also the sld and the nex file.

maziac avatar Sep 25 '22 21:09 maziac

I just added the project to the original post. There will be a few hardcoded paths you will need to edit, I need to still get that resolved in the tool I have to scaffold the projects :)

taylorza avatar Sep 25 '22 21:09 taylorza

No problem.

I could reproduce the problem.

But it seems to be a CSpect issue. CSpect (2.16.5) behaves the same (it does not break at the interrupt address) if the breakpoint is set from within the CSpect debugger. We should contact Mike about it.

maziac avatar Sep 26 '22 16:09 maziac

I suspected as much, thanks for confirming.

taylorza avatar Sep 26 '22 20:09 taylorza

Reopened until fixed in cspect.

maziac avatar Sep 28 '22 20:09 maziac

I was playing with this again in CSpect 2.17.0.0 and it looks like this issue has been fixed. I am not hitting breakpoints set on the first instruction in the interrupt handler.

taylorza avatar Dec 27 '22 16:12 taylorza

I was playing with this again in CSpect 2.17.0.0 and it looks like this issue has been fixed. I am not hitting breakpoints set on the first instruction in the interrupt handler.

I am confused. Has it been fixed or not?

maziac avatar Dec 27 '22 17:12 maziac

:) Sorry, not should have been now... Yes, it appears to be fixed based on my testing.

taylorza avatar Dec 29 '22 16:12 taylorza

Ahh, I see.

Can we close the issue now?

maziac avatar Jan 02 '23 10:01 maziac

It looks good to me, I will close the issue.

taylorza avatar Jan 02 '23 13:01 taylorza