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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Sat Jul 3 20:44:45 CEST 2010


Revision: 50626
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50626&view=rev
Author:   m_kiewitz
Date:     2010-07-03 18:44:44 +0000 (Sat, 03 Jul 2010)

Log Message:
-----------
SCI: adding support to identify uninitialized values, when doing debug output for kernel signatures

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

Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp	2010-07-03 15:27:10 UTC (rev 50625)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp	2010-07-03 18:44:44 UTC (rev 50626)
@@ -685,6 +685,9 @@
 	if (!reg.segment)
 		return reg.offset ? KSIG_ARITHMETIC : KSIG_ARITHMETIC | KSIG_NULL;
 
+	if (reg.segment == 0xFFFF)
+		return KSIG_UNINITIALIZED;
+
 	// Otherwise it's an object
 	SegmentObj *mobj = _segMan->getSegmentObj(reg.segment);
 	if (!mobj)
@@ -728,13 +731,14 @@
 };
 
 static const SignatureDebugType signatureDebugTypeList[] = {
-	{ KSIG_NULL,       "null" },
-	{ KSIG_ARITHMETIC, "value" },
-	{ KSIG_OBJECT,     "object" },
-	{ KSIG_REF,        "reference" },
-	{ KSIG_LIST,       "list" },
-	{ KSIG_NODE,       "node" },
-	{ 0,               NULL }
+	{ KSIG_NULL,          "null" },
+	{ KSIG_ARITHMETIC,    "value" },
+	{ KSIG_UNINITIALIZED, "uninitialized" },
+	{ KSIG_OBJECT,        "object" },
+	{ KSIG_REF,           "reference" },
+	{ KSIG_LIST,          "list" },
+	{ KSIG_NODE,          "node" },
+	{ 0,                  NULL }
 };
 
 static void kernelSignatureDebugType(const char type) {

Modified: scummvm/trunk/engines/sci/engine/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.h	2010-07-03 15:27:10 UTC (rev 50625)
+++ scummvm/trunk/engines/sci/engine/kernel.h	2010-07-03 18:44:44 UTC (rev 50626)
@@ -99,14 +99,15 @@
 
 // Compiled signatures
 enum {
-	KSIG_LIST       = 0x01,
-	KSIG_NODE       = 0x02,
-	KSIG_OBJECT     = 0x04,
-	KSIG_REF        = 0x08,
-	KSIG_ARITHMETIC = 0x10,
-	KSIG_NULL       = 0x40,
-	KSIG_ANY        = 0x5f,
-	KSIG_ELLIPSIS   = 0x80
+	KSIG_LIST          = 0x01,
+	KSIG_NODE          = 0x02,
+	KSIG_OBJECT        = 0x04,
+	KSIG_REF           = 0x08,
+	KSIG_ARITHMETIC    = 0x10,
+	KSIG_UNINITIALIZED = 0x20,
+	KSIG_NULL          = 0x40,
+	KSIG_ANY           = 0x5f,
+	KSIG_ELLIPSIS      = 0x80
 };
 
 // ----------------------------------------------------------------------------


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