Look for executed OP_CALL.
The build was successful. Details

Each function contains a list of all instructions inside, thus we should consider only OP_CALL that has already been executed. As the list is browsed from bottom to top, no more checks are necessary. The first match is what we
are looking for.
This commit is contained in:
Rafal Kupiec 2018-08-31 08:30:59 +02:00
parent 838842fa02
commit 67ce98d924
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 1 additions and 1 deletions

View File

@ -1775,7 +1775,7 @@ PH7_PRIVATE sxi32 VmExtractDebugTrace(ph7_vm *pVm, SySet *pDebugTrace, sxbool bA
aTrace.pArg = &pVm->pFrame->sArg;
for(sxi32 i = (SySetUsed(aByteCode) - 1); i >= 0 ; i--) {
VmInstr *cInstr = (VmInstr *)SySetAt(aByteCode, i);
if(cInstr->iP2) {
if(cInstr->iOp == PH7_OP_CALL && cInstr->bExec == TRUE) {
/* Extract file name & line */
aTrace.pFile = cInstr->pFile;
aTrace.nLine = cInstr->iLine;