Fix debugger to match with the updated vscode extension

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
HyukWoo Park 2022-06-20 17:01:53 +09:00 committed by Patrick Kim
commit f23646ca1b
5 changed files with 6 additions and 46 deletions

View file

@ -801,39 +801,6 @@ void ByteCodeGenerator::relocateByteCode(ByteCodeBlock* block)
}
}
#ifdef ESCARGOT_DEBUGGER
bool ByteCodeGenerator::enableFirstBreakPoint(ByteCodeBlock* block)
{
// This function should be called after ByteCode relocation (`relocateByteCode`)
ASSERT(block && block->m_code.size());
char* code = block->m_code.data();
size_t codeBase = (size_t)code;
char* end = code + block->m_code.size();
while (code < end) {
ByteCode* currentCode = reinterpret_cast<ByteCode*>(code);
#if defined(COMPILER_GCC) || defined(COMPILER_CLANG)
if (currentCode->m_opcodeInAddress == g_opcodeTable.m_addressTable[BreakpointDisabledOpcode]) {
currentCode->m_opcodeInAddress = g_opcodeTable.m_addressTable[BreakpointEnabledOpcode];
return true;
}
#else
if (currentCode->m_opcode == BreakpointDisabledOpcode) {
currentCode->m_opcode = BreakpointEnabledOpcode;
return true;
}
#endif
ASSERT(currentCode->m_orgOpcode != BreakpointEnabledOpcode);
ASSERT(currentCode->m_orgOpcode <= EndOpcode);
code += byteCodeLengths[currentCode->m_orgOpcode];
}
return false;
}
#endif
#ifndef NDEBUG
void ByteCodeGenerator::printByteCode(Context* context, ByteCodeBlock* block)
{