[Scummvm-cvs-logs] SF.net SVN: scummvm:[55249] scummvm/trunk/engines/sci/console.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sat Jan 15 12:54:20 CET 2011
Revision: 55249
http://scummvm.svn.sourceforge.net/scummvm/?rev=55249&view=rev
Author: thebluegr
Date: 2011-01-15 11:54:20 +0000 (Sat, 15 Jan 2011)
Log Message:
-----------
SCI: Extended the bpk debug command so that it can also disable a breakpoint on a kernel function
Modified Paths:
--------------
scummvm/trunk/engines/sci/console.cpp
Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp 2011-01-15 09:43:02 UTC (rev 55248)
+++ scummvm/trunk/engines/sci/console.cpp 2011-01-15 11:54:20 UTC (rev 55249)
@@ -2947,7 +2947,7 @@
bool Console::cmdLogKernel(int argc, const char **argv) {
if (argc < 3) {
DebugPrintf("Logs calls to specified kernel function.\n");
- DebugPrintf("Usage: %s <kernel-function/*> <on/off>\n", argv[0]);
+ DebugPrintf("Usage: %s <kernel function/*> <on/off>\n", argv[0]);
DebugPrintf("Example: %s StrCpy on\n", argv[0]);
return true;
}
@@ -3103,15 +3103,25 @@
}
bool Console::cmdBreakpointKernel(int argc, const char **argv) {
- if (argc != 2) {
+ if (argc < 3) {
DebugPrintf("Sets a breakpoint on execution of a kernel function.\n");
- DebugPrintf("Usage: %s <name>\n", argv[0]);
- DebugPrintf("Example: %s DrawPic\n", argv[0]);
+ DebugPrintf("Usage: %s <name> <on/off>\n", argv[0]);
+ DebugPrintf("Example: %s DrawPic on\n", argv[0]);
return true;
}
- if (g_sci->getKernel()->debugSetFunction(argv[1], -1, true))
- DebugPrintf("Breakpoint enabled for k%s\n", argv[1]);
+ bool breakpoint;
+ if (strcmp(argv[2], "on") == 0)
+ breakpoint = true;
+ else if (strcmp(argv[2], "off") == 0)
+ breakpoint = false;
+ else {
+ DebugPrintf("2nd parameter must be either on or off\n");
+ return true;
+ }
+
+ if (g_sci->getKernel()->debugSetFunction(argv[1], -1, breakpoint))
+ DebugPrintf("Breakpoint %s for k%s\n", (breakpoint ? "enabled" : "disabled"), argv[1]);
else
DebugPrintf("Unknown kernel function %s\n", argv[1]);
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