From e6ad76b031de72959321404e0789a44b43c81f10 Mon Sep 17 00:00:00 2001 From: belliash Date: Sun, 26 Aug 2018 20:29:19 +0200 Subject: [PATCH] Dump VM after execution. VM instructions dump should be processed after script execution to follow included files. --- sapi/cli/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sapi/cli/main.c b/sapi/cli/main.c index 3186c41..5fe021a 100644 --- a/sapi/cli/main.c +++ b/sapi/cli/main.c @@ -205,6 +205,11 @@ int main(int argc, char **argv) { for(n = n + 1; n < argc ; ++n) { ph7_vm_config(pVm, PH7_VM_CONFIG_ARGV_ENTRY, argv[n]/* Argument value */); } + /* + * And finally, execute our program. Note that your output (STDOUT in our case) + * should display the result. + */ + ph7_vm_exec(pVm, &status); if(dump_vm) { /* Dump PH7 byte-code instructions */ ph7_vm_dump(pVm, @@ -212,11 +217,6 @@ int main(int argc, char **argv) { 0 ); } - /* - * And finally, execute our program. Note that your output (STDOUT in our case) - * should display the result. - */ - ph7_vm_exec(pVm, &status); /* All done, cleanup the mess left behind. */ ph7_vm_release(pVm);