This is an automated email from Gerrit. "Tomas Vanek <[email protected]>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9244
-- gerrit commit d01abd49848698d0fca3b6e75a69df889f47ad3c Author: Tomas Vanek <[email protected]> Date: Fri Nov 21 09:27:20 2025 +0100 target/cortex_a: emit 'resumed' event for all SMP cores In a SMP configuration 'resumed' event was emitted only for the active core, in contradiction to 'halted' event, which gets emitted for all cores from the SMP group: > resume target event 3 (resume-start) for core stm32mp15x.cpu0 target event 2 (resumed) for core stm32mp15x.cpu0 target event 4 (resume-end) for core stm32mp15x.cpu0 target event 7 (gdb-start) for core stm32mp15x.cpu0 > halt target event 0 (gdb-halt) for core stm32mp15x.cpu1 target event 1 (halted) for core stm32mp15x.cpu1 target event 0 (gdb-halt) for core stm32mp15x.cpu0 target event 1 (halted) for core stm32mp15x.cpu0 target event 8 (gdb-end) for core stm32mp15x.cpu0 Emit 'resumed' event in cortex_a_restore_smp(). While on it replace adding the returned errors together with the proper error handling. Change-Id: I9debef0884519cde767707f78f163b136ecc7aa5 Signed-off-by: Tomas Vanek <[email protected]> diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c index a9c034b55d..3d8603a4ba 100644 --- a/src/target/cortex_a.c +++ b/src/target/cortex_a.c @@ -968,7 +968,7 @@ static int cortex_a_internal_restart(struct target *target) static int cortex_a_restore_smp(struct target *target, bool handle_breakpoints) { - int retval = 0; + int retval = ERROR_OK; struct target_list *head; target_addr_t address; @@ -977,9 +977,17 @@ static int cortex_a_restore_smp(struct target *target, bool handle_breakpoints) if ((curr != target) && (curr->state != TARGET_RUNNING) && target_was_examined(curr)) { /* resume current address , not in step mode */ - retval += cortex_a_internal_restore(curr, true, &address, + int retval2 = cortex_a_internal_restore(curr, true, &address, handle_breakpoints, false); - retval += cortex_a_internal_restart(curr); + + if (retval2 == ERROR_OK) + retval2 = cortex_a_internal_restart(curr); + + if (retval2 == ERROR_OK) + target_call_event_callbacks(curr, TARGET_EVENT_RESUMED); + + if (retval == ERROR_OK) + retval = retval2; // save the first error } } return retval; --
