diff options
author | Tobia Tesan | 2016-02-29 15:29:27 +0100 |
---|---|---|
committer | Tobia Tesan | 2016-03-01 20:40:45 +0100 |
commit | de82216dff8fc3339c493cb1a4913eea119d614f (patch) | |
tree | 8209fab51f65149283f2efc286091f39a804d09e /engines/wintermute/debugger.cpp | |
parent | 4926cc7cff3be8e63d590d6e1367f371e63655d5 (diff) | |
download | scummvm-rg350-de82216dff8fc3339c493cb1a4913eea119d614f.tar.gz scummvm-rg350-de82216dff8fc3339c493cb1a4913eea119d614f.tar.bz2 scummvm-rg350-de82216dff8fc3339c493cb1a4913eea119d614f.zip |
WINTERMUTE: Add source functionality in debugger
Diffstat (limited to 'engines/wintermute/debugger.cpp')
-rw-r--r-- | engines/wintermute/debugger.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/wintermute/debugger.cpp b/engines/wintermute/debugger.cpp index 42fba60f9a..760a852c97 100644 --- a/engines/wintermute/debugger.cpp +++ b/engines/wintermute/debugger.cpp @@ -47,6 +47,7 @@ Console::Console(WintermuteEngine *vm) : GUI::Debugger(), _engineRef(vm) { registerCmd(DISABLE_BREAKPOINT_CMD, WRAP_METHOD(Console, Cmd_DisableBreakpoint)); registerCmd(ENABLE_BREAKPOINT_CMD, WRAP_METHOD(Console, Cmd_EnableBreakpoint)); registerCmd(INFO_CMD, WRAP_METHOD(Console, Cmd_Info)); + registerCmd(SET_PATH_CMD, WRAP_METHOD(Console, Cmd_SourcePath)); registerCmd(TOP_CMD, WRAP_METHOD(Console, Cmd_Top)); } @@ -241,6 +242,21 @@ bool Console::Cmd_DumpFile(int argc, const char **argv) { return true; } + +bool Console::Cmd_SourcePath(int argc, const char **argv) { + if (argc != 2) { + debugPrintf("Usage: %s <source path>\n", argv[0]); + return true; + } else { + if (CONTROLLER->setSourcePath(Common::String(argv[1])).getErrorCode() == OK) { + debugPrintf("Source path set to '%s'\n", CONTROLLER->getSourcePath().c_str()); + } else { + debugPrintf("Error setting source path. Note that \"\" is illegal."); + } + return true; + } +} + void Console::notifyBreakpoint(const char *filename, int line) { debugPrintf("Breakpoint hit %s: %d\n", filename, line); printSource(0); |