mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
DebugInterface: Watches methods added
Move Watches to Common
This commit is contained in:
@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user