On 13.07.23 20:30, Liviu Ionescu wrote:
On 13 Jul 2023, at 19:12, Liviu Ionescu <i...@livius.net> wrote:
... change OpenOCD to resume it when running with semihosting enabled but
standalone (i.e. not in a debug session).
Question: what do you think should be a correct behaviour for OpenOCD when an
explicit BKPT 0 (regular breakpoint) is encountered while executing a
standalone semihosted program?
In my opinion, it should print a message and resume automatically.
IMHO, a breakpoint should stop execution.
However, the behaviour you describe does make sense for
standalone/non-debug use, so I would propose to add a switch to ignore
breakpoints and automatically resume, but it should be off by default.
Doing this without an explicit switch/command leads to
complex/non-consistent behaviour depending on mode, which will be
unexpected by not so experienced users.
You might argue that the option might be automatically enabled in case
no debug session is open, but I think behaviour should be consistent
across modes - if you want auto-resume, you should enable it manually,
and it should be no problem for you to add that command to your
invocation of openocd.
cu
Michael