52{
56
57
58
59
60 if (SplitCommand.size() != 1 && SplitCommand.size() != 2)
61 {
64 return;
65 }
66
67
68
69
71
72
73
74
75 if (SplitCommand.size() == 2)
76 {
78 {
79 ShowMessages(
"please specify a correct hex value for [count]\n\n");
81 return;
82 }
83 }
84 else
85 {
87 }
88
89
90
91
93 {
94
95
96
98 {
100 "'pause' command or press CTRL+C to pause the process\n");
101 return;
102 }
103
104
105
106
108
109 for (size_t i = 0; i < StepCount; i++)
110 {
111
112
113
114
115
116
117
118
119
120
125 ))
126 {
127 BreakOnNextInstruction =
TRUE;
128
129
130
131
133 }
134
136 {
137
138
139
141 }
142 else
143 {
144
145
146
149 RequestFormat);
150 }
151
152
153
154
156 {
157 break;
158 }
159
160
161
162
163 if (BreakOnNextInstruction)
164 {
165 break;
166 }
167 }
168
169
170
171
173 }
174 else
175 {
176 ShowMessages(
"err, going up (gu) is not valid in the current context, you "
177 "should connect to a debuggee\n");
178 }
179}
UCHAR BOOLEAN
Definition BasicTypes.h:39
#define TRUE
Definition BasicTypes.h:55
#define FALSE
Definition BasicTypes.h:54
unsigned int UINT32
Definition BasicTypes.h:48
#define MAXIMUM_INSTR_SIZE
maximum instruction size in Intel
Definition Constants.h:468
@ DEBUGGER_REMOTE_STEPPING_REQUEST_STEP_OVER_FOR_GU
Definition RequestStructures.h:997
@ DEBUGGER_REMOTE_STEPPING_REQUEST_STEP_OVER_FOR_GU_LAST_INSTRUCTION
Definition RequestStructures.h:998
enum _DEBUGGER_REMOTE_STEPPING_REQUEST DEBUGGER_REMOTE_STEPPING_REQUEST
stepping and tracking types
#define DEBUGGER_REMOTE_TRACKING_DEFAULT_COUNT_OF_STEPPING
default number of instructions used in tracking and stepping
Definition RequestStructures.h:1023
BOOLEAN ConvertStringToUInt32(string TextToConvert, PUINT32 Result)
check and convert string to a 32 bit unsigned it and also check for special notations like 0x etc.
Definition common.cpp:347
BOOLEAN HyperDbgCheckWhetherTheCurrentInstructionIsRet(unsigned char *BufferToDisassemble, UINT64 BuffLength, BOOLEAN Isx86_64)
Check whether the current instruction is a 'ret' or not.
Definition disassembler.cpp:1096
BOOLEAN g_IsRunningInstruction32Bit
whether the Current executing instructions is 32-bit or 64 bit
Definition globals.h:210
BOOLEAN g_IsInstrumentingInstructions
Shows whether the user is running 't', 'p', or 'i' command.
Definition globals.h:561
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
Shows if the debugger was connected to remote debuggee over (A remote guest)
Definition globals.h:231
ACTIVE_DEBUGGING_PROCESS g_ActiveProcessDebuggingState
State of active debugging thread.
Definition globals.h:362
VOID CommandGuHelp()
help of the gu command
Definition gu.cpp:29
BYTE g_CurrentRunningInstruction[MAXIMUM_INSTR_SIZE]
Current executing instructions.
Definition globals.h:204
BOOLEAN KdSendStepPacketToDebuggee(DEBUGGER_REMOTE_STEPPING_REQUEST StepRequestType)
Sends p (step out) and t (step in) packet to the debuggee.
Definition kd.cpp:1206
VOID ShowMessages(const char *Fmt,...)
Show messages.
Definition libhyperdbg.cpp:96
BOOLEAN IsActive
Definition ud.h:49
UINT32 ThreadId
Definition ud.h:52
UINT64 ProcessDebuggingToken
Definition ud.h:50
BOOLEAN IsPaused
Definition ud.h:53
VOID UdSendStepPacketToDebuggee(UINT64 ProcessDetailToken, UINT32 TargetThreadId, DEBUGGER_REMOTE_STEPPING_REQUEST StepType)
Send stepping instructions packet to user debugger.
Definition ud.cpp:1000