2014-12-17 05:38:14 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project / 2014 Citra Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
2013-09-05 01:17:46 +01:00
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2014-08-17 18:45:50 +01:00
|
|
|
#pragma once
|
2013-09-05 01:17:46 +01:00
|
|
|
|
|
|
|
#include <string>
|
2016-09-18 01:38:01 +01:00
|
|
|
#include <vector>
|
2015-05-06 08:06:12 +01:00
|
|
|
#include "common/common_types.h"
|
2013-09-05 01:17:46 +01:00
|
|
|
|
|
|
|
class DebugInterface;
|
|
|
|
|
2016-09-18 01:38:01 +01:00
|
|
|
struct TBreakPoint {
|
|
|
|
u32 iAddress;
|
2014-08-12 11:44:12 +01:00
|
|
|
bool bOn;
|
|
|
|
bool bTemporary;
|
2013-09-05 01:17:46 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
// Code breakpoints.
|
2016-09-18 01:38:01 +01:00
|
|
|
class BreakPoints {
|
2013-09-05 01:17:46 +01:00
|
|
|
public:
|
2014-04-01 23:20:08 +01:00
|
|
|
typedef std::vector<TBreakPoint> TBreakPoints;
|
|
|
|
typedef std::vector<std::string> TBreakPointsStr;
|
2013-09-05 01:17:46 +01:00
|
|
|
|
2016-09-18 01:38:01 +01:00
|
|
|
const TBreakPoints& GetBreakPoints() {
|
|
|
|
return m_BreakPoints;
|
|
|
|
}
|
2013-09-05 01:17:46 +01:00
|
|
|
|
2014-04-01 23:20:08 +01:00
|
|
|
TBreakPointsStr GetStrings() const;
|
|
|
|
void AddFromStrings(const TBreakPointsStr& bps);
|
2013-09-05 01:17:46 +01:00
|
|
|
|
2014-04-01 23:20:08 +01:00
|
|
|
// is address breakpoint
|
2015-03-30 20:37:34 +01:00
|
|
|
bool IsAddressBreakPoint(u32 iAddress) const;
|
|
|
|
bool IsTempBreakPoint(u32 iAddress) const;
|
2013-09-05 01:17:46 +01:00
|
|
|
|
2014-04-01 23:20:08 +01:00
|
|
|
// Add BreakPoint
|
2016-09-18 01:38:01 +01:00
|
|
|
void Add(u32 em_address, bool temp = false);
|
2014-04-01 23:20:08 +01:00
|
|
|
void Add(const TBreakPoint& bp);
|
2013-09-05 01:17:46 +01:00
|
|
|
|
2014-04-01 23:20:08 +01:00
|
|
|
// Remove Breakpoint
|
2014-08-12 11:44:12 +01:00
|
|
|
void Remove(u32 iAddress);
|
2014-04-01 23:20:08 +01:00
|
|
|
void Clear();
|
2013-09-05 01:17:46 +01:00
|
|
|
|
2014-08-12 11:44:12 +01:00
|
|
|
void DeleteByAddress(u32 Address);
|
2013-09-05 01:17:46 +01:00
|
|
|
|
|
|
|
private:
|
2014-04-01 23:20:08 +01:00
|
|
|
TBreakPoints m_BreakPoints;
|
2016-09-18 01:38:01 +01:00
|
|
|
u32 m_iBreakOnCount;
|
2013-09-05 01:17:46 +01:00
|
|
|
};
|