Enable debugging.
The build was successful.

This commit introduces ne debug feature. The PH7 Engine limits the VM dump to the global scope. Since Aer Script is fully object-oriented language the dump option contains only information about last call of OP_DONE. This change,
forces the VM to store all instructions set in a global container when debugging is enabled, thus providing information the dump of whole script parse.
This commit is contained in:
2018-08-26 19:59:17 +02:00
parent ab5ee94f99
commit 178f3820f6
2 changed files with 15 additions and 2 deletions
+3 -1
View File
@@ -1199,6 +1199,7 @@ struct ph7_vm {
SyMutex *pMutex; /* Recursive mutex associated with VM. */
#endif
ph7 *pEngine; /* Interpreter that own this VM */
SySet aInstrSet; /* Instructions debug container */
SySet aByteCode; /* Default bytecode container */
SySet *pByteContainer; /* Current bytecode container */
VmFrame *pFrame; /* Stack of active frames */
@@ -1232,7 +1233,8 @@ struct ph7_vm {
void *pStdin; /* STDIN IO stream */
void *pStdout; /* STDOUT IO stream */
void *pStderr; /* STDERR IO stream */
int bErrReport; /* TRUE to report all runtime Error/Warning/Notice */
sxbool bDebug; /* TRUE to enable debugging */
sxbool bErrReport; /* TRUE to report all runtime Error/Warning/Notice */
int nRecursionDepth; /* Current recursion depth */
int nMaxDepth; /* Maximum allowed recursion depth */
int nObDepth; /* OB depth */