SCI: Remove outdated debugging hack.

In the past, a negative selector value was used to identify a callk
stack frame. Currently a type of EXEC_STACK_TYPE_KERNEL already does that.

svn-id: r44510
This commit is contained in:
Willem Jan Palenstijn 2009-10-01 08:53:10 +00:00
parent 24d649b972
commit 168257df24
3 changed files with 2 additions and 11 deletions

View File

@ -2003,7 +2003,7 @@ bool Console::cmdBacktrace(int argc, const char **argv) {
break;
case EXEC_STACK_TYPE_KERNEL: // Kernel function
printf(" %x:[%x] k%s(", i, call.origin, _vm->getKernel()->getKernelName(kMagicSelectorOffset - call.selector).c_str());
printf(" %x:[%x] k%s(", i, call.origin, _vm->getKernel()->getKernelName(call.selector).c_str());
break;
case EXEC_STACK_TYPE_VARSELECTOR:

View File

@ -953,8 +953,7 @@ void run_vm(EngineState *s, int restoring) {
ExecStack *xstack;
xstack = add_exec_stack_entry(s, NULL_REG, NULL, NULL_REG, argc, argv - 1, 0, NULL_REG,
s->_executionStack.size()-1, SCI_XS_CALLEE_LOCALS);
// Debugging hack to identify kernel function
xstack->selector = kMagicSelectorOffset - opparams[0];
xstack->selector = opparams[0];
xstack->type = EXEC_STACK_TYPE_KERNEL;
// Call kernel function

View File

@ -102,14 +102,6 @@ enum SelectorType {
kSelectorMethod
};
enum {
/**
* Magic offset, used to compute fake selector values for use in ExecStack
* when doing a callk. See the callk code in vm.cpp for details.
*/
kMagicSelectorOffset = -42
};
struct Class {
int script; /**< number of the script the class is in, -1 for non-existing */
reg_t reg; /**< offset; script-relative offset, segment: 0 if not instantiated */