toolchain icon indicating copy to clipboard operation
toolchain copied to clipboard

Bare metal debugger should disable interrupts when stepping line

Open fbedard opened this issue 5 years ago • 0 comments

Reported from user: When stepping through the code, I often dump into arc_exc_asm.s, exc_entry_int, line 86…maybe this is an interrupt handler or something? It seems that the debugger is not disabling interrupts when stepping is occurring?

It is not specified whether this is a instruction stepping or source-code-line stepping. OpenOCD disables interrupts when doing a single instruction step, as far as we can see. If GDB is stepping source line it might use temporary breakpoint and resume (not 100% sure), where interrupts are not disabled by OpenOCD. We need to examine whether it is possible to disable interrupts when doing a source line instruction step - apparently either GDB should be doing this, or it should somehow notify OpenOCD about nature of this "resume" operation. For example OpenOCD will enable interrupts only if it is "normal" execution and "debug" execution, where debug execution usually assumes that GDB has written some custom code to memory and now wants core to execute it, transparently to the main application.

fbedard avatar Jul 23 '19 17:07 fbedard