84{
88
93
98 vector<string> SplitCommandCaseSensitive {
Split(Command,
' ')};
99 UINT32 IndexInCommandCaseSensitive = 0;
101
102 if (SplitCommand.size() >= 9)
103 {
106 return;
107 }
108
109 for (auto Section : SplitCommand)
110 {
111 IndexInCommandCaseSensitive++;
112
113
114
115
116 if (IsFirstCommand ==
TRUE)
117 {
118 IsFirstCommand =
FALSE;
119 continue;
120 }
121
122 if (IsNextCoreId)
123 {
125 {
126 ShowMessages(
"please specify a correct hex value for core id\n\n");
128 return;
129 }
130 IsNextCoreId =
FALSE;
131 continue;
132 }
133 if (IsNextPid)
134 {
136 {
137 ShowMessages(
"please specify a correct hex value for process id\n\n");
139 return;
140 }
142 continue;
143 }
144
145 if (IsNextTid)
146 {
148 {
149 ShowMessages(
"please specify a correct hex value for thread id\n\n");
151 return;
152 }
154 continue;
155 }
156
157 if (!Section.compare("pid"))
158 {
160 continue;
161 }
162 if (!Section.compare("tid"))
163 {
165 continue;
166 }
167 if (!Section.compare("core"))
168 {
170 continue;
171 }
172
173 if (!SetAddress)
174 {
176 {
177
178
179
181 SplitCommandCaseSensitive.at(IndexInCommandCaseSensitive - 1).c_str());
183 return;
184 }
185 else
186 {
187
188
189
191 continue;
192 }
193 }
194 }
195
196
197
198
199 if (!SetAddress)
200 {
202 "please specify a correct hex value as the breakpoint address\n\n");
204 return;
205 }
206 if (IsNextPid)
207 {
208 ShowMessages(
"please specify a correct hex value for process id\n\n");
210 return;
211 }
212 if (IsNextCoreId)
213 {
214 ShowMessages(
"please specify a correct hex value for core\n\n");
216 return;
217 }
218 if (IsNextTid)
219 {
220 ShowMessages(
"please specify a correct hex value for thread id\n\n");
222 return;
223 }
224
226 {
227 ShowMessages(
"err, setting breakpoints is not possible when you're not "
228 "connected to a debuggee\n");
229 return;
230 }
231
232
233
234
236}
int BOOL
Definition BasicTypes.h:23
UCHAR BOOLEAN
Definition BasicTypes.h:39
#define TRUE
Definition BasicTypes.h:55
#define FALSE
Definition BasicTypes.h:54
unsigned __int64 UINT64
Definition BasicTypes.h:21
unsigned int UINT32
Definition BasicTypes.h:48
#define DEBUGGEE_BP_APPLY_TO_ALL_PROCESSES
The constant to apply to all processes for bp command.
Definition Constants.h:653
#define DEBUGGEE_BP_APPLY_TO_ALL_THREADS
The constant to apply to all threads for bp command.
Definition Constants.h:659
#define DEBUGGEE_BP_APPLY_TO_ALL_CORES
The constant to apply to all cores for bp command.
Definition Constants.h:647
UINT64 Address
Definition HyperDbgScriptImports.h:67
VOID CommandBpRequest(UINT64 Address, UINT32 Pid, UINT32 Tid, UINT32 CoreNumer)
request breakpoint
Definition bp.cpp:57
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
Shows if the debugger was connected to remote debuggee over (A remote guest)
Definition globals.h:231
VOID CommandBpHelp()
help of the bp command
Definition bp.cpp:25
const vector< string > Split(const string &s, const char &c)
general split command
Definition common.cpp:117
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
VOID ShowMessages(const char *Fmt,...)
Show messages.
Definition libhyperdbg.cpp:96
NULL()
Definition test-case-generator.py:530
BOOLEAN SymbolConvertNameOrExprToAddress(const string &TextToConvert, PUINT64 Result)
check and convert string to a 64 bit unsigned integer and also check for symbol object names and eval...
Definition symbol.cpp:360