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

112 lines
3.6 KiB
C
Raw Normal View History

2016-01-27 09:11:59 +00:00
/****************************************************************************
* *
* Project64 - A Nintendo 64 emulator. *
* http://www.pj64-emu.com/ *
* Copyright (C) 2012 Project64. All rights reserved. *
* *
* License: *
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
* *
****************************************************************************/
#pragma once
#include <Project64-core/Debugger.h>
#include <Common/SyncEvent.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 CDebugStackView;
class CDebugStackTrace;
class CDMALog;
class CBreakpoints;
class CScriptSystem;
2016-01-27 09:11:59 +00:00
class CDebuggerUI :
public CDebugger,
public CDebugSettings
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);
2017-09-13 10:36:03 +00:00
void Debug_LogScriptsWindow(const char* text);
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);
2017-08-18 05:08:22 +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);
bool WriteBP8(uint32_t address);
bool WriteBP16(uint32_t address);
bool WriteBP32(uint32_t address);
bool WriteBP64(uint32_t address);
void WaitForStep(void);
2017-09-13 10:36:03 +00:00
CBreakpoints* Breakpoints();
CDebugSymbols* Symbols();
CScriptSystem* ScriptSystem();
CDebugScripts* ScriptConsole();
CDMALog* DMALog();
2017-08-18 05:08:22 +00:00
2017-09-13 10:36:03 +00:00
static void GameReset(CDebuggerUI * _this);
2018-01-18 12:25:36 +00:00
static void SteppingOpsChanged(CDebuggerUI * _this);
2018-01-18 06:53:07 +00:00
bool DebugLW_PAddr(uint32_t vaddr, uint32_t& value);
bool DebugLW_VAddr(uint32_t vaddr, uint32_t& value);
2018-01-18 06:53:07 +00:00
protected:
void TLBChanged(void);
void CPUStepStarted(void);
void CPUStep(void);
void FrameDrawn(void);
private:
CDebuggerUI(const CDebuggerUI&); // Disable copy constructor
CDebuggerUI& operator=(const CDebuggerUI&); // Disable assignment
CDumpMemory * m_MemoryDump;
CDebugMemoryView * m_MemoryView;
CDebugMemorySearch * m_MemorySearch;
CDebugTlb * m_DebugTLB;
CDebugCommandsView * m_CommandsView;
CDebugScripts * m_Scripts;
CDebugSymbols * m_Symbols;
CDebugDMALogView * m_DMALogView;
CDebugStackTrace * m_StackTrace;
CDebugStackView * m_StackView;
CBreakpoints * m_Breakpoints;
CScriptSystem * m_ScriptSystem;
CDMALog * m_DMALog;
SyncEvent m_StepEvent;
2016-01-27 09:11:59 +00:00
};