HyperDbg Debugger
Loading...
Searching...
No Matches
ud.h
Go to the documentation of this file.
1
12#pragma once
13
15// Definitions //
17
18#define DbgWaitForUserResponse(UserSyncObjectId) \
19 do \
20 { \
21 DEBUGGER_SYNCRONIZATION_EVENTS_STATE * SyncronizationObject = \
22 &g_UserSyncronizationObjectsHandleTable[UserSyncObjectId]; \
23 \
24 SyncronizationObject->IsOnWaitingState = TRUE; \
25 WaitForSingleObject(SyncronizationObject->EventHandle, INFINITE); \
26 } while (FALSE);
27
28#define DbgReceivedUserResponse(UserSyncObjectId) \
29 do \
30 { \
31 DEBUGGER_SYNCRONIZATION_EVENTS_STATE * SyncronizationObject = \
32 &g_UserSyncronizationObjectsHandleTable[UserSyncObjectId]; \
33 \
34 SyncronizationObject->IsOnWaitingState = FALSE; \
35 SetEvent(SyncronizationObject->EventHandle); \
36 } while (FALSE);
37
39// Structures //
41
58
60// Functions //
62
63VOID
65
66VOID
68
69VOID
70UdRemoveActiveDebuggingProcess(BOOLEAN DontSwitchToNewProcess);
71
72VOID
74
75VOID
76UdContinueDebuggee(UINT64 ProcessDetailToken);
77
78VOID
79UdSendStepPacketToDebuggee(UINT64 ThreadDetailToken, UINT32 TargetThreadId, DEBUGGER_REMOTE_STEPPING_REQUEST StepType);
80
81VOID
83 UINT32 ProcessId,
84 UINT32 ThreadId,
85 BOOLEAN Is32Bit,
86 BOOLEAN IsPaused);
89
92
95
96BOOL
98
101
103UdAttachToProcess(UINT32 TargetPid,
104 const WCHAR * TargetFileAddress,
105 const WCHAR * CommandLine,
106 BOOLEAN RunCallbackAtTheFirstInstruction);
107
109UdKillProcess(UINT32 TargetPid);
110
112UdDetachProcess(UINT32 TargetPid, UINT64 ProcessDetailToken);
113
115UdPauseProcess(UINT64 ProcessDebuggingToken);
int BOOL
Definition BasicTypes.h:23
UCHAR BOOLEAN
Definition BasicTypes.h:39
#define VOID
Definition BasicTypes.h:33
wchar_t WCHAR
Definition BasicTypes.h:32
unsigned __int64 UINT64
Definition BasicTypes.h:21
unsigned long DWORD
Definition BasicTypes.h:22
unsigned int UINT32
Definition BasicTypes.h:48
enum _DEBUGGER_REMOTE_STEPPING_REQUEST DEBUGGER_REMOTE_STEPPING_REQUEST
stepping and tracking types
BOOLEAN UdSetActiveDebuggingThreadByPidOrTid(UINT32 TargetPidOrTid, BOOLEAN IsTid)
Set the active debugging thread by process id or thread id.
Definition ud.cpp:1037
BOOLEAN UdPauseProcess(UINT64 ProcessDebuggingToken)
Pause the target process.
Definition ud.cpp:843
VOID UdRemoveActiveDebuggingProcess(BOOLEAN DontSwitchToNewProcess)
Remove the current active debugging process (thread)
Definition ud.cpp:129
VOID UdInitializeUserDebugger()
initialize user debugger
Definition Ud.c:21
struct _ACTIVE_DEBUGGING_PROCESS * PACTIVE_DEBUGGING_PROCESS
BOOLEAN UdDetachProcess(UINT32 TargetPid, UINT64 ProcessDetailToken)
Detach the target process.
Definition ud.cpp:764
struct _ACTIVE_DEBUGGING_PROCESS ACTIVE_DEBUGGING_PROCESS
structures related to current thread debugging state
BOOLEAN UdShowListActiveDebuggingProcessesAndThreads()
Show list of active debugging processes and threads.
Definition ud.cpp:1119
BOOLEAN UdCheckThreadByProcessId(DWORD Pid, DWORD Tid)
Check if a thread belongs to special process.
Definition ud.cpp:243
VOID UdUninitializeUserDebugger()
uninitialize user debugger
Definition Ud.c:77
BOOLEAN UdKillProcess(UINT32 TargetPid)
Kill the target process from kernel.
Definition ud.cpp:666
VOID UdContinueDebuggee(UINT64 ProcessDetailToken)
Continue the target user debugger.
Definition ud.cpp:976
VOID UdHandleUserDebuggerPausing(PDEBUGGEE_UD_PAUSED_PACKET PausePacket)
Handle pause packets from user debugger.
Definition user-listening.cpp:29
BOOLEAN UdAttachToProcess(UINT32 TargetPid, const WCHAR *TargetFileAddress, const WCHAR *CommandLine, BOOLEAN RunCallbackAtTheFirstInstruction)
Attach to target process.
Definition ud.cpp:349
BOOL UdListProcessThreads(DWORD OwnerPID)
List of threads by owner process id.
Definition ud.cpp:183
VOID UdSetActiveDebuggingProcess(UINT64 DebuggingId, UINT32 ProcessId, UINT32 ThreadId, BOOLEAN Is32Bit, BOOLEAN IsPaused)
set the current active debugging process (thread)
Definition ud.cpp:100
VOID UdSendStepPacketToDebuggee(UINT64 ThreadDetailToken, UINT32 TargetThreadId, DEBUGGER_REMOTE_STEPPING_REQUEST StepType)
Send stepping instructions packet to user debugger.
Definition ud.cpp:1000
structures related to current thread debugging state
Definition ud.h:48
UINT32 ProcessId
Definition ud.h:51
UINT64 Context
Definition ud.h:55
GUEST_REGS Registers
Definition ud.h:54
BOOLEAN IsActive
Definition ud.h:49
UINT32 ThreadId
Definition ud.h:52
UINT64 ProcessDebuggingToken
Definition ud.h:50
BOOLEAN Is32Bit
Definition ud.h:56
BOOLEAN IsPaused
Definition ud.h:53
The structure of pausing packet in uHyperDbg.
Definition DataTypes.h:229
Definition BasicTypes.h:70