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