break_points.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 <vector>
  6. #include <string>
  7. #include "common/common_types.h"
  8. class DebugInterface;
  9. struct TBreakPoint
  10. {
  11. u32 iAddress;
  12. bool bOn;
  13. bool bTemporary;
  14. };
  15. // Code breakpoints.
  16. class BreakPoints
  17. {
  18. public:
  19. typedef std::vector<TBreakPoint> TBreakPoints;
  20. typedef std::vector<std::string> TBreakPointsStr;
  21. const TBreakPoints& GetBreakPoints() { return m_BreakPoints; }
  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. };