241{
245
246 if (CommandTokens.size() != 1 && CommandTokens.size() != 3)
247 {
248 ShowMessages("incorrect use of the '%s'\n\n",
251 return;
252 }
253
254
255
256
258
259 if (CommandTokens.size() == 3)
260 {
262 {
264 {
265
266
267
268 ShowMessages("unknown parameter '%s'\n\n",
271
272 return;
273 }
274 }
275 else
276 {
277 ShowMessages("incorrect use of the '%s'\n\n",
280 return;
281 }
282 }
283 else
284 {
285
286
287
289 }
290
291
292
293
294
295
296
298 {
299 LbrdumpRequest.
CoreId = 0;
300 }
301 else
302 {
303 LbrdumpRequest.
CoreId = CoreId;
304 }
305
306 while (ContinueDumpingAllCores)
307 {
308
309
310
312 {
314 {
315
316
317
319
321 {
322
323
324
325
326
327
329 }
330 else
331 {
332
333
334
335
336 ContinueDumpingAllCores =
FALSE;
337 }
338 }
339 else
340 {
342 break;
343 }
344 }
345 else
346 {
347 ShowMessages("failed to send LBR dump request\n");
348 break;
349 }
350 }
351}
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 ShowErrorMessage(UINT32 Error)
shows the error message
Definition debugger.cpp:40
VOID CommandLbrdumpHelp()
help of the !lbrdump command
Definition lbrdump.cpp:82
VOID CommandLbrdumpPrint(HYPERTRACE_LBR_DUMP_PACKETS *LbrdumpRequest)
Print collected LBR branches.
Definition lbrdump.cpp:153
BOOLEAN HyperDbgLbrdumpSendRequest(HYPERTRACE_LBR_DUMP_PACKETS *LbrdumpRequest)
Send LBR dump requests.
Definition lbrdump.cpp:29
HANDLE g_DeviceHandle
Holds the global handle of device which is used to send the request to the kernel by IOCTL,...
Definition globals.h:481
BOOLEAN g_IsHyperTraceModuleLoaded
shows whether the HyperTrace module is loaded or not
Definition lbrdump.cpp:19
BOOLEAN NextCoreIsValid
Definition RequestStructures.h:1325
UINT32 KernelStatus
Definition RequestStructures.h:1329
UINT32 CoreId
Definition RequestStructures.h:1324