]> www.infradead.org Git - users/borneoa/openocd-next.git/commit
gdb_server: Operate on available targets.
authorTim Newsome <tim@sifive.com>
Thu, 27 Oct 2022 21:42:23 +0000 (14:42 -0700)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 7 Jun 2025 08:20:32 +0000 (08:20 +0000)
commit7f57e72afec76fcbc6210ddbd85ad4ecd5062ab5
tree6cad590e3498e1db903b98727f13424fc6ee23d8
parent98ed83e2782bfd242b653bd3190c34d091b3d7b6
gdb_server: Operate on available targets.

When SMP is enabled, gdb will always use the first target in the SMP
group. That doesn't work when that first target is unavailable, but
others in the SMP group are still available.

For cases where gdb expects an operation to affect the entire group (run
control, memory access), find the first available target in an SMP group
and use that.

Imported from
https://github.com/riscv-collab/riscv-openocd/pull/767

Change-Id: I4bed600da3ac0fdfe4287d8fdd090a58452db501
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8912
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
src/server/gdb_server.c