mirror of https://github.com/stella-emu/stella.git
Implemented missing "clearbreaks" command in prompt. This command nulls
out the M6502's breakPoints, so any speed decrease caused by breakpoint checking logic should go away after breakpoints are cleared. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@526 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
17d72c8d12
commit
a92a6b0ab8
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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; i<count; i++)
|
||||
debugger->nextFrame();
|
||||
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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue