From df37649b9f8499ec732b7511e7fed2b075ef7781 Mon Sep 17 00:00:00 2001 From: skidau Date: Sat, 18 Oct 2014 11:02:26 +1100 Subject: Changed the step over routine to a single stepping version that steps until a blr is encountered. Cleared out all temporary breakpoints on each step to prevent phantom breakpoints from stopping the debugger. --- Source/Core/Common/BreakPoints.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Source/Core/Common/BreakPoints.cpp') diff --git a/Source/Core/Common/BreakPoints.cpp b/Source/Core/Common/BreakPoints.cpp index db0cedf0bb..6014eae776 100644 --- a/Source/Core/Common/BreakPoints.cpp +++ b/Source/Core/Common/BreakPoints.cpp @@ -113,6 +113,19 @@ void BreakPoints::Clear() m_BreakPoints.clear(); } +void BreakPoints::ClearAllTemporary() +{ + for (const TBreakPoint& bp : m_BreakPoints) + { + if (bp.bTemporary) + { + if (jit) + jit->GetBlockCache()->InvalidateICache(bp.iAddress, 4, true); + Remove(bp.iAddress); + } + } +} + MemChecks::TMemChecksStr MemChecks::GetStrings() const { TMemChecksStr mcs; -- cgit v1.2.3 From 613cae613a8c2ac34dd823f875ac4a6a0059db38 Mon Sep 17 00:00:00 2001 From: skidau Date: Sun, 19 Oct 2014 21:45:40 +1100 Subject: Added a RAM Watch window to the debugger Conflicts: Source/Core/Core/HW/Memmap.cpp Source/Core/Core/HW/Memmap.h Source/Core/DolphinWX/Debugger/CodeWindow.h --- Source/Core/Common/BreakPoints.cpp | 83 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) (limited to 'Source/Core/Common/BreakPoints.cpp') diff --git a/Source/Core/Common/BreakPoints.cpp b/Source/Core/Common/BreakPoints.cpp index 6014eae776..50b4d56be5 100644 --- a/Source/Core/Common/BreakPoints.cpp +++ b/Source/Core/Common/BreakPoints.cpp @@ -217,3 +217,86 @@ void TMemCheck::Action(DebugInterface *debug_interface, u32 iValue, u32 addr, bo debug_interface->BreakNow(); } } + + +bool Watches::IsAddressWatch(u32 _iAddress) +{ + for (const TWatch& bp : m_Watches) + if (bp.iAddress == _iAddress) + return true; + + return false; +} + +Watches::TWatchesStr Watches::GetStrings() const +{ + TWatchesStr bps; + for (const TWatch& bp : m_Watches) + { + std::stringstream ss; + ss << std::hex << bp.iAddress << " " << (bp.bOn ? "n" : ""); + bps.push_back(ss.str()); + } + + return bps; +} + +void Watches::AddFromStrings(const TWatchesStr& bpstrs) +{ + for (const std::string& bpstr : bpstrs) + { + TWatch bp; + std::stringstream ss; + ss << std::hex << bpstr; + ss >> bp.iAddress; + bp.bOn = bpstr.find("n") != bpstr.npos; + Add(bp); + } +} + +void Watches::Add(const TWatch& bp) +{ + if (!IsAddressWatch(bp.iAddress)) + { + m_Watches.push_back(bp); + } +} + +void Watches::Add(u32 em_address) +{ + if (!IsAddressWatch(em_address)) // only add new addresses + { + TWatch pt; // breakpoint settings + pt.bOn = true; + pt.iAddress = em_address; + + m_Watches.push_back(pt); + } +} + +void Watches::Update(int count, u32 em_address) +{ + m_Watches.at(count).iAddress = em_address; +} + +void Watches::UpdateName(int count, std::string name) +{ + m_Watches.at(count).name = name; +} + +void Watches::Remove(u32 em_address) +{ + for (auto i = m_Watches.begin(); i != m_Watches.end(); ++i) + { + if (i->iAddress == em_address) + { + m_Watches.erase(i); + return; + } + } +} + +void Watches::Clear() +{ + m_Watches.clear(); +} -- cgit v1.2.3 From b34e220086a79a0e6f1824d2f7c94894a90d2998 Mon Sep 17 00:00:00 2001 From: skidau Date: Fri, 24 Oct 2014 17:16:54 +1100 Subject: Added a "Delete watch" context menu to the Watch window. Added a "View memory" command to the context menu. --- Source/Core/Common/BreakPoints.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/Common/BreakPoints.cpp') diff --git a/Source/Core/Common/BreakPoints.cpp b/Source/Core/Common/BreakPoints.cpp index 50b4d56be5..8ef93758ab 100644 --- a/Source/Core/Common/BreakPoints.cpp +++ b/Source/Core/Common/BreakPoints.cpp @@ -219,7 +219,7 @@ void TMemCheck::Action(DebugInterface *debug_interface, u32 iValue, u32 addr, bo } -bool Watches::IsAddressWatch(u32 _iAddress) +const bool Watches::IsAddressWatch(u32 _iAddress) { for (const TWatch& bp : m_Watches) if (bp.iAddress == _iAddress) -- cgit v1.2.3 From b73130af77e4a978e7837a0e40431af768d2f34c Mon Sep 17 00:00:00 2001 From: skidau Date: Fri, 24 Oct 2014 22:24:17 +1100 Subject: Added Load/Save function for the Watch window. Made the floating windows toolbars dockable. Scaled down the breakpoint toolbar icons to 16x16. --- Source/Core/Common/BreakPoints.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/Common/BreakPoints.cpp') diff --git a/Source/Core/Common/BreakPoints.cpp b/Source/Core/Common/BreakPoints.cpp index 8ef93758ab..e0498e34d0 100644 --- a/Source/Core/Common/BreakPoints.cpp +++ b/Source/Core/Common/BreakPoints.cpp @@ -234,7 +234,7 @@ Watches::TWatchesStr Watches::GetStrings() const for (const TWatch& bp : m_Watches) { std::stringstream ss; - ss << std::hex << bp.iAddress << " " << (bp.bOn ? "n" : ""); + ss << std::hex << bp.iAddress << " " << bp.name; bps.push_back(ss.str()); } @@ -249,7 +249,7 @@ void Watches::AddFromStrings(const TWatchesStr& bpstrs) std::stringstream ss; ss << std::hex << bpstr; ss >> bp.iAddress; - bp.bOn = bpstr.find("n") != bpstr.npos; + ss >> bp.name; Add(bp); } } -- cgit v1.2.3 From 73dca1ca33c4699ac6a3f38e9bfb824983af56cb Mon Sep 17 00:00:00 2001 From: skidau Date: Sun, 26 Oct 2014 16:14:17 +1100 Subject: Added a new option to add memchecks from the Watch window. Fixed watch labels from being truncated at the first whitespace. --- Source/Core/Common/BreakPoints.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Source/Core/Common/BreakPoints.cpp') diff --git a/Source/Core/Common/BreakPoints.cpp b/Source/Core/Common/BreakPoints.cpp index e0498e34d0..ece8add228 100644 --- a/Source/Core/Common/BreakPoints.cpp +++ b/Source/Core/Common/BreakPoints.cpp @@ -249,7 +249,8 @@ void Watches::AddFromStrings(const TWatchesStr& bpstrs) std::stringstream ss; ss << std::hex << bpstr; ss >> bp.iAddress; - ss >> bp.name; + ss >> std::ws; + getline(ss, bp.name); Add(bp); } } -- cgit v1.2.3 From 4570dd7eeb9033c0e349d3a9f0126f24010b0699 Mon Sep 17 00:00:00 2001 From: skidau Date: Sun, 26 Oct 2014 23:23:45 +1100 Subject: Fixed a crash that would occur if a new watch were added by entering a watch name. Code style updates. --- Source/Core/Common/BreakPoints.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/Common/BreakPoints.cpp') diff --git a/Source/Core/Common/BreakPoints.cpp b/Source/Core/Common/BreakPoints.cpp index ece8add228..8772a2287f 100644 --- a/Source/Core/Common/BreakPoints.cpp +++ b/Source/Core/Common/BreakPoints.cpp @@ -280,7 +280,7 @@ void Watches::Update(int count, u32 em_address) m_Watches.at(count).iAddress = em_address; } -void Watches::UpdateName(int count, std::string name) +void Watches::UpdateName(int count, const std::string name) { m_Watches.at(count).name = name; } -- cgit v1.2.3