[Scummvm-cvs-logs] SF.net SVN: scummvm:[46934] scummvm/trunk/engines/sci/console.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Jan 3 17:50:27 CET 2010
Revision: 46934
http://scummvm.svn.sourceforge.net/scummvm/?rev=46934&view=rev
Author: thebluegr
Date: 2010-01-03 16:50:27 +0000 (Sun, 03 Jan 2010)
Log Message:
-----------
The backtrace command now outputs to the graphical console
Modified Paths:
--------------
scummvm/trunk/engines/sci/console.cpp
Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp 2010-01-03 16:43:59 UTC (rev 46933)
+++ scummvm/trunk/engines/sci/console.cpp 2010-01-03 16:50:27 UTC (rev 46934)
@@ -2099,7 +2099,7 @@
bool Console::cmdBacktrace(int argc, const char **argv) {
DebugPrintf("Dumping the send/self/super/call/calle/callb stack:\n");
- printf("Call stack (current base: 0x%x):\n", _vm->_gamestate->execution_stack_base);
+ DebugPrintf("Call stack (current base: 0x%x):\n", _vm->_gamestate->execution_stack_base);
Common::List<ExecStack>::iterator iter;
uint i = 0;
@@ -2112,17 +2112,17 @@
switch (call.type) {
case EXEC_STACK_TYPE_CALL: {// Normal function
- printf(" %x:[%x] %s::%s(", i, call.origin, objname, (call.selector == -1) ? "<call[be]?>" :
+ DebugPrintf(" %x:[%x] %s::%s(", i, call.origin, objname, (call.selector == -1) ? "<call[be]?>" :
selector_name(_vm->_gamestate, call.selector));
}
break;
case EXEC_STACK_TYPE_KERNEL: // Kernel function
- printf(" %x:[%x] k%s(", i, call.origin, _vm->getKernel()->getKernelName(call.selector).c_str());
+ DebugPrintf(" %x:[%x] k%s(", i, call.origin, _vm->getKernel()->getKernelName(call.selector).c_str());
break;
case EXEC_STACK_TYPE_VARSELECTOR:
- printf(" %x:[%x] vs%s %s::%s (", i, call.origin, (call.argc) ? "write" : "read",
+ DebugPrintf(" %x:[%x] vs%s %s::%s (", i, call.origin, (call.argc) ? "write" : "read",
objname, _vm->getKernel()->getSelectorName(call.selector).c_str());
break;
}
@@ -2133,31 +2133,31 @@
totalparamc = 16;
for (paramc = 1; paramc <= totalparamc; paramc++) {
- printf("%04x:%04x", PRINT_REG(call.variables_argp[paramc]));
+ DebugPrintf("%04x:%04x", PRINT_REG(call.variables_argp[paramc]));
if (paramc < call.argc)
- printf(", ");
+ DebugPrintf(", ");
}
if (call.argc > 16)
- printf("...");
+ DebugPrintf("...");
- printf(")\n obj@%04x:%04x", PRINT_REG(call.objp));
+ DebugPrintf(")\n obj@%04x:%04x", PRINT_REG(call.objp));
if (call.type == EXEC_STACK_TYPE_CALL) {
- printf(" pc=%04x:%04x", PRINT_REG(call.addr.pc));
+ DebugPrintf(" pc=%04x:%04x", PRINT_REG(call.addr.pc));
if (call.sp == CALL_SP_CARRY)
- printf(" sp,fp:carry");
+ DebugPrintf(" sp,fp:carry");
else {
- printf(" sp=ST:%04x", (unsigned)(call.sp - _vm->_gamestate->stack_base));
- printf(" fp=ST:%04x", (unsigned)(call.fp - _vm->_gamestate->stack_base));
+ DebugPrintf(" sp=ST:%04x", (unsigned)(call.sp - _vm->_gamestate->stack_base));
+ DebugPrintf(" fp=ST:%04x", (unsigned)(call.fp - _vm->_gamestate->stack_base));
}
} else
- printf(" pc:none");
+ DebugPrintf(" pc:none");
- printf(" argp:ST:%04x", (unsigned)(call.variables_argp - _vm->_gamestate->stack_base));
+ DebugPrintf(" argp:ST:%04x", (unsigned)(call.variables_argp - _vm->_gamestate->stack_base));
if (call.type == EXEC_STACK_TYPE_CALL)
- printf(" script: %d", (*(Script *)_vm->_gamestate->_segMan->_heap[call.addr.pc.segment])._nr);
- printf("\n");
+ DebugPrintf(" script: %d", (*(Script *)_vm->_gamestate->_segMan->_heap[call.addr.pc.segment])._nr);
+ DebugPrintf("\n");
}
return true;
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