diff options
author | James Brown | 2003-04-20 16:25:48 +0000 |
---|---|---|
committer | James Brown | 2003-04-20 16:25:48 +0000 |
commit | 79189f2e12ef24312848d152a599a65373447b37 (patch) | |
tree | cd1716306ddf61756c6ae93abc2ad47321e0add6 /scumm/debugger.cpp | |
parent | ce6859d6c6d0baa6d663fe0d36f10db3eb558531 (diff) | |
download | scummvm-rg350-79189f2e12ef24312848d152a599a65373447b37.tar.gz scummvm-rg350-79189f2e12ef24312848d152a599a65373447b37.tar.bz2 scummvm-rg350-79189f2e12ef24312848d152a599a65373447b37.zip |
Dump Scumm error() to debugger
svn-id: r7033
Diffstat (limited to 'scumm/debugger.cpp')
-rw-r--r-- | scumm/debugger.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp index 2a8a8f6e4b..9ffd3b24db 100644 --- a/scumm/debugger.cpp +++ b/scumm/debugger.cpp @@ -48,9 +48,12 @@ ScummDebugger::ScummDebugger() { } // Initialisation Functions -void ScummDebugger::attach(Scumm *s) { +void ScummDebugger::attach(Scumm *s, char *entry) { if (_s) detach(); + + if (entry) + errStr = strdup(entry); _s = s; s->_debugger = this; @@ -161,8 +164,15 @@ void ScummDebugger::enter() { #ifdef USE_CONSOLE if (!_s->_debuggerDialog) { _s->_debuggerDialog = new ConsoleDialog(_s->_newgui, _s->_realWidth); + Debug_Printf("Debugger started, type 'exit' to return to the game\n"); } + + if (errStr) { + Debug_Printf("ERROR: %s\n\n", errStr); + free(errStr); + errStr = NULL; + } _s->_debuggerDialog->setInputeCallback(debuggerInputCallback, this); _s->_debuggerDialog->runModal(); |