diff --git a/src/rtos/riscv_debug.c b/src/rtos/riscv_debug.c index 0be869ef6..0402eb905 100644 --- a/src/rtos/riscv_debug.c +++ b/src/rtos/riscv_debug.c @@ -246,11 +246,12 @@ static int riscv_gdb_v_packet(struct connection *connection, const char *packet, } if (strcmp(packet_stttrr, "vCont;c") == 0) { - target->state = TARGET_RUNNING; - gdb_set_frontend_state_running(connection); target_call_event_callbacks(target, TARGET_EVENT_GDB_START); target_call_event_callbacks(target, TARGET_EVENT_RESUME_START); riscv_resume_all_harts(target); + target->state = TARGET_RUNNING; + gdb_set_frontend_state_running(connection); + target_call_event_callbacks(target, TARGET_EVENT_RESUMED); target_call_event_callbacks(target, TARGET_EVENT_RESUME_END); return JIM_OK; }