DebugInterface: Watches methods added

Move Watches to Common
This commit is contained in:
Sepalani
2018-01-29 17:58:02 +01:00
parent 28138cfde9
commit 74d4a4478f
20 changed files with 436 additions and 166 deletions

View File

@ -38,13 +38,6 @@ struct TMemCheck
bool Action(DebugInterface* dbg_interface, u32 value, u32 addr, bool write, size_t size, u32 pc);
};
struct TWatch
{
std::string name;
u32 address = 0;
bool is_enabled = false;
};
// Code breakpoints.
class BreakPoints
{
@ -97,30 +90,3 @@ public:
private:
TMemChecks m_mem_checks;
};
class Watches
{
public:
using TWatches = std::vector<TWatch>;
using TWatchesStr = std::vector<std::string>;
const TWatches& GetWatches() const { return m_watches; }
TWatchesStr GetStrings() const;
void AddFromStrings(const TWatchesStr& watch_strings);
bool IsAddressWatch(u32 address) const;
// Add watch
void Add(u32 address);
void Add(const TWatch& watch);
void Update(int count, u32 address);
void UpdateName(int count, const std::string name);
// Remove watch
void Remove(u32 address);
void Clear();
private:
TWatches m_watches;
};