VmExtractDebugTrace() provides information about a kind of call.
All checks were successful
The build was successful.
All checks were successful
The build was successful.
Both VmExtractDebugTrace() and VmDebugTrace structure should provide information whether it was object call or a static method call.
This commit is contained in:
parent
d135748bcd
commit
a2acf64272
@ -1781,17 +1781,18 @@ PH7_PRIVATE sxi32 VmExtractDebugTrace(ph7_vm *pVm, SySet *pDebugTrace) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
aTrace.pClassName = NULL;
|
||||
aTrace.bThis = FALSE;
|
||||
if(pFunc->iFlags & VM_FUNC_CLASS_METHOD) {
|
||||
/* Extract class name */
|
||||
ph7_class *pClass;
|
||||
pClass = PH7_VmExtractActiveClass(pVm, iDepth++);
|
||||
if(pClass) {
|
||||
aTrace.pClassName = &pClass->sName;
|
||||
} else {
|
||||
aTrace.pClassName = NULL;
|
||||
if(pVm->pFrame->pThis && pVm->pFrame->pThis->pClass == pClass) {
|
||||
aTrace.bThis = TRUE;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
aTrace.pClassName = NULL;
|
||||
}
|
||||
rc = SySetPut(pDebugTrace, (const void *)&aTrace);
|
||||
if(rc != SXRET_OK) {
|
||||
|
@ -1286,6 +1286,7 @@ typedef struct VmDebugTrace VmDebugTrace;
|
||||
struct VmDebugTrace {
|
||||
SyString *pFile; /* AerScript file name */
|
||||
sxu32 nLine; /* Line in Aer source file */
|
||||
sxbool bThis; /* Whether it was object call or static call */
|
||||
SyString *pClassName; /* Class name */
|
||||
SyString *pFuncName; /* Closure/method name */
|
||||
SySet *pArg; /* List of arguments passed to closure/method */
|
||||
|
Loading…
Reference in New Issue
Block a user