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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Sep 21 23:38:08 CEST 2009


Revision: 44239
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44239&view=rev
Author:   fingolfin
Date:     2009-09-21 21:38:07 +0000 (Mon, 21 Sep 2009)

Log Message:
-----------
SCI: Workaround for crash in debugger's backtrace

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	2009-09-21 21:37:47 UTC (rev 44238)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp	2009-09-21 21:38:07 UTC (rev 44239)
@@ -391,6 +391,26 @@
 Kernel::~Kernel() {
 }
 
+uint Kernel::getSelectorNamesSize() const {
+	return _selectorNames.size();
+}
+const Common::String &Kernel::getSelectorName(uint selector) const {
+	return _selectorNames[selector];
+}
+
+uint Kernel::getKernelNamesSize() const {
+	return _kernelNames.size();
+}
+const Common::String &Kernel::getKernelName(uint number) const {
+	// FIXME: The following check is a temporary workaround for
+	// an issue leading to crashes when using the debugger's backtrace
+	// command.
+	static const Common::String invalid = "(invalid)";
+	if (number >= _kernelNames.size())
+		return invalid;
+	return _kernelNames[number];
+}
+
 void Kernel::detectSciFeatures() {
 	SciVersion version = _resMan->sciVersion();
 

Modified: scummvm/trunk/engines/sci/engine/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.h	2009-09-21 21:37:47 UTC (rev 44238)
+++ scummvm/trunk/engines/sci/engine/kernel.h	2009-09-21 21:38:07 UTC (rev 44239)
@@ -65,11 +65,11 @@
 	Kernel(ResourceManager *resMan);
 	~Kernel();
 
-	uint getSelectorNamesSize() const { return _selectorNames.size(); }
-	const Common::String &getSelectorName(uint selector) const { return _selectorNames[selector]; }
+	uint getSelectorNamesSize() const;
+	const Common::String &getSelectorName(uint selector) const;
 
-	uint getKernelNamesSize() const { return _kernelNames.size(); }
-	const Common::String &getKernelName(uint number) const { return _kernelNames[number]; }
+	uint getKernelNamesSize() const;
+	const Common::String &getKernelName(uint number) const;
 
 	/**
 	 * Determines the selector ID of a selector by its name


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