HyperDbg Debugger
Loading...
Searching...
No Matches
core.cpp File Reference

show and change processor More...

#include "pch.h"

Functions

VOID CommandCoreHelp ()
 help of the ~ command
VOID CommandCore (vector< CommandToken > CommandTokens, string Command)
 ~ command handler

Variables

ULONG g_CurrentRemoteCore
 Current core that the debuggee is debugging.
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
 Shows if the debugger was connected to remote debuggee over (A remote guest).

Detailed Description

show and change processor

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.1
Date
2021-01-30

Function Documentation

◆ CommandCore()

VOID CommandCore ( vector< CommandToken > CommandTokens,
string Command )

~ command handler

Parameters
CommandTokens
Command
Returns
VOID
48{
49 UINT32 TargetCore = 0;
50
51 if (CommandTokens.size() != 1 && CommandTokens.size() != 2)
52 {
53 ShowMessages("incorrect use of the '%s'\n\n",
54 GetCaseSensitiveStringFromCommandToken(CommandTokens.at(0)).c_str());
56 return;
57 }
58
59 //
60 // Check if it's connected to a remote debuggee or not
61 //
63 {
64 ShowMessages("err, you're not connected to any debuggee\n");
65 return;
66 }
67
68 if (CommandTokens.size() == 1)
69 {
70 ShowMessages("current processor : 0x%x\n", g_CurrentRemoteCore);
71 }
72 else if (CommandTokens.size() == 2)
73 {
74 if (!ConvertTokenToUInt32(CommandTokens.at(1), &TargetCore))
75 {
76 ShowMessages("please specify a correct hex value for the core that you "
77 "want to operate on it\n\n");
79 return;
80 }
81
82 //
83 // Send the changing core packet
84 //
86 }
87}
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
Shows if the debugger was connected to remote debuggee over (A remote guest).
Definition globals.h:253
unsigned int UINT32
Definition BasicTypes.h:54
std::string GetCaseSensitiveStringFromCommandToken(CommandToken TargetToken)
Get case sensitive string from command token.
Definition common.cpp:467
BOOLEAN ConvertTokenToUInt32(CommandToken TargetToken, PUINT32 Result)
check and convert command token to a 32 bit unsigned integer
Definition common.cpp:546
ULONG g_CurrentRemoteCore
Current core that the debuggee is debugging.
Definition globals.h:285
VOID CommandCoreHelp()
help of the ~ command
Definition core.cpp:26
BOOLEAN KdSendSwitchCorePacketToDebuggee(UINT32 NewCore)
Sends a change core or '~ x' command packet to the debuggee.
Definition kd.cpp:181

◆ CommandCoreHelp()

VOID CommandCoreHelp ( )

help of the ~ command

Returns
VOID
27{
28 ShowMessages("~ : shows and changes the operating processor.\n\n");
29
30 ShowMessages("syntax : \t~\n");
31 ShowMessages("syntax : \t~ [CoreNumber (hex)]\n");
32
33 ShowMessages("\n");
34 ShowMessages("\t\te.g : ~ \n");
35 ShowMessages("\t\te.g : ~ 2 \n");
36}

Variable Documentation

◆ g_CurrentRemoteCore

ULONG g_CurrentRemoteCore
extern

Current core that the debuggee is debugging.

◆ g_IsSerialConnectedToRemoteDebuggee

BOOLEAN g_IsSerialConnectedToRemoteDebuggee
extern

Shows if the debugger was connected to remote debuggee over (A remote guest).