"breakif" command now tells you which breakif number you've just set. You

need the numbers so you can refer to them (e.g. delete them).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@673 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
urchlay 2005-07-18 23:00:18 +00:00
parent 00785163f6
commit fec77cf261
4 changed files with 12 additions and 8 deletions

View File

@ -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.64 2005-07-18 02:03:40 urchlay Exp $
// $Id: DebuggerParser.cxx,v 1.65 2005-07-18 23:00:16 urchlay Exp $
//============================================================================
#include "bspf.hxx"
@ -1182,8 +1182,10 @@ void DebuggerParser::executeBreakif() {
int res = YaccParser::parse(argStrings[0].c_str());
if(res == 0) {
// I hate this().method().chaining().crap()
debugger->cpuDebug().m6502().addCondBreak(
unsigned int ret = debugger->cpuDebug().m6502().addCondBreak(
YaccParser::getResult(), argStrings[0] );
commandResult = "Added breakif ";
commandResult += debugger->valueToString(ret);
} else {
commandResult = red("invalid expression");
}

View File

@ -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: TIA.cxx,v 1.53 2005-07-17 00:04:00 stephena Exp $
// $Id: TIA.cxx,v 1.54 2005-07-18 23:00:17 urchlay Exp $
//============================================================================
#include <cassert>
@ -591,6 +591,7 @@ void TIA::updateScanline()
do {
mySystem->m6502().execute(1);
clock = mySystem->cycles() * 3;
updateFrame(clock);
} while(clock < endClock);
totalClocks = (mySystem->cycles() * 3) - myClockWhenFrameStarted;

View File

@ -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: M6502.cxx,v 1.11 2005-07-18 02:03:41 urchlay Exp $
// $Id: M6502.cxx,v 1.12 2005-07-18 23:00:18 urchlay Exp $
//============================================================================
#include "M6502.hxx"
@ -103,10 +103,11 @@ void M6502::stop()
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void M6502::addCondBreak(Expression *e, string name)
unsigned int M6502::addCondBreak(Expression *e, string name)
{
myBreakConds.push_back(e);
myBreakCondNames.push_back(name);
return myBreakConds.size() - 1;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -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: M6502.hxx,v 1.10 2005-07-17 15:50:37 urchlay Exp $
// $Id: M6502.hxx,v 1.11 2005-07-18 23:00:18 urchlay Exp $
//============================================================================
#ifndef M6502_HXX
@ -41,7 +41,7 @@ typedef GUI::Array<Expression*> ExpressionList;
has a 64K addressing space.
@author Bradford W. Mott
@version $Id: M6502.hxx,v 1.10 2005-07-17 15:50:37 urchlay Exp $
@version $Id: M6502.hxx,v 1.11 2005-07-18 23:00:18 urchlay Exp $
*/
class M6502
{
@ -187,7 +187,7 @@ class M6502
void setTraps(PackedBitArray *read, PackedBitArray *write);
int totalInstructionCount() { return myTotalInstructionCount; }
void addCondBreak(Expression *e, string name);
unsigned int addCondBreak(Expression *e, string name);
void delCondBreak(unsigned int brk);
void clearCondBreaks();
const StringList getCondBreakNames();