/
githubmirror
/
x64dbg
Обзор
Документация
Войти
/
githubmirror
/
x64dbg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
development
src/dbg/_scriptapi_debug.cpp
78 строк
2 KB
Duncan Ogilvie
Fix warnings on latest MSVC
03 окт 2024, 13:06
03 окт 2024, 13:06
6050850
Код
Авторство
О чём код?
#include "_scriptapi_debug.h" SCRIPT_EXPORT void Script::Debug::Wait() { _plugin_waituntilpaused(); } SCRIPT_EXPORT void Script::Debug::Run() { if(DbgCmdExecDirect("run")) Wait(); } SCRIPT_EXPORT void Script::Debug::Pause() { if(DbgCmdExecDirect("pause")) Wait(); } SCRIPT_EXPORT void Script::Debug::Stop() { if(DbgCmdExecDirect("StopDebug")) Wait(); } SCRIPT_EXPORT void Script::Debug::StepIn() { if(DbgCmdExecDirect("StepInto")) Wait(); } SCRIPT_EXPORT void Script::Debug::StepOver() { if(DbgCmdExecDirect("StepOver")) Wait(); } SCRIPT_EXPORT void Script::Debug::StepOut() { if(DbgCmdExecDirect("StepOut")) Wait(); } SCRIPT_EXPORT bool Script::Debug::SetBreakpoint(duint address) { char command[128] = ""; sprintf_s(command, "bp %p", (void*)address); return DbgCmdExecDirect(command); } SCRIPT_EXPORT bool Script::Debug::DeleteBreakpoint(duint address) { char command[128] = ""; sprintf_s(command, "bc %p", (void*)address); return DbgCmdExecDirect(command); } SCRIPT_EXPORT bool Script::Debug::DisableBreakpoint(duint address) { char command[128] = ""; sprintf_s(command, "bd %p", (void*)address); return DbgCmdExecDirect(command); } SCRIPT_EXPORT bool Script::Debug::SetHardwareBreakpoint(duint address, HardwareType type) { char command[128] = ""; const char* types[] = { "rw", "w", "x" }; sprintf_s(command, "bphws %p, %s", (void*)address, types[type]); return DbgCmdExecDirect(command); } SCRIPT_EXPORT bool Script::Debug::DeleteHardwareBreakpoint(duint address) { char command[128] = ""; sprintf_s(command, "bphwc %p", (void*)address); return DbgCmdExecDirect(command); }