interp debugger: Fix setting invalid value to step_count (#3583)

The `exec_env->current_status->step_count` should be set same as the handling
when WASM_ENABLE_LABELS_AS_VALUES is not 0.

Fixes issue https://github.com/bytecodealliance/wasm-micro-runtime/issues/3475.
This commit is contained in:
TianlongLiang 2024-07-02 11:03:49 +08:00 committed by GitHub
parent 77da87ca51
commit a5753ea920
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1424,7 +1424,7 @@ wasm_interp_call_func_import(WASMModuleInstance *module_inst,
#define HANDLE_OP_END() \
os_mutex_lock(&exec_env->wait_lock); \
if (exec_env->current_status->signal_flag == WAMR_SIG_SINGSTEP \
&& exec_env->current_status->step_count++ == 2) { \
&& exec_env->current_status->step_count++ == 1) { \
exec_env->current_status->step_count = 0; \
SYNC_ALL_TO_FRAME(); \
wasm_cluster_thread_waiting_run(exec_env); \