Преглед изворни кода

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.
TianlongLiang пре 1 година
родитељ
комит
a5753ea920
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      core/iwasm/interpreter/wasm_interp_classic.c

+ 1 - 1
core/iwasm/interpreter/wasm_interp_classic.c

@@ -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);                 \