2013-10-12 04:02:21 -07:00
|
|
|
// Copyright (c) 2013- PPSSPP Project.
|
|
|
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, version 2.0 or later versions.
|
|
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
|
|
// Official git repository and contact information can be found at
|
|
|
|
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2024-12-10 15:50:48 +01:00
|
|
|
#include <string>
|
2013-10-12 04:02:21 -07:00
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
|
|
|
|
|
namespace GPUBreakpoints {
|
2022-02-07 23:54:18 -08:00
|
|
|
void Init(void (*hasBreakpoints)(bool flag));
|
2013-10-12 04:02:21 -07:00
|
|
|
|
2013-10-12 04:45:10 -07:00
|
|
|
bool IsBreakpoint(u32 pc, u32 op);
|
|
|
|
|
|
2013-10-12 04:02:21 -07:00
|
|
|
bool IsAddressBreakpoint(u32 addr, bool &temp);
|
|
|
|
|
bool IsAddressBreakpoint(u32 addr);
|
|
|
|
|
bool IsCmdBreakpoint(u8 cmd, bool &temp);
|
|
|
|
|
bool IsCmdBreakpoint(u8 cmd);
|
2013-10-12 04:16:35 -07:00
|
|
|
bool IsTextureBreakpoint(u32 addr, bool &temp);
|
|
|
|
|
bool IsTextureBreakpoint(u32 addr);
|
2016-05-21 17:55:45 -07:00
|
|
|
bool IsRenderTargetBreakpoint(u32 addr, bool &temp);
|
|
|
|
|
bool IsRenderTargetBreakpoint(u32 addr);
|
2013-10-12 04:16:35 -07:00
|
|
|
|
2013-10-12 04:02:21 -07:00
|
|
|
void AddAddressBreakpoint(u32 addr, bool temp = false);
|
|
|
|
|
void AddCmdBreakpoint(u8 cmd, bool temp = false);
|
2013-10-12 04:16:35 -07:00
|
|
|
void AddTextureBreakpoint(u32 addr, bool temp = false);
|
2013-10-12 09:06:48 -07:00
|
|
|
void AddTextureChangeTempBreakpoint();
|
2016-05-21 17:55:45 -07:00
|
|
|
void AddRenderTargetBreakpoint(u32 addr, bool temp = false);
|
2017-12-24 18:05:44 -08:00
|
|
|
// Quick way to trigger GE debugger statically.
|
|
|
|
|
void AddAnyTempBreakpoint();
|
2013-10-12 04:16:35 -07:00
|
|
|
|
2013-10-12 04:02:21 -07:00
|
|
|
void RemoveAddressBreakpoint(u32 addr);
|
|
|
|
|
void RemoveCmdBreakpoint(u8 cmd);
|
2013-10-12 04:16:35 -07:00
|
|
|
void RemoveTextureBreakpoint(u32 addr);
|
2013-10-12 09:06:48 -07:00
|
|
|
void RemoveTextureChangeTempBreakpoint();
|
2016-05-21 17:55:45 -07:00
|
|
|
void RemoveRenderTargetBreakpoint(u32 addr);
|
2013-10-12 09:06:48 -07:00
|
|
|
|
2022-09-05 13:13:09 -07:00
|
|
|
bool SetAddressBreakpointCond(u32 addr, const std::string &expression, std::string *error);
|
|
|
|
|
bool GetAddressBreakpointCond(u32 addr, std::string *expression);
|
2022-09-05 16:46:16 -07:00
|
|
|
bool SetCmdBreakpointCond(u8 cmd, const std::string &expression, std::string *error);
|
|
|
|
|
bool GetCmdBreakpointCond(u8 cmd, std::string *expression);
|
2022-09-05 13:13:09 -07:00
|
|
|
|
2013-10-12 09:06:48 -07:00
|
|
|
void UpdateLastTexture(u32 addr);
|
2013-10-12 04:16:35 -07:00
|
|
|
|
2013-10-12 04:02:21 -07:00
|
|
|
void ClearAllBreakpoints();
|
|
|
|
|
void ClearTempBreakpoints();
|
|
|
|
|
|
2016-05-21 18:30:06 -07:00
|
|
|
bool IsOpBreakpoint(u32 op, bool &temp);
|
2013-10-12 04:02:21 -07:00
|
|
|
|
2016-05-21 18:30:06 -07:00
|
|
|
bool IsOpBreakpoint(u32 op);
|
2013-10-12 04:02:21 -07:00
|
|
|
};
|