aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2010-05-28 12:37:54 +0000
committerFilippos Karapetis2010-05-28 12:37:54 +0000
commit5b12fda0596b8b05768cc073b681d61c1493cf8e (patch)
tree13102e48cc1d0f8b1475f19bd4092088a4519333
parentb2e4e4b3409b1b8061890f921c80375096dc097e (diff)
downloadscummvm-rg350-5b12fda0596b8b05768cc073b681d61c1493cf8e.tar.gz
scummvm-rg350-5b12fda0596b8b05768cc073b681d61c1493cf8e.tar.bz2
scummvm-rg350-5b12fda0596b8b05768cc073b681d61c1493cf8e.zip
Added some more info when severe script errors occur
svn-id: r49293
-rw-r--r--engines/sci/engine/vm.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 903c4a9a78..db45a087fa 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -832,12 +832,14 @@ void run_vm(EngineState *s, bool restoring) {
#ifndef DISABLE_VALIDATIONS
if (scriptState.xs->sp < scriptState.xs->fp)
- error("run_vm(): stack underflow");
+ error("run_vm(): stack underflow, sp: %04x:%04x, fp: %04x:%04x",
+ PRINT_REG(*scriptState.xs->sp), PRINT_REG(*scriptState.xs->fp));
scriptState.variables_max[VAR_TEMP] = scriptState.xs->sp - scriptState.xs->fp;
if (scriptState.xs->addr.pc.offset >= code_buf_size)
- error("run_vm(): program counter gone astray");
+ error("run_vm(): program counter gone astray, addr: %d, code buffer size: %d",
+ scriptState.xs->addr.pc.offset, code_buf_size);
#endif
// Get opcode