mirror of
https://github.com/libretro/Mesen.git
synced 2025-01-23 09:34:45 +00:00
48409ae82b
-Several other fixes (bugfixes, refactoring, etc.) -Added a few more features to debugger
41 lines
1.3 KiB
C++
41 lines
1.3 KiB
C++
#include "stdafx.h"
|
|
#include "../Core/Console.h"
|
|
#include "../Core/Debugger.h"
|
|
|
|
static shared_ptr<Debugger> _debugger = nullptr;
|
|
|
|
extern "C"
|
|
{
|
|
//Debugger wrapper
|
|
DllExport void __stdcall DebugInitialize()
|
|
{
|
|
_debugger = Console::GetInstance()->GetDebugger();
|
|
}
|
|
|
|
DllExport void __stdcall DebugRelease()
|
|
{
|
|
if(_debugger != nullptr) {
|
|
_debugger->Run();
|
|
_debugger.reset();
|
|
}
|
|
}
|
|
|
|
DllExport void __stdcall DebugGetState(DebugState *state) { _debugger->GetState(state); }
|
|
|
|
DllExport void DebugSetBreakpoints()
|
|
{
|
|
|
|
}
|
|
|
|
DllExport void __stdcall DebugRun() { _debugger->Run(); }
|
|
DllExport void __stdcall DebugStep(uint32_t count) { _debugger->Step(count); }
|
|
DllExport void __stdcall DebugStepCycles(uint32_t count) { _debugger->StepCycles(count); }
|
|
DllExport void __stdcall DebugStepOver() { _debugger->StepOver(); }
|
|
DllExport void __stdcall DebugStepOut() { _debugger->StepOut(); }
|
|
DllExport int __stdcall DebugIsCodeChanged() { return _debugger->IsCodeChanged(); }
|
|
DllExport const char* __stdcall DebugGetCode() { return _debugger->GetCode()->c_str(); }
|
|
|
|
DllExport uint8_t __stdcall DebugGetMemoryValue(uint32_t addr) { return _debugger->GetMemoryValue(addr); }
|
|
DllExport uint32_t __stdcall DebugGetRelativeAddress(uint32_t addr) { return _debugger->GetRelativeAddress(addr); }
|
|
};
|