53{
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 {
86 StepCount = 1;
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
119 {
120
121
122
124 }
125 else
126 {
127
128
129
132 RequestFormat);
133 }
134
135 if (!SplitCommand.at(0).compare("pr"))
136 {
137
138
139
141
142 if (i != StepCount - 1)
143 {
145 }
146 }
147
148
149
150
152 {
153 break;
154 }
155 }
156
157
158
159
161 }
162 else
163 {
164 ShowMessages(
"err, stepping (p) is not valid in the current context, you "
165 "should connect to a debuggee\n");
166 }
167}
#define TRUE
Definition BasicTypes.h:55
#define FALSE
Definition BasicTypes.h:54
unsigned int UINT32
Definition BasicTypes.h:48
@ DEBUGGER_REMOTE_STEPPING_REQUEST_STEP_OVER
Definition RequestStructures.h:996
enum _DEBUGGER_REMOTE_STEPPING_REQUEST DEBUGGER_REMOTE_STEPPING_REQUEST
stepping and tracking types
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 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 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
VOID CommandPHelp()
help of the p command
Definition p.cpp:27
ACTIVE_DEBUGGING_PROCESS g_ActiveProcessDebuggingState
State of active debugging thread.
Definition globals.h:362
BOOLEAN HyperDbgRegisterShowAll()
handler of r show all registers
Definition r.cpp:317
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