[Scummvm-cvs-logs] SF.net SVN: scummvm:[50725] scummvm/trunk/engines/sci

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Tue Jul 6 16:26:29 CEST 2010


Revision: 50725
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50725&view=rev
Author:   m_kiewitz
Date:     2010-07-06 14:26:29 +0000 (Tue, 06 Jul 2010)

Log Message:
-----------
SCI: removing invalid reference error from signature checking, instead adding new type "invalid", so that full call parameter debug information is available

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp
    scummvm/trunk/engines/sci/engine/kernel.cpp
    scummvm/trunk/engines/sci/engine/kernel.h

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2010-07-06 14:10:09 UTC (rev 50724)
+++ scummvm/trunk/engines/sci/console.cpp	2010-07-06 14:26:29 UTC (rev 50725)
@@ -3149,7 +3149,7 @@
 	int segType = g_sci->getKernel()->findRegType(variable);
 	SegManager *segMan = g_sci->getEngineState()->_segMan;
 
-	segType &= SIG_TYPE_INTEGER | SIG_TYPE_OBJECT | SIG_TYPE_REFERENCE | SIG_TYPE_NODE | SIG_TYPE_LIST | SIG_TYPE_UNINITIALIZED;
+	segType &= SIG_TYPE_INTEGER | SIG_TYPE_OBJECT | SIG_TYPE_REFERENCE | SIG_TYPE_NODE | SIG_TYPE_LIST | SIG_TYPE_UNINITIALIZED | SIG_TYPE_INVALID;
 
 	switch (segType) {
 	case SIG_TYPE_INTEGER: {
@@ -3173,6 +3173,9 @@
 	case SIG_TYPE_UNINITIALIZED:
 		DebugPrintf(" (uninitialized)");
 		break;
+	case SIG_TYPE_INVALID:
+		DebugPrintf(" (invalid)");
+		break;
 	default:
 		DebugPrintf(" (??\?)");
 	}

Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp	2010-07-06 14:10:09 UTC (rev 50724)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp	2010-07-06 14:26:29 UTC (rev 50725)
@@ -719,10 +719,10 @@
 	// Otherwise it's an object
 	SegmentObj *mobj = _segMan->getSegmentObj(reg.segment);
 	if (!mobj)
-		return 0; // Invalid
+		return SIG_TYPE_INVALID;
 
 	if (!mobj->isValidOffset(reg.offset))
-		error("[KERN] ref %04x:%04x is invalid", PRINT_REG(reg));
+		return SIG_TYPE_INVALID;
 
 	switch (mobj->getType()) {
 	case SEG_TYPE_SCRIPT:
@@ -762,6 +762,7 @@
 	{ SIG_TYPE_NULL,          "null" },
 	{ SIG_TYPE_INTEGER,       "integer" },
 	{ SIG_TYPE_UNINITIALIZED, "uninitialized" },
+	{ SIG_TYPE_INVALID,       "invalid" },
 	{ SIG_TYPE_OBJECT,        "object" },
 	{ SIG_TYPE_REFERENCE,     "reference" },
 	{ SIG_TYPE_LIST,          "list" },

Modified: scummvm/trunk/engines/sci/engine/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.h	2010-07-06 14:10:09 UTC (rev 50724)
+++ scummvm/trunk/engines/sci/engine/kernel.h	2010-07-06 14:26:29 UTC (rev 50725)
@@ -101,6 +101,7 @@
 	SIG_TYPE_NULL          =  0x01, // may be 0:0       [0]
 	SIG_TYPE_INTEGER       =  0x02, // may be 0:*       [i], automatically also allows null
 	SIG_TYPE_UNINITIALIZED =  0x04, // may be FFFF:*    -> not allowable, only used for comparsion
+	SIG_TYPE_INVALID       =  0x08, // invalid segment or offset -> not allowable, only used for comparsion
 	SIG_TYPE_OBJECT        =  0x10, // may be object    [o]
 	SIG_TYPE_REFERENCE     =  0x20, // may be reference [r]
 	SIG_TYPE_LIST          =  0x40, // may be list      [l]


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list