Fixed long standing bug with comparitive searches of RAM in the debugger.

Since it didn't really work, it makes me wonder exactly how many people
are using these features (since they certainly aren't reporting the
bugs).


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1072 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2006-03-29 13:53:00 +00:00
parent cf8b09d3d2
commit 059afc0d8e
1 changed files with 9 additions and 5 deletions

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: RamWidget.cxx,v 1.4 2006-03-23 16:16:32 stephena Exp $ // $Id: RamWidget.cxx,v 1.5 2006-03-29 13:53:00 stephena Exp $
// //
// Based on code from ScummVM - Scumm Interpreter // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // Copyright (C) 2002-2004 The ScummVM project
@ -368,7 +368,7 @@ const string RamWidget::doCompare(const string& str)
// Now, search all memory locations specified in mySearchArray for this value // Now, search all memory locations specified in mySearchArray for this value
RamDebug& dbg = instance()->debugger().ramDebug(); RamDebug& dbg = instance()->debugger().ramDebug();
IntArray tempList; IntArray tempAddrList, tempValueList;
for(unsigned int i = 0; i < mySearchAddr.size(); ++i) for(unsigned int i = 0; i < mySearchAddr.size(); ++i)
{ {
if(comparitiveSearch) if(comparitiveSearch)
@ -380,11 +380,15 @@ const string RamWidget::doCompare(const string& str)
int addr = mySearchAddr[i]; int addr = mySearchAddr[i];
if(dbg.read(addr) == searchVal) if(dbg.read(addr) == searchVal)
tempList.push_back(addr); {
tempAddrList.push_back(addr);
tempValueList.push_back(searchVal);
}
} }
// Update the searchArray to the new results // Update the searchArray for the new addresses and data
mySearchAddr = tempList; mySearchAddr = tempAddrList;
mySearchValue = tempValueList;
// If we have some hits, enable the comparison methods // If we have some hits, enable the comparison methods
if(mySearchAddr.size() > 0) if(mySearchAddr.size() > 0)