2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00
yuzu/src/common/break_points.h

50 lines
1.1 KiB
C
Raw Normal View History

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