Could someone explain the difference between the following 2 configurations?
I'm using RISCV targets, but it may be the case that problem exists for
other architectures.
1. Configuration #1.
We have 2 target cpus, and we are connected to telnet server.
That is `targets` command returns something like this:
0 core0.cpu riscv ... halted
1* core1.cpu riscv ... halted
When software breakpoint is set it is recordered in an internal
breakpoint list of the active target. Now, when we try to do a step
operation the currently selected target is inspected, and if there is a
breakpoint at the current pc - we can temporary remove it, do step and
then breakpoint is restored.
If we try to do step operation on a different target - then breakpoint
won't be removed.
2. Configuration #2.
It's the same as #1, but now we combine our targets in an smp target
(and we specify -rtos hwthread), like this:
targets smp core0.cpu core1.cpu
*Do note that we are still using telnet, not gdb*.
Now, when we set a software breakpoint it is recordered in an internal
breakpoint list of a single (usually the first) target regardless of the
currenty selected target. In this case if we do a step operation it may
not work if there is a breakpoint match, the potentially-matching
breakpoint won't be disabled since the relevant code inspects the list
only for the currenty selected targets).
Could someone clarify if this is intentional? Looks like it does not,
but I'm not sure.