project64/Source/Project64/UserInterface/Debugger/debugger.h

131 lines
3.7 KiB
C
Raw Normal View History

2016-01-27 09:11:59 +00:00
#pragma once
2022-09-26 02:31:54 +00:00
#include "DebugMMU.h"
#include <Common/SyncEvent.h>
2022-09-26 02:31:54 +00:00
#include <Project64-core/Debugger.h>
#include <Project64-core/Settings/DebugSettings.h>
2016-01-27 09:11:59 +00:00
class CDumpMemory;
class CDebugMemoryView;
class CDebugMemorySearch;
class CDebugTlb;
2017-08-18 05:08:22 +00:00
class CDebugCommandsView;
class CDebugScripts;
class CDebugSymbols;
class CDebugDMALogView;
class CDebugCPULogView;
2017-08-18 05:08:22 +00:00
class CDebugStackView;
class CDebugStackTrace;
class CDebugExcBreakpoints;
2017-08-18 05:08:22 +00:00
class CCPULog;
2017-08-18 05:08:22 +00:00
class CDMALog;
2019-12-25 00:41:20 +00:00
class CSymbolTable;
2017-08-18 05:08:22 +00:00
class CBreakpoints;
class CScriptSystem;
2016-01-27 09:11:59 +00:00
class CDebuggerUI :
public CDebugger,
public CDebugSettings,
public CDebugMMU
2016-01-27 09:11:59 +00:00
{
public:
CDebuggerUI();
~CDebuggerUI();
2016-01-27 09:11:59 +00:00
public:
2017-09-13 10:36:03 +00:00
void Debug_Reset(void);
void OpenMemoryDump(void);
void OpenMemoryWindow(void);
2017-09-13 10:36:03 +00:00
void Debug_ShowMemoryLocation(uint32_t Address, bool VAddr);
void OpenMemorySearch(void);
void OpenTLBWindow(void);
2017-09-13 10:36:03 +00:00
void Debug_RefreshTLBWindow(void);
void OpenCommandWindow(void);
2017-09-13 10:36:03 +00:00
void Debug_ShowCommandsLocation(uint32_t address, bool top);
void OpenScriptsWindow(void);
2022-09-26 02:31:54 +00:00
void Debug_LogScriptsWindow(const char * text);
2017-09-13 10:36:03 +00:00
void Debug_ClearScriptsWindow(void);
void Debug_RefreshScriptsWindow(void);
void Debug_RefreshSymbolsWindow(void);
void OpenSymbolsWindow(void);
void OpenStackTraceWindow(void);
void OpenStackViewWindow(void);
2017-09-13 10:36:03 +00:00
void Debug_RefreshStackWindow(void);
void Debug_RefreshStackTraceWindow(void);
void OpenDMALogWindow(void);
2019-04-02 18:28:46 +00:00
void Debug_RefreshDMALogWindow(void);
void OpenCPULogWindow(void);
void Debug_RefreshCPULogWindow(void);
void OpenExcBreakpointsWindow(void);
2017-08-18 05:08:22 +00:00
void StartAutorunScripts();
bool ExecutionBP(uint32_t address);
2018-02-05 20:25:53 +00:00
bool ReadBP8(uint32_t address);
bool ReadBP16(uint32_t address);
bool ReadBP32(uint32_t address);
bool ReadBP64(uint32_t address);
bool WriteBP8(uint32_t address);
bool WriteBP16(uint32_t address);
bool WriteBP32(uint32_t address);
bool WriteBP64(uint32_t address);
void WaitForStep(void);
2022-09-26 02:31:54 +00:00
CBreakpoints * Breakpoints();
CDebugSymbols * Symbols();
CScriptSystem * ScriptSystem();
CDebugScripts * ScriptConsole();
CDMALog * DMALog();
CCPULog * CPULog();
CSymbolTable * SymbolTable();
SyncEvent & StepEvent();
2017-08-18 05:08:22 +00:00
2017-09-13 10:36:03 +00:00
static void GameReset(CDebuggerUI * _this);
2019-04-03 18:56:45 +00:00
static void GameCpuRunningChanged(CDebuggerUI * _this);
static void GameNameChanged(CDebuggerUI * _this);
static void GamePausedChanged(CDebuggerUI * _this);
2018-01-18 12:25:36 +00:00
static void SteppingOpsChanged(CDebuggerUI * _this);
static void WaitingForStepChanged(CDebuggerUI * _this);
2018-01-18 06:53:07 +00:00
protected:
void TLBChanged(void);
void CPUStepStarted(void);
void CPUStep(void);
void CPUStepEnded(void);
2018-01-18 06:53:07 +00:00
void FrameDrawn(void);
void PIFReadStarted(void);
void RSPReceivedTask(void);
void PIDMAReadStarted(void);
void PIDMAWriteStarted(void);
void EmulationStarted(void);
void EmulationStopped(void);
2018-01-18 06:53:07 +00:00
private:
2022-09-26 02:31:54 +00:00
CDebuggerUI(const CDebuggerUI &);
CDebuggerUI & operator=(const CDebuggerUI &);
2018-01-18 06:53:07 +00:00
2022-09-26 02:31:54 +00:00
CDumpMemory * m_MemoryDump;
CDebugMemoryView * m_MemoryView;
CDebugMemorySearch * m_MemorySearch;
CDebugTlb * m_DebugTLB;
CDebugCommandsView * m_CommandsView;
CDebugScripts * m_Scripts;
CDebugSymbols * m_Symbols;
CDebugDMALogView * m_DMALogView;
CDebugCPULogView * m_CPULogView;
CDebugStackTrace * m_StackTrace;
CDebugStackView * m_StackView;
CDebugExcBreakpoints * m_ExcBreakpoints;
2018-01-18 06:53:07 +00:00
2022-09-26 02:31:54 +00:00
CBreakpoints * m_Breakpoints;
CScriptSystem * m_ScriptSystem;
CSymbolTable * m_SymbolTable;
CDMALog * m_DMALog;
CCPULog * m_CPULog;
2018-01-18 06:53:07 +00:00
SyncEvent m_StepEvent;
void HandleCPUException(void);
void HandleCartToRamDMA(void);
2016-01-27 09:11:59 +00:00
};