mirror of https://github.com/x64dbg/GleeBug
documentation
This commit is contained in:
parent
5733c67818
commit
6197f91790
|
|
@ -52,15 +52,60 @@ namespace GleeBug
|
||||||
const ProcessInfo & GetMainProcess();
|
const ProcessInfo & GetMainProcess();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void cbCreateProcessEvent(CREATE_PROCESS_DEBUG_INFO* createProcess) {};
|
/**
|
||||||
virtual void cbExitProcessEvent(EXIT_PROCESS_DEBUG_INFO* exitProcess) {};
|
\brief Process creation debug event callback. Provide an implementation to use this callback.
|
||||||
virtual void cbCreateThreadEvent(CREATE_THREAD_DEBUG_INFO* createThread) {};
|
\param createProcess Information about the process created.
|
||||||
virtual void cbExitThreadEvent(EXIT_THREAD_DEBUG_INFO* exitThread) {};
|
*/
|
||||||
virtual void cbLoadDllEvent(LOAD_DLL_DEBUG_INFO* loadDll) {};
|
virtual void cbCreateProcessEvent(const CREATE_PROCESS_DEBUG_INFO* createProcess) {};
|
||||||
virtual void cbUnloadDllEvent(UNLOAD_DLL_DEBUG_INFO* unloadDll) {};
|
|
||||||
virtual void cbExceptionEvent(EXCEPTION_DEBUG_INFO* exceptionInfo) {};
|
/**
|
||||||
virtual void cbDebugStringEvent(OUTPUT_DEBUG_STRING_INFO* debugString) {};
|
\brief Process termination debug event callback. Provide an implementation to use this callback.
|
||||||
virtual void cbRipEvent(RIP_INFO* rip) {};
|
\param exitProcess Information about the process terminated.
|
||||||
|
*/
|
||||||
|
virtual void cbExitProcessEvent(const EXIT_PROCESS_DEBUG_INFO* exitProcess) {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Thread creation debug event callback. Provide an implementation to use this callback.
|
||||||
|
\param createThread Information about the thread created.
|
||||||
|
*/
|
||||||
|
virtual void cbCreateThreadEvent(const CREATE_THREAD_DEBUG_INFO* createThread) {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Thread termination debug event callback. Provide an implementation to use this callback.
|
||||||
|
\param exitThread Information about the thread terminated.
|
||||||
|
*/
|
||||||
|
virtual void cbExitThreadEvent(const EXIT_THREAD_DEBUG_INFO* exitThread) {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief DLL load debug event callback. Provide an implementation to use this callback.
|
||||||
|
\param loadDll Information about the DLL loaded.
|
||||||
|
*/
|
||||||
|
virtual void cbLoadDllEvent(const LOAD_DLL_DEBUG_INFO* loadDll) {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief DLL unload debug event callback. Provide an implementation to use this callback.
|
||||||
|
\param unloadDll Information about the DLL unloaded.
|
||||||
|
*/
|
||||||
|
virtual void cbUnloadDllEvent(const UNLOAD_DLL_DEBUG_INFO* unloadDll) {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Exception debug event callback. Provide an implementation to use this callback.
|
||||||
|
\param exceptionInfo Information about the exception.
|
||||||
|
*/
|
||||||
|
virtual void cbExceptionEvent(const EXCEPTION_DEBUG_INFO* exceptionInfo) {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Debug string debug event callback. Provide an implementation to use this callback.
|
||||||
|
\param debugString Information about the debug string.
|
||||||
|
*/
|
||||||
|
virtual void cbDebugStringEvent(const OUTPUT_DEBUG_STRING_INFO* debugString) {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief RIP debug event callback. Provide an implementation to use this callback.
|
||||||
|
\param rip Information about the RIP event.
|
||||||
|
*/
|
||||||
|
virtual void cbRipEvent(const RIP_INFO* rip) {};
|
||||||
|
|
||||||
|
|
||||||
virtual void createProcessEvent(CREATE_PROCESS_DEBUG_INFO* createProcess);
|
virtual void createProcessEvent(CREATE_PROCESS_DEBUG_INFO* createProcess);
|
||||||
virtual void exitProcessEvent(EXIT_PROCESS_DEBUG_INFO* exitProcess);
|
virtual void exitProcessEvent(EXIT_PROCESS_DEBUG_INFO* exitProcess);
|
||||||
|
|
|
||||||
|
|
@ -6,47 +6,47 @@
|
||||||
class MyDebugger : public GleeBug::Debugger
|
class MyDebugger : public GleeBug::Debugger
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
virtual void cbCreateProcessEvent(CREATE_PROCESS_DEBUG_INFO* createProcess)
|
virtual void cbCreateProcessEvent(const CREATE_PROCESS_DEBUG_INFO* createProcess)
|
||||||
{
|
{
|
||||||
printf("Process %d created with entry 0x%p\n", _debugEvent.dwProcessId, createProcess->lpStartAddress);
|
printf("Process %d created with entry 0x%p\n", _debugEvent.dwProcessId, createProcess->lpStartAddress);
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual void cbExitProcessEvent(EXIT_PROCESS_DEBUG_INFO* exitProcess)
|
virtual void cbExitProcessEvent(const EXIT_PROCESS_DEBUG_INFO* exitProcess)
|
||||||
{
|
{
|
||||||
printf("Process %d terminated with exit code 0x%08X\n", _debugEvent.dwProcessId, exitProcess->dwExitCode);
|
printf("Process %d terminated with exit code 0x%08X\n", _debugEvent.dwProcessId, exitProcess->dwExitCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void cbCreateThreadEvent(CREATE_THREAD_DEBUG_INFO* createThread)
|
virtual void cbCreateThreadEvent(const CREATE_THREAD_DEBUG_INFO* createThread)
|
||||||
{
|
{
|
||||||
printf("Thread %d created with entry 0x%p\n", _debugEvent.dwThreadId, createThread->lpStartAddress);
|
printf("Thread %d created with entry 0x%p\n", _debugEvent.dwThreadId, createThread->lpStartAddress);
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual void cbExitThreadEvent(EXIT_THREAD_DEBUG_INFO* exitThread)
|
virtual void cbExitThreadEvent(const EXIT_THREAD_DEBUG_INFO* exitThread)
|
||||||
{
|
{
|
||||||
printf("Thread %d terminated with exit code 0x%08X\n", _debugEvent.dwThreadId, exitThread->dwExitCode);
|
printf("Thread %d terminated with exit code 0x%08X\n", _debugEvent.dwThreadId, exitThread->dwExitCode);
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual void cbLoadDllEvent(LOAD_DLL_DEBUG_INFO* loadDll)
|
virtual void cbLoadDllEvent(const LOAD_DLL_DEBUG_INFO* loadDll)
|
||||||
{
|
{
|
||||||
printf("DLL loaded at 0x%p\n", loadDll->lpBaseOfDll);
|
printf("DLL loaded at 0x%p\n", loadDll->lpBaseOfDll);
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual void cbUnloadDllEvent(UNLOAD_DLL_DEBUG_INFO* unloadDll)
|
virtual void cbUnloadDllEvent(const UNLOAD_DLL_DEBUG_INFO* unloadDll)
|
||||||
{
|
{
|
||||||
printf("DLL 0x%p unloaded\n", unloadDll->lpBaseOfDll);
|
printf("DLL 0x%p unloaded\n", unloadDll->lpBaseOfDll);
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual void cbExceptionEvent(EXCEPTION_DEBUG_INFO* exceptionInfo)
|
virtual void cbExceptionEvent(const EXCEPTION_DEBUG_INFO* exceptionInfo)
|
||||||
{
|
{
|
||||||
printf("Exception with code 0x%08X\n", exceptionInfo->ExceptionRecord);
|
printf("Exception with code 0x%08X\n", exceptionInfo->ExceptionRecord);
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual void cbDebugStringEvent(OUTPUT_DEBUG_STRING_INFO* debugString)
|
virtual void cbDebugStringEvent(const OUTPUT_DEBUG_STRING_INFO* debugString)
|
||||||
{
|
{
|
||||||
printf("Debug string at 0x%p with length %d\n", debugString->lpDebugStringData, debugString->nDebugStringLength);
|
printf("Debug string at 0x%p with length %d\n", debugString->lpDebugStringData, debugString->nDebugStringLength);
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual void cbRipEvent(RIP_INFO* rip)
|
virtual void cbRipEvent(const RIP_INFO* rip)
|
||||||
{
|
{
|
||||||
printf("RIP event type 0x%X, error 0x%X", rip->dwType, rip->dwError);
|
printf("RIP event type 0x%X, error 0x%X", rip->dwType, rip->dwError);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue