From da69311de5e101319e7b4927c405ebb2b445dfb4 Mon Sep 17 00:00:00 2001 From: thrust26 Date: Mon, 20 Nov 2017 16:18:20 +0100 Subject: [PATCH] savestateifs with identical conditions toggle each other (like breakif and trapif) --- src/debugger/DebuggerParser.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/debugger/DebuggerParser.cxx b/src/debugger/DebuggerParser.cxx index 616fe4e5b..1d1d10ee3 100644 --- a/src/debugger/DebuggerParser.cxx +++ b/src/debugger/DebuggerParser.cxx @@ -1605,6 +1605,15 @@ void DebuggerParser::executeSavestateif() int res = YaccParser::parse(argStrings[0].c_str()); if(res == 0) { + string condition = argStrings[0]; + for(uInt32 i = 0; i < debugger.m6502().getCondSaveStateNames().size(); i++) + { + if(condition == debugger.m6502().getCondSaveStateNames()[i]) + { + executeDelsavestateif(); + return; + } + } uInt32 ret = debugger.m6502().addCondSaveState( YaccParser::getResult(), argStrings[0]); commandResult << "added savestateif " << Base::toString(ret);