break_points.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Copyright 2013 Dolphin Emulator Project / 2014 Citra Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <string>
  6. #include <vector>
  7. #include "common/common_types.h"
  8. class DebugInterface;
  9. struct TBreakPoint {
  10. u32 iAddress;
  11. bool bOn;
  12. bool bTemporary;
  13. };
  14. // Code breakpoints.
  15. class BreakPoints {
  16. public:
  17. typedef std::vector<TBreakPoint> TBreakPoints;
  18. typedef std::vector<std::string> TBreakPointsStr;
  19. const TBreakPoints& GetBreakPoints() {
  20. return m_BreakPoints;
  21. }
  22. TBreakPointsStr GetStrings() const;
  23. void AddFromStrings(const TBreakPointsStr& bps);
  24. // is address breakpoint
  25. bool IsAddressBreakPoint(u32 iAddress) const;
  26. bool IsTempBreakPoint(u32 iAddress) const;
  27. // Add BreakPoint
  28. void Add(u32 em_address, bool temp = false);
  29. void Add(const TBreakPoint& bp);
  30. // Remove Breakpoint
  31. void Remove(u32 iAddress);
  32. void Clear();
  33. void DeleteByAddress(u32 Address);
  34. private:
  35. TBreakPoints m_BreakPoints;
  36. u32 m_iBreakOnCount;
  37. };