提交 c691163f 编写于 作者: G gongyuhang 提交者: Gongyuhang

fixed 36b5d6f1 from https://gitee.com/maimaity/third_party_jerryscript/pulls/89

Fix jerry-debugger's unexpected behavior when re-entering a function after a step operation.

Clear flag JERRY_DEBUGGER_VM_STOP and set debugger_stop_context Null
everytime jerry's debugger call a function.

Issue:https://gitee.com/openharmony/third_party_jerryscript/issues/I5SMSQ
Test: N/A
Signed-off-by: Ngongyuhang <gongyuhang7@huawei.com>
上级 e2af9047
......@@ -2871,6 +2871,14 @@ jerry_call_function (const jerry_value_t func_obj_val, /**< function object to c
jerry_assert_api_available ();
#if ENABLED (JERRY_DEBUGGER)
/**
* Clear flag JERRY_DEBUGGER_VM_STOP and set debugger_stop_context Null everytime jerry's debugger call a function.
* This could solve the problem that jerry's debugger stops at an unexpected line when re-entering a function after a
* step-operation.
*/
JERRY_DEBUGGER_CLEAR_FLAGS (JERRY_DEBUGGER_VM_STOP);
JERRY_CONTEXT (debugger_stop_context) = NULL;
if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED) {
if (jerry_debugger_receive (NULL)) {
JERRY_DEBUG_MSG ("resume");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册