121{
122 UINT32 TargetThreadId = 0;
123 UINT64 TargetThread = 0;
124 UINT64 TargetProcess = 0;
126
127 if (CommandTokens.size() >= 5)
128 {
129 ShowMessages("incorrect use of the '%s'\n\n",
132 return;
133 }
134
135 if (CommandTokens.size() == 1)
136 {
137
138
139
141 {
143 }
144 else
145 {
146
147
148
150 NULL,
151 NULL,
153 NULL);
154 }
155 }
156 else if (CommandTokens.size() == 2)
157 {
159 {
160
161
162
163
165 {
166 ShowMessages("err, the need offset to iterate over threads not found, "
167 "make sure to load ntoskrnl.exe's PDB file. use '.help .sym' for "
168 "more information\n");
169 return;
170 }
171 }
172 else
173 {
174 ShowMessages(
175 "err, unknown parameter at '%s'\n\n",
178 return;
179 }
180 }
181 else if (CommandTokens.size() == 3)
182 {
183
184
185
187 {
188 ShowMessages("err, you're not connected to any debuggee in Debugger Mode, "
189 "you can use the '.attach', or the '.detach' commands if you're "
190 "operating in VMI Mode\n");
191 return;
192 }
193
195 {
197 {
198 ShowMessages(
199 "please specify a correct hex value for the thread id that you "
200 "want to operate on it\n\n");
202 return;
203 }
204 }
206 {
208 {
209 ShowMessages(
210 "please specify a correct hex value for the thread (nt!_ETHREAD) that you "
211 "want to operate on it\n\n");
213 return;
214 }
215 }
217 {
218 ShowMessages(
219 "please specify a hex value for the process\n\n");
221 return;
222 }
223 else
224 {
225 ShowMessages(
226 "err, unknown parameter at '%s'\n\n",
229 return;
230 }
231
233 {
234
235
236
237 CheckByClkIntr =
FALSE;
238 }
239 else
240 {
241
242
243
244 CheckByClkIntr =
TRUE;
245 }
246
247
248
249
251 TargetThreadId,
252 TargetThread,
253 CheckByClkIntr,
254 NULL);
255 }
256 else if (CommandTokens.size() == 4)
257 {
259 {
261 {
263 {
264 ShowMessages(
265 "please specify a correct hex value for the process (nt!_EPROCESS) that you "
266 "want to see its threads\n\n");
268 return;
269 }
270
271
272
273
275 {
276 ShowMessages("err, the need offset to iterate over threads not found, "
277 "make sure to load ntoskrnl.exe's PDB file. use '.help .sym' for "
278 "more information\n");
279 return;
280 }
281 }
282 else
283 {
284 ShowMessages(
285 "err, unknown parameter at '%s'\n\n",
288 return;
289 }
290 }
291 else
292 {
293 ShowMessages(
294 "err, unknown parameter at '%s'\n\n",
297 return;
298 }
299 }
300 else
301 {
302 ShowMessages("invalid parameter\n\n");
304 return;
305 }
306}
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
Shows if the debugger was connected to remote debuggee over (A remote guest).
Definition globals.h:253
std::string GetCaseSensitiveStringFromCommandToken(CommandToken TargetToken)
Get case sensitive string from command token.
Definition common.cpp:467
BOOLEAN CompareLowerCaseStrings(CommandToken TargetToken, const CHAR *StringToCompare)
Compare lower case strings.
Definition common.cpp:503
BOOLEAN ConvertTokenToUInt32(CommandToken TargetToken, PUINT32 Result)
check and convert command token to a 32 bit unsigned integer
Definition common.cpp:546
BOOLEAN KdSendSwitchThreadPacketToDebuggee(DEBUGGEE_DETAILS_AND_SWITCH_THREAD_TYPE ActionType, UINT32 NewTid, UINT64 NewThread, BOOLEAN CheckByClockInterrupt, PDEBUGGEE_THREAD_LIST_NEEDED_DETAILS SymDetailsForThreadList)
Sends a change thread or show threads detail packet to the debuggee.
Definition kd.cpp:858
BOOLEAN ObjectShowProcessesOrThreadDetails(BOOLEAN IsProcess)
Get details about processes or threads.
Definition objects.cpp:26
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:359
VOID CommandThreadHelp()
help of the .thread command
Definition thread.cpp:25
BOOLEAN CommandThreadListThreads(UINT64 Eprocess)
Definition thread.cpp:50