Add support for next and stop operations for the Debugger.

Furthermore the function info is displayed when we stop inside a function.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg 2020-03-06 03:53:50 -08:00 committed by Hyukwoo Park
commit bf3a8c7463
6 changed files with 97 additions and 31 deletions

View file

@ -360,7 +360,7 @@ void ScriptParser::recursivelyGenerateByteCode(InterpretedCodeBlock* topCodeBloc
}
if (m_context->debugger()->enabled()) {
m_context->debugger()->sendPointer(Debugger::ESCARGOT_MESSAGE_FUNCTION_PTR, codeBlock->m_byteCodeBlock->m_code.data());
m_context->debugger()->sendFunctionInfo(codeBlock);
}
}
@ -423,7 +423,7 @@ ScriptParser::InitializeScriptResult ScriptParser::initializeScriptWithDebugger(
topCodeBlock->m_byteCodeBlock = ByteCodeGenerator::generateByteCode(m_context, topCodeBlock, programNode, programNode->scopeContext(), isEvalMode, !isEvalCodeInFunction, inWith);
if (m_context->debugger() != nullptr && m_context->debugger()->enabled()) {
m_context->debugger()->sendPointer(Debugger::ESCARGOT_MESSAGE_FUNCTION_PTR, topCodeBlock->m_byteCodeBlock->m_code.data());
m_context->debugger()->sendFunctionInfo(topCodeBlock);
}
// reset ASTAllocator