2016-01-27 09:11:59 +00:00
|
|
|
#pragma once
|
2022-09-26 02:31:54 +00:00
|
|
|
#include "DebugMMU.h"
|
2018-01-16 21:26:54 +00:00
|
|
|
#include <Common/SyncEvent.h>
|
2022-09-26 02:31:54 +00:00
|
|
|
#include <Project64-core/Debugger.h>
|
2018-01-15 21:14:15 +00:00
|
|
|
#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;
|
2019-01-14 09:18:43 +00:00
|
|
|
class CDebugCPULogView;
|
2017-08-18 05:08:22 +00:00
|
|
|
class CDebugStackView;
|
|
|
|
class CDebugStackTrace;
|
2019-01-17 09:34:24 +00:00
|
|
|
class CDebugExcBreakpoints;
|
2017-08-18 05:08:22 +00:00
|
|
|
|
2019-01-14 09:18:43 +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 :
|
2018-01-15 21:14:15 +00:00
|
|
|
public CDebugger,
|
2019-11-30 17:48:46 +00:00
|
|
|
public CDebugSettings,
|
|
|
|
public CDebugMMU
|
2016-01-27 09:11:59 +00:00
|
|
|
{
|
2018-01-10 07:05:57 +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);
|
2018-01-10 07:05:57 +00:00
|
|
|
void OpenMemoryDump(void);
|
|
|
|
void OpenMemoryWindow(void);
|
2017-09-13 10:36:03 +00:00
|
|
|
void Debug_ShowMemoryLocation(uint32_t Address, bool VAddr);
|
2018-01-10 07:05:57 +00:00
|
|
|
void OpenMemorySearch(void);
|
|
|
|
void OpenTLBWindow(void);
|
2017-09-13 10:36:03 +00:00
|
|
|
void Debug_RefreshTLBWindow(void);
|
2018-01-10 07:05:57 +00:00
|
|
|
void OpenCommandWindow(void);
|
2017-09-13 10:36:03 +00:00
|
|
|
void Debug_ShowCommandsLocation(uint32_t address, bool top);
|
2018-01-10 07:05:57 +00:00
|
|
|
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);
|
2018-01-10 07:05:57 +00:00
|
|
|
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);
|
2018-01-10 07:05:57 +00:00
|
|
|
void OpenDMALogWindow(void);
|
2019-04-02 18:28:46 +00:00
|
|
|
void Debug_RefreshDMALogWindow(void);
|
2019-01-14 09:18:43 +00:00
|
|
|
void OpenCPULogWindow(void);
|
|
|
|
void Debug_RefreshCPULogWindow(void);
|
2019-01-17 09:34:24 +00:00
|
|
|
void OpenExcBreakpointsWindow(void);
|
2017-08-18 05:08:22 +00:00
|
|
|
|
2021-09-03 05:11:04 +00:00
|
|
|
void StartAutorunScripts();
|
|
|
|
|
2018-01-16 21:26:54 +00:00
|
|
|
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);
|
2018-02-01 17:28:08 +00:00
|
|
|
bool WriteBP8(uint32_t address);
|
|
|
|
bool WriteBP16(uint32_t address);
|
|
|
|
bool WriteBP32(uint32_t address);
|
|
|
|
bool WriteBP64(uint32_t address);
|
2018-01-16 21:26:54 +00:00
|
|
|
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);
|
2021-09-03 05:11:04 +00:00
|
|
|
static void GamePausedChanged(CDebuggerUI * _this);
|
2018-01-18 12:25:36 +00:00
|
|
|
static void SteppingOpsChanged(CDebuggerUI * _this);
|
2021-09-03 05:11:04 +00:00
|
|
|
static void WaitingForStepChanged(CDebuggerUI * _this);
|
2018-01-18 06:53:07 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void TLBChanged(void);
|
|
|
|
void CPUStepStarted(void);
|
|
|
|
void CPUStep(void);
|
2019-01-17 09:34:24 +00:00
|
|
|
void CPUStepEnded(void);
|
2018-01-18 06:53:07 +00:00
|
|
|
void FrameDrawn(void);
|
2021-09-03 05:11:04 +00:00
|
|
|
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;
|
2019-01-17 09:34:24 +00:00
|
|
|
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;
|
|
|
|
|
2019-01-14 09:18:43 +00:00
|
|
|
void HandleCPUException(void);
|
|
|
|
void HandleCartToRamDMA(void);
|
2016-01-27 09:11:59 +00:00
|
|
|
};
|