diff --git a/stella/src/debugger/Debugger.cxx b/stella/src/debugger/Debugger.cxx index ac2d24b85..8fe321d63 100644 --- a/stella/src/debugger/Debugger.cxx +++ b/stella/src/debugger/Debugger.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: Debugger.cxx,v 1.15 2005-06-18 07:12:53 urchlay Exp $ +// $Id: Debugger.cxx,v 1.16 2005-06-18 15:45:05 urchlay Exp $ //============================================================================ #include "bspf.hxx" @@ -429,4 +429,12 @@ string Debugger::disassemble(int start, int lines) { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void Debugger::nextFrame() { myOSystem->frameBuffer().advance(); + myBaseDialog->loadConfig(); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void Debugger::clearAllBreakPoints() { + delete breakPoints; + breakPoints = new PackedBitArray(0x10000); + mySystem->m6502().setBreakPoints(NULL); } diff --git a/stella/src/debugger/Debugger.hxx b/stella/src/debugger/Debugger.hxx index 87149c651..7b1d8e2e0 100644 --- a/stella/src/debugger/Debugger.hxx +++ b/stella/src/debugger/Debugger.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: Debugger.hxx,v 1.13 2005-06-18 07:12:53 urchlay Exp $ +// $Id: Debugger.hxx,v 1.14 2005-06-18 15:45:05 urchlay Exp $ //============================================================================ #ifndef DEBUGGER_HXX @@ -49,7 +49,7 @@ enum { for all debugging operations in Stella (parser, 6502 debugger, etc). @author Stephen Anthony - @version $Id: Debugger.hxx,v 1.13 2005-06-18 07:12:53 urchlay Exp $ + @version $Id: Debugger.hxx,v 1.14 2005-06-18 15:45:05 urchlay Exp $ */ class Debugger : public DialogContainer { @@ -154,6 +154,7 @@ class Debugger : public DialogContainer void reset(); void autoLoadSymbols(string file); void nextFrame(); + void clearAllBreakPoints(); void formatFlags(int f, char *out); EquateList *equates(); diff --git a/stella/src/debugger/DebuggerParser.cxx b/stella/src/debugger/DebuggerParser.cxx index 02ae9fed8..f25ee7e88 100644 --- a/stella/src/debugger/DebuggerParser.cxx +++ b/stella/src/debugger/DebuggerParser.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: DebuggerParser.cxx,v 1.11 2005-06-18 07:12:53 urchlay Exp $ +// $Id: DebuggerParser.cxx,v 1.12 2005-06-18 15:45:05 urchlay Exp $ //============================================================================ #include "bspf.hxx" @@ -229,10 +229,7 @@ string DebuggerParser::run(const string& command) { // TODO: de-uglify this somehow. (it may not be worth doing?) - if(subStringMatch(verb, "quit") || subStringMatch(verb, "run")) { - debugger->quit(); - return ""; - } else if(subStringMatch(verb, "a")) { + if(subStringMatch(verb, "a")) { if(argCount == 1) if(args[0] <= 0xff) debugger->setA(args[0]); @@ -322,11 +319,18 @@ string DebuggerParser::run(const string& command) { } else if(subStringMatch(verb, "disasm")) { return disasm(); } else if(subStringMatch(verb, "frame")) { - debugger->nextFrame(); + int count = 0; + if(argCount != 0) count = args[0]; + // FIXME: make multiple frames work! + for(int i=0; inextFrame(); return "OK"; } else if(subStringMatch(verb, "clearbreaks")) { - //debugger->clearAllBreakPoints(); + debugger->clearAllBreakPoints(); return "cleared all breakpoints"; + } else if(subStringMatch(verb, "quit") || subStringMatch(verb, "run")) { + debugger->quit(); + return ""; } else if(subStringMatch(verb, "help") || verb == "?") { // please leave each option on its own line so they're // easy to sort - bkw diff --git a/stella/src/gui/PromptWidget.cxx b/stella/src/gui/PromptWidget.cxx index 64b7d9e51..bebec6eac 100644 --- a/stella/src/gui/PromptWidget.cxx +++ b/stella/src/gui/PromptWidget.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: PromptWidget.cxx,v 1.9 2005-06-17 21:59:54 urchlay Exp $ +// $Id: PromptWidget.cxx,v 1.10 2005-06-18 15:45:05 urchlay Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -174,7 +174,7 @@ bool PromptWidget::handleKeyDown(int ascii, int keycode, int modifiers) addToHistory(str); // Pass the command to the debugger, and print the result - print( instance()->debugger().run(str) + "\n" ); + print( instance()->debugger().run(str) ); // Get rid of the string buffer delete [] str;