[source debug] refine some code in source debugging (#856)

- move the wait_cond from exec_env to debug_instance, so the debug thread can be waken up by any threads
- process more general query message from debugger
- refine debug instance create/destroy mechanism
- avoid creating debug instance during module instantiating
- avoid blocking execution thread during creating debug instance
- update related documents
This commit is contained in:
Xu Jun
2021-12-06 10:25:38 +08:00
committed by GitHub
parent c8fe1004aa
commit 2af5ae5abb
18 changed files with 401 additions and 145 deletions

View File

@ -148,9 +148,6 @@ wasm_exec_env_create(struct WASMModuleInstanceCommon *module_inst,
wasm_exec_env_destroy_internal(exec_env);
return NULL;
}
#if WASM_ENABLE_DEBUG_INTERP != 0
wasm_debug_instance_create(cluster);
#endif
#endif /* end of WASM_ENABLE_THREAD_MGR */
return exec_env;
@ -165,7 +162,6 @@ wasm_exec_env_destroy(WASMExecEnv *exec_env)
if (cluster) {
#if WASM_ENABLE_DEBUG_INTERP != 0
wasm_cluster_thread_exited(exec_env);
wasm_debug_instance_destroy(cluster);
#endif
wasm_cluster_terminate_all_except_self(cluster, exec_env);
wasm_cluster_del_exec_env(cluster, exec_env);