diff --git a/stella/src/debugger/Debugger.cxx b/stella/src/debugger/Debugger.cxx index 36b08eaa9..a35de5fc1 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.29 2005-06-23 02:10:11 urchlay Exp $ +// $Id: Debugger.cxx,v 1.30 2005-06-23 02:56:45 urchlay Exp $ //============================================================================ #include "bspf.hxx" @@ -628,3 +628,8 @@ string Debugger::showWatches() { void Debugger::addLabel(string label, int address) { equateList->addEquate(label, address); } + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void Debugger::reloadROM() { + myOSystem->createConsole( myOSystem->romFile() ); +} diff --git a/stella/src/debugger/Debugger.hxx b/stella/src/debugger/Debugger.hxx index 4b6359266..3d73856dd 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.26 2005-06-23 01:10:25 urchlay Exp $ +// $Id: Debugger.hxx,v 1.27 2005-06-23 02:56:45 urchlay Exp $ //============================================================================ #ifndef DEBUGGER_HXX @@ -51,7 +51,7 @@ enum { for all debugging operations in Stella (parser, 6502 debugger, etc). @author Stephen Anthony - @version $Id: Debugger.hxx,v 1.26 2005-06-23 01:10:25 urchlay Exp $ + @version $Id: Debugger.hxx,v 1.27 2005-06-23 02:56:45 urchlay Exp $ */ class Debugger : public DialogContainer { @@ -143,6 +143,8 @@ class Debugger : public DialogContainer string disassemble(int start, int lines); bool setHeight(int height); + void reloadROM(); + public: /** Run the debugger command and return the result. diff --git a/stella/src/debugger/DebuggerParser.cxx b/stella/src/debugger/DebuggerParser.cxx index 478b23fe7..55d5de6ce 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.29 2005-06-23 02:13:49 urchlay Exp $ +// $Id: DebuggerParser.cxx,v 1.30 2005-06-23 02:56:45 urchlay Exp $ //============================================================================ #include "bspf.hxx" @@ -328,12 +328,12 @@ string DebuggerParser::showWatches() { string ret = "\n"; char buf[10]; - // Clear the args, since we're going to pass them to eval() - argStrings.clear(); - args.clear(); for(unsigned int i=0; idumpTIA(); } else if(subStringMatch(verb, "reset")) { debugger->reset(); + } else if(subStringMatch(verb, "reload")) { + debugger->reloadROM(); + debugger->start(); } else if(subStringMatch(verb, "trap")) { if(argCount != 1) return "one argument required"; @@ -640,14 +643,16 @@ string DebuggerParser::run(const string& command) { // easy to sort - bkw return "Commands are case-insensitive and may be abbreviated (e.g. \"tr\" for \"trace\").\n" - "Arguments are either labels or hex constants, and may be\n" + "Arguments are either labels or numeric constants, and may be\n" "prefixed with a * to dereference, < or > for low/high byte,\n" "and/or $/#/% for hex/dec/binary.\n\n" "a xx - Set Accumulator to xx\n" + "*bank xx - Switch to ROM bank xx\n" "base xx - Set default input base (#2=binary, #10=decimal, #16=hex)\n" "break - Set/clear breakpoint at current PC\n" "break xx - Set/clear breakpoint at address xx\n" "c - Toggle Carry Flag\n" + "*cartinfo - Show cartridge information\n" "clearbreaks - Clear all breakpoints\n" "cleartraps - Clear all traps\n" "clearwatches - Clear all watches\n" @@ -666,17 +671,18 @@ string DebuggerParser::run(const string& command) { "loadsym f - Load DASM symbols from file f\n" "n - Toggle Negative Flag\n" "pc xx - Set Program Counter to xx\n" - "print xx - Evaluate and print expression xx\n" + "print xx - Evaluate and print expression xx in hex/decimal/binary\n" //"poke xx yy - Write data yy to address xx (may be ROM, TIA, etc)\n" "ram - Show RIOT RAM contents\n" "ram xx yy - Set RAM location xx to value yy (multiple values allowed)\n" + "reload - Reload ROM and symbol file (resets debugger)\n" "reset - Jump to 6502 init vector (does not reset TIA/RIOT)\n" "run - Exit debugger (back to emulator)\n" "s xx - Set Stack Pointer to xx\n" "saveses f - Save console session to file f\n" "savesym f - Save symbols to file f\n" "step - Single-step\n" - "tia - Show TIA register contents\n" + "tia - Show TIA register contents (NOT FINISHED YET)\n" "trace - Single-step treating subroutine calls as 1 instruction\n" "trap xx - Trap any access to location xx (enter debugger on access)\n" "trapread xx - Trap any read access from location xx\n"