CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/master/GPU/Debugger/Breakpoints.h
Views: 1401
// Copyright (c) 2013- PPSSPP Project.12// This program is free software: you can redistribute it and/or modify3// it under the terms of the GNU General Public License as published by4// the Free Software Foundation, version 2.0 or later versions.56// This program is distributed in the hope that it will be useful,7// but WITHOUT ANY WARRANTY; without even the implied warranty of8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9// GNU General Public License 2.0 for more details.1011// A copy of the GPL 2.0 should have been included with the program.12// If not, see http://www.gnu.org/licenses/1314// Official git repository and contact information can be found at15// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.1617#pragma once1819#include "Common/CommonTypes.h"2021namespace GPUBreakpoints {22void Init(void (*hasBreakpoints)(bool flag));2324bool IsBreakpoint(u32 pc, u32 op);2526bool IsAddressBreakpoint(u32 addr, bool &temp);27bool IsAddressBreakpoint(u32 addr);28bool IsCmdBreakpoint(u8 cmd, bool &temp);29bool IsCmdBreakpoint(u8 cmd);30bool IsTextureBreakpoint(u32 addr, bool &temp);31bool IsTextureBreakpoint(u32 addr);32bool IsRenderTargetBreakpoint(u32 addr, bool &temp);33bool IsRenderTargetBreakpoint(u32 addr);3435void AddAddressBreakpoint(u32 addr, bool temp = false);36void AddCmdBreakpoint(u8 cmd, bool temp = false);37void AddTextureBreakpoint(u32 addr, bool temp = false);38void AddTextureChangeTempBreakpoint();39void AddRenderTargetBreakpoint(u32 addr, bool temp = false);40// Quick way to trigger GE debugger statically.41void AddAnyTempBreakpoint();4243void RemoveAddressBreakpoint(u32 addr);44void RemoveCmdBreakpoint(u8 cmd);45void RemoveTextureBreakpoint(u32 addr);46void RemoveTextureChangeTempBreakpoint();47void RemoveRenderTargetBreakpoint(u32 addr);4849bool SetAddressBreakpointCond(u32 addr, const std::string &expression, std::string *error);50bool GetAddressBreakpointCond(u32 addr, std::string *expression);51bool SetCmdBreakpointCond(u8 cmd, const std::string &expression, std::string *error);52bool GetCmdBreakpointCond(u8 cmd, std::string *expression);5354void UpdateLastTexture(u32 addr);5556void ClearAllBreakpoints();57void ClearTempBreakpoints();5859bool IsOpBreakpoint(u32 op, bool &temp);6061bool IsOpBreakpoint(u32 op);62};636465