diff options
| author | John Peterson <jpeterson57@gmail.com> | 2008-10-18 03:01:28 +0000 |
|---|---|---|
| committer | John Peterson <jpeterson57@gmail.com> | 2008-10-18 03:01:28 +0000 |
| commit | b95ea6ceb616543160ff7fce3aad973dd501cf6d (patch) | |
| tree | f4cc945b1e05d6bab41d772cbd17e561aaa2ec47 /Source/Core/DebuggerWX | |
| parent | 7804c2c026112706a6614926a99616e3c1e3fa6e (diff) | |
Added option to specify a range of addresses in MemoryChecks.ini.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@906 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DebuggerWX')
| -rw-r--r-- | Source/Core/DebuggerWX/Src/BreakpointWindow.cpp | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp b/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp index ed3ef56b3d..79b91cdd8f 100644 --- a/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp +++ b/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp @@ -290,19 +290,46 @@ CBreakPointWindow::OnAddMemoryCheckMany(wxCommandEvent& event) for (std::vector<std::string>::const_iterator iter = lines.begin(); iter != lines.end(); ++iter)
{
std::string line = StripSpaces(*iter);
- u32 Address = 0;
- if (AsciiToHex(line.c_str(), Address))
+ std::vector<std::string> pieces;
+ SplitString(line, " ", pieces);
+
+ TMemCheck MemCheck;
+ u32 sAddress = 0;
+ u32 eAddress = 0;
+ bool doCommon = false;
+
+ if (
+ pieces.size() == 1
+ && AsciiToHex(pieces[0].c_str(), sAddress)
+ && pieces[0].size() == 8
+ )
+ {
+ // address range
+ MemCheck.StartAddress = sAddress;
+ MemCheck.EndAddress = sAddress;
+ doCommon = true;
+ }
+ else if(
+ pieces.size() == 2
+ && AsciiToHex(pieces[0].c_str(), sAddress) && AsciiToHex(pieces[1].c_str(), eAddress)
+ && pieces[0].size() == 8 && pieces[1].size() == 8
+ )
+ {
+ // address range
+ MemCheck.StartAddress = sAddress;
+ MemCheck.EndAddress = eAddress;
+ doCommon = true;
+ }
+
+ if(doCommon)
{
- // settting for the memory check
- TMemCheck MemCheck;
- MemCheck.StartAddress = Address;
- MemCheck.EndAddress = Address;
+ // settings for the memory check
MemCheck.OnRead = true;
MemCheck.OnWrite = true;
MemCheck.Log = true;
MemCheck.Break = false; // this is also what sets Active "on" in the breakpoint window
// so don't think it's off because we are only writing this to the log
- CBreakPoints::AddMemoryCheck(MemCheck);
+ CBreakPoints::AddMemoryCheck(MemCheck);
}
}
// update after we are done with the loop
|
