HyperDbg Debugger
Loading...
Searching...
No Matches
steppings.cpp File Reference

Functions for stepping instructions. More...

#include "pch.h"

Functions

BOOLEAN SteppingInstrumentationStepIn ()
 Perform Instrumentation Step-in.
BOOLEAN SteppingInstrumentationStepInForTracking ()
 Perform Instrumentation Step-in for Tracking.
BOOLEAN SteppingRegularStepIn ()
 Perform Regular Step-in.
BOOLEAN SteppingStepOver ()
 Perform Step-over.
BOOLEAN SteppingStepOverForGu (BOOLEAN LastInstruction)
 Perform Step-over for GU.

Variables

ACTIVE_DEBUGGING_PROCESS g_ActiveProcessDebuggingState
 State of active debugging thread.
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
 Shows if the debugger was connected to remote debuggee over (A remote guest).

Detailed Description

Functions for stepping instructions.

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.11
Date
2024-09-06

Function Documentation

◆ SteppingInstrumentationStepIn()

BOOLEAN SteppingInstrumentationStepIn ( )

Perform Instrumentation Step-in.

Returns
BOOLEAN
27{
29
30 //
31 // Check if we're in VMI mode
32 //
34 {
35 ShowMessages("the instrumentation step-in is only supported in Debugger Mode\n");
36 return FALSE;
37 }
38
39 //
40 // Set type of step
41 //
43
44 return KdSendStepPacketToDebuggee(RequestFormat);
45}
ACTIVE_DEBUGGING_PROCESS g_ActiveProcessDebuggingState
State of active debugging thread.
Definition globals.h:372
#define FALSE
Definition BasicTypes.h:113
@ DEBUGGER_REMOTE_STEPPING_REQUEST_INSTRUMENTATION_STEP_IN
Definition RequestStructures.h:1047
enum _DEBUGGER_REMOTE_STEPPING_REQUEST DEBUGGER_REMOTE_STEPPING_REQUEST
stepping and tracking types
BOOLEAN KdSendStepPacketToDebuggee(DEBUGGER_REMOTE_STEPPING_REQUEST StepRequestType)
Sends p (step out) and t (step in) packet to the debuggee.
Definition kd.cpp:1381

◆ SteppingInstrumentationStepInForTracking()

BOOLEAN SteppingInstrumentationStepInForTracking ( )

Perform Instrumentation Step-in for Tracking.

Returns
BOOLEAN
54{
56
57 //
58 // Check if we're in VMI mode
59 //
61 {
62 ShowMessages("the instrumentation step-in is only supported in Debugger Mode\n");
63 return FALSE;
64 }
65
66 //
67 // Set type of step
68 //
70
71 return KdSendStepPacketToDebuggee(RequestFormat);
72}
@ DEBUGGER_REMOTE_STEPPING_REQUEST_INSTRUMENTATION_STEP_IN_FOR_TRACKING
Definition RequestStructures.h:1048

◆ SteppingRegularStepIn()

BOOLEAN SteppingRegularStepIn ( )

Perform Regular Step-in.

Returns
BOOLEAN
81{
83
84 //
85 // Set type of step
86 //
88
90 {
91 //
92 // It's stepping over serial connection in kernel debugger
93 //
94 return KdSendStepPacketToDebuggee(RequestFormat);
95 }
97 {
98 //
99 // It's stepping over user debugger
100 //
103 RequestFormat);
104 }
105 else
106 {
107 return FALSE;
108 }
109}
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
Shows if the debugger was connected to remote debuggee over (A remote guest).
Definition globals.h:253
@ DEBUGGER_REMOTE_STEPPING_REQUEST_STEP_IN
Definition RequestStructures.h:1046
BOOLEAN UdSendStepPacketToDebuggee(UINT64 ProcessDetailToken, UINT32 TargetThreadId, DEBUGGER_REMOTE_STEPPING_REQUEST StepType)
Send stepping instructions packet to user debugger.
Definition ud.cpp:1246

◆ SteppingStepOver()

BOOLEAN SteppingStepOver ( )

Perform Step-over.

Returns
BOOLEAN
118{
120
121 //
122 // Set type of step
123 //
125
127 {
128 //
129 // It's stepping over serial connection in kernel debugger
130 //
131 return KdSendStepPacketToDebuggee(RequestFormat);
132 }
134 {
135 //
136 // It's stepping over user debugger
137 //
140 RequestFormat);
141 }
142 else
143 {
144 return FALSE;
145 }
146}
@ DEBUGGER_REMOTE_STEPPING_REQUEST_STEP_OVER
Definition RequestStructures.h:1050

◆ SteppingStepOverForGu()

BOOLEAN SteppingStepOverForGu ( BOOLEAN LastInstruction)

Perform Step-over for GU.

Parameters
LastInstruction
Returns
BOOLEAN
156{
158
159 //
160 // Set type of step
161 //
162 if (!LastInstruction)
163 {
165 }
166 else
167 {
169 }
170
172 {
173 //
174 // It's stepping over serial connection in kernel debugger
175 //
176 return KdSendStepPacketToDebuggee(RequestFormat);
177 }
179 {
180 //
181 // It's stepping over user debugger
182 //
185 RequestFormat);
186 }
187 else
188 {
189 //
190 // The target is not paused, or not a valid context
191 //
192 return FALSE;
193 }
194}
@ DEBUGGER_REMOTE_STEPPING_REQUEST_STEP_OVER_FOR_GU
Definition RequestStructures.h:1051
@ DEBUGGER_REMOTE_STEPPING_REQUEST_STEP_OVER_FOR_GU_LAST_INSTRUCTION
Definition RequestStructures.h:1052

Variable Documentation

◆ g_ActiveProcessDebuggingState

ACTIVE_DEBUGGING_PROCESS g_ActiveProcessDebuggingState
extern

State of active debugging thread.

372{0};

◆ g_IsSerialConnectedToRemoteDebuggee

BOOLEAN g_IsSerialConnectedToRemoteDebuggee
extern

Shows if the debugger was connected to remote debuggee over (A remote guest).