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

The hyperdbg command interpreter and driver connector. More...

#include "pch.h"

Classes

class  CommandParser

Functions

INT FindDifferencePosition (const CHAR *prsTok, const CHAR *fileTok)
 Find the position of the first difference between two strings.
BOOLEAN HyperDbgTestCommandParser (CHAR *Command, UINT32 NumberOfTokens, CHAR **TokensList, UINT32 *FailedTokenNum, UINT32 *FailedTokenPosition)
 Parse the command (used for testing purposes).
VOID HyperDbgTestCommandParserShowTokens (CHAR *Command)
 Parse the command and show tokens (used for testing purposes).
INT HyperDbgInterpreter (CHAR *Command)
 Interpret commands.
VOID InterpreterRemoveComments (CHAR *CommandText)
 Remove batch comments.
VOID HyperDbgShowSignature ()
 Show signature of HyperDbg.
BOOLEAN CheckMultilineCommand (CHAR *CurrentCommand, BOOLEAN Reset)
 check for multi-line commands
BOOLEAN ContinuePreviousCommand ()
 Some of commands like stepping commands (i, p, t) and etc. need to be repeated when the user press enter, this function shows whether we should continue the previous command or not.
UINT64 GetCommandAttributes (const string &FirstCommand)
 Get Command Attributes.
VOID InitializeDebugger ()
 Initialize the debugger and adjust commands for the first run.
VOID InitializeCommandsDictionary ()
 Initialize commands and attributes.

Variables

ACTIVE_DEBUGGING_PROCESS g_ActiveProcessDebuggingState
 State of active debugging thread.
CommandType g_CommandsList
 List of command and attributes.
BOOLEAN g_ShouldPreviousCommandBeContinued
 Shows whether the previous command should be continued or not.
BOOLEAN g_IsCommandListInitialized
 Is list of command initialized.
BOOLEAN g_LogOpened
 Shows whether the '.logopen' command is executed and the log file is open or not.
BOOLEAN g_ExecutingScript
 Shows whether the target is executing a script form '.script' command or executing script by an argument.
BOOLEAN g_IsConnectedToRemoteDebuggee
 Shows whether the current debugger is the host and connected to a remote debuggee (guest).
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
 Shows if the debugger was connected to remote debuggee over (A remote guest).
BOOLEAN g_BreakPrintingOutput
 Shows whether the pause command or CTRL+C or CTRL+Break is executed or not.
BOOLEAN g_IsInterpreterOnString
 shows whether the interpreter is currently on a string or not
BOOLEAN g_IsInterpreterPreviousCharacterABackSlash
 Is interpreter encountered a back slash at previous run.
BOOLEAN g_RtmSupport
 check for RTM support
UINT32 g_VirtualAddressWidth
 Virtual address width for x86 processors.
UINT32 g_InterpreterCountOfOpenCurlyBrackets
 Keeps the trace of curly brackets in the interpreter.
ULONG g_CurrentRemoteCore
 Current core that the debuggee is debugging.
string g_ServerPort
 In debugger (not debuggee), we save the port of server debuggee in this variable to use it later e.g, in signature.
string g_ServerIp
 In debugger (not debuggee), we save the port of server debuggee in this variable to use it later e.g, in signature.

Detailed Description

The hyperdbg command interpreter and driver connector.

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.1
Date
2020-04-11

Function Documentation

◆ CheckMultilineCommand()

BOOLEAN CheckMultilineCommand ( CHAR * CurrentCommand,
BOOLEAN Reset )

check for multi-line commands

Parameters
CurrentCommand
Reset
Returns
BOOLEAN return TRUE if the command needs extra input, otherwise return FALSE
1133{
1134 UINT32 CurrentCommandLen = 0;
1135 std::string CurrentCommandStr(CurrentCommand);
1136
1137 if (Reset)
1138 {
1142 }
1143
1144 CurrentCommandLen = (UINT32)CurrentCommandStr.length();
1145
1146 for (SIZE_T i = 0; i < CurrentCommandLen; i++)
1147 {
1148 switch (CurrentCommandStr.at(i))
1149 {
1150 case '"':
1151
1153 {
1155 break; // it's an escaped \" double-quote
1156 }
1157
1160 else
1162
1163 break;
1164
1165 case '{':
1166
1169
1172
1173 break;
1174
1175 case '}':
1176
1179
1182
1183 break;
1184
1185 case '\\':
1186
1188 g_IsInterpreterPreviousCharacterABackSlash = FALSE; // it's not a escape character (two backslashes \\ )
1189 else
1191
1192 break;
1193
1194 default:
1195
1198
1199 break;
1200 }
1201 }
1202
1204 {
1205 //
1206 // either the command is finished or it's a single
1207 // line command
1208 //
1209 return FALSE;
1210 }
1211 else
1212 {
1213 //
1214 // There still other lines, this command is incomplete
1215 //
1216 return TRUE;
1217 }
1218}
#define TRUE
Definition BasicTypes.h:114
#define FALSE
Definition BasicTypes.h:113
unsigned int UINT32
Definition BasicTypes.h:54
UINT32 g_InterpreterCountOfOpenCurlyBrackets
Keeps the trace of curly brackets in the interpreter.
Definition globals.h:69
BOOLEAN g_IsInterpreterPreviousCharacterABackSlash
Is interpreter encountered a back slash at previous run.
Definition globals.h:64
BOOLEAN g_IsInterpreterOnString
shows whether the interpreter is currently on a string or not
Definition globals.h:59

◆ ContinuePreviousCommand()

BOOLEAN ContinuePreviousCommand ( )

Some of commands like stepping commands (i, p, t) and etc. need to be repeated when the user press enter, this function shows whether we should continue the previous command or not.

Returns
TRUE means the command should be continued, FALSE means command should be ignored
1230{
1232
1233 //
1234 // We should keep it FALSE for the next command
1235 //
1237
1238 if (Result)
1239 {
1240 return TRUE;
1241 }
1242 else
1243 {
1244 return FALSE;
1245 }
1246}
UCHAR BOOLEAN
Definition BasicTypes.h:35
BOOLEAN g_ShouldPreviousCommandBeContinued
Shows whether the previous command should be continued or not.
Definition globals.h:342

◆ FindDifferencePosition()

INT FindDifferencePosition ( const CHAR * prsTok,
const CHAR * fileTok )

Find the position of the first difference between two strings.

Parameters
prsTokThe first string
fileTokThe second string
Returns
The position of the first difference, or -1 if the strings are equal
671{
672 INT i = 0;
673
674 //
675 // Loop until a difference is found or until the end of any string is reached
676 //
677 while (prsTok[i] != '\0' && fileTok[i] != '\0')
678 {
679 if (prsTok[i] != fileTok[i])
680 {
681 return i; // Return the position of the first mismatch
682 }
683 i++;
684 }
685
686 //
687 // If one string ends before the other
688 //
689 if (prsTok[i] != fileTok[i])
690 {
691 return i;
692 }
693
694 //
695 // If no difference is found, return -1
696 //
697 return -1;
698}
int INT
Definition BasicTypes.h:43

◆ GetCommandAttributes()

UINT64 GetCommandAttributes ( const string & FirstCommand)

Get Command Attributes.

Parameters
FirstCommandjust the first word of command (without other parameters)
Returns
BOOLEAN Mask of the command's attributes
1256{
1257 CommandType::iterator Iterator;
1258
1259 //
1260 // Some commands should not be passed to the remote system
1261 // and instead should be handled in the current debugger
1262 //
1263
1264 Iterator = g_CommandsList.find(FirstCommand);
1265
1266 if (Iterator == g_CommandsList.end())
1267 {
1268 //
1269 // Command doesn't exist, if it's not exists then it's better to handle
1270 // it locally, instead of sending it to the remote computer
1271 //
1273 }
1274 else
1275 {
1276 return Iterator->second.CommandAttrib;
1277 }
1278
1279 return NULL;
1280}
#define DEBUGGER_COMMAND_ATTRIBUTE_ABSOLUTE_LOCAL
Absolute local commands.
Definition commands.h:224
CommandType g_CommandsList
List of command and attributes.
Definition globals.h:348
NULL()
Definition test-case-generator.py:530

◆ HyperDbgInterpreter()

INT HyperDbgInterpreter ( CHAR * Command)

Interpret commands.

Parameters
CommandThe text of command
Returns
INT returns return zero if it was successful or non-zero if there was error
801{
802 BOOLEAN HelpCommand = FALSE;
803 UINT64 CommandAttributes = NULL;
804 CommandType::iterator Iterator;
805 CommandParser Parser;
806
807 //
808 // Check if it's the first command and whether the mapping of command is
809 // initialized or not
810 //
812 {
813 //
814 // Initialize the debugger
815 //
817
819 }
820
821 //
822 // Save the command into log open file
823 //
825 {
826 LogopenSaveToFile(Command);
827 LogopenSaveToFile("\n");
828 }
829
830 //
831 // Convert to string
832 //
833 string CommandString(Command);
834
835 //
836 // Tokenize the command string
837 //
838 auto Tokens = Parser.Parse(CommandString);
839
840 //
841 // Print the tokens
842 //
843 // Parser.PrintTokens(Tokens);
844
845 //
846 // Check if user entered an empty input
847 //
848 if (Tokens.empty())
849 {
850 ShowMessages("\n");
851 return 0;
852 }
853
854 //
855 // Get the first command (lower case)
856 //
857 string FirstCommand = GetLowerStringFromCommandToken(Tokens.front());
858
859 //
860 // Read the command's attributes
861 //
862 CommandAttributes = GetCommandAttributes(FirstCommand);
863
864 //
865 // Check if the command needs to be continued by pressing enter
866 //
867 if (CommandAttributes & DEBUGGER_COMMAND_ATTRIBUTE_REPEAT_ON_ENTER)
868 {
870 }
871 else
872 {
874 }
875
876 //
877 // Check and send remote command and also we check whether this
878 // is a command that should be handled in this command or we can
879 // send it to the remote computer, it is because in a remote connection
880 // still some of the commands should be handled in the local HyperDbg
881 //
884 {
885 //
886 // Check it here because generally, we use this variable in host
887 // for showing the correct signature but we won't try to block
888 // other commands, the only thing is events which is blocked
889 // by the remote computer itself
890 //
892 {
894 }
895
896 //
897 // It's a connection over network (VMI-Mode)
898 //
899 RemoteConnectionSendCommand(Command, (UINT32)strlen(Command) + 1);
900
901 ShowMessages("\n");
902
903 //
904 // Indicate that we sent the command to the target system
905 //
906 return 2;
907 }
909 !(CommandAttributes &
911 {
912 //
913 // It's a connection over serial (Debugger-Mode)
914 //
915
917 {
918 KdSendUserInputPacketToDebuggee(Command, (UINT32)strlen(Command) + 1, TRUE);
919
920 //
921 // Set the debuggee to show that it's running
922 //
924 }
925 else
926 {
927 //
928 // Disable the breakpoints and events while executing the command in the remote computer
929 //
931 KdSendUserInputPacketToDebuggee(Command, (UINT32)strlen(Command) + 1, FALSE);
933 }
934
935 //
936 // Indicate that we sent the command to the target system
937 //
938 return 2;
939 }
940
941 //
942 // Detect whether it's a .help command or not
943 //
944 if (!FirstCommand.compare(".help") || !FirstCommand.compare("help") ||
945 !FirstCommand.compare(".hh") || !FirstCommand.compare("!help"))
946 {
947 if (Tokens.size() == 2)
948 {
949 //
950 // Show that it's a help command
951 //
952 HelpCommand = TRUE;
953 FirstCommand = GetLowerStringFromCommandToken(Tokens.at(1));
954 }
955 else
956 {
957 ShowMessages("incorrect use of the '%s'\n\n",
960 return 0;
961 }
962 }
963
964 //
965 // Start parsing commands
966 //
967 string CaseSensitiveCommandString(Command);
968 Iterator = g_CommandsList.find(FirstCommand);
969
970 if (Iterator == g_CommandsList.end())
971 {
972 //
973 // Command doesn't exist
974 //
975 if (!HelpCommand)
976 {
977 ShowMessages("err, couldn't resolve command at '%s'\n",
979 }
980 else
981 {
982 ShowMessages("err, couldn't find the help for the command at '%s'\n",
984 }
985 }
986 else
987 {
988 if (HelpCommand)
989 {
990 Iterator->second.CommandHelpFunction();
991 }
992 else
993 {
994 //
995 // Call the parser with tokens
996 //
997 Iterator->second.CommandFunctionNewParser(Tokens, CaseSensitiveCommandString);
998 }
999 }
1000
1001 //
1002 // Save the command into log open file
1003 //
1005 {
1006 LogopenSaveToFile("\n");
1007 }
1008
1009 return 0;
1010}
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
Shows if the debugger was connected to remote debuggee over (A remote guest).
Definition globals.h:253
@ TEST_BREAKPOINT_TURN_ON_BPS_AND_EVENTS_FOR_COMMANDS_IN_REMOTE_COMPUTER
Definition RequestStructures.h:343
@ TEST_BREAKPOINT_TURN_OFF_BPS_AND_EVENTS_FOR_COMMANDS_IN_REMOTE_COMPUTER
Definition RequestStructures.h:342
Definition interpreter.cpp:36
std::vector< CommandToken > Parse(const std::string &ConstInput)
Parse the input string (commands).
Definition interpreter.cpp:44
#define DEBUGGER_COMMAND_ATTRIBUTE_WONT_STOP_DEBUGGER_AGAIN
Definition commands.h:217
#define DEBUGGER_COMMAND_ATTRIBUTE_LOCAL_COMMAND_IN_DEBUGGER_MODE
Different attributes of commands.
Definition commands.h:213
#define DEBUGGER_COMMAND_ATTRIBUTE_REPEAT_ON_ENTER
Definition commands.h:216
#define DEBUGGER_COMMAND_ATTRIBUTE_LOCAL_COMMAND_IN_REMOTE_CONNECTION
Definition commands.h:215
std::string GetCaseSensitiveStringFromCommandToken(CommandToken TargetToken)
Get case sensitive string from command token.
Definition common.cpp:467
std::string GetLowerStringFromCommandToken(CommandToken TargetToken)
Get lower case string from command token.
Definition common.cpp:484
BOOLEAN g_IsConnectedToRemoteDebuggee
Shows whether the current debugger is the host and connected to a remote debuggee (guest).
Definition globals.h:96
VOID CommandHelpHelp()
help of the help command :)
Definition help.cpp:22
BOOLEAN g_IsCommandListInitialized
Is list of command initialized.
Definition globals.h:366
UINT64 GetCommandAttributes(const string &FirstCommand)
Get Command Attributes.
Definition interpreter.cpp:1255
VOID InitializeDebugger()
Initialize the debugger and adjust commands for the first run.
Definition interpreter.cpp:1288
BOOLEAN KdSendUserInputPacketToDebuggee(const CHAR *Sendbuf, INT Len, BOOLEAN IgnoreBreakingAgain)
Sends user input packet to the debuggee.
Definition kd.cpp:1295
BOOLEAN KdSendTestQueryPacketToDebuggee(DEBUGGER_TEST_QUERY_STATE Type)
Send a test query request to the debuggee.
Definition kd.cpp:425
VOID KdSetStatusAndWaitForPause()
Set the status of the debuggee to wait for the pause.
Definition kd.cpp:2072
VOID LogopenSaveToFile(const CHAR *Text)
Append text to the file object.
Definition logopen.cpp:110
BOOLEAN g_LogOpened
Shows whether the '.logopen' command is executed and the log file is open or not.
Definition globals.h:488
list Tokens
Definition generator.py:217
BOOLEAN g_BreakPrintingOutput
Shows whether the pause command or CTRL+C or CTRL+Break is executed or not.
Definition globals.h:509
INT RemoteConnectionSendCommand(const CHAR *sendbuf, INT len)
send the command as a client (debugger, host) to the server (debuggee, guest)
Definition remote-connection.cpp:445
BOOLEAN g_ExecutingScript
Shows whether the target is executing a script form '.script' command or executing script by an argum...
Definition globals.h:502

◆ HyperDbgShowSignature()

VOID HyperDbgShowSignature ( )

Show signature of HyperDbg.

Returns
VOID
1087{
1089 {
1090 //
1091 // Remote debugging over tcp (vmi-mode)
1092 //
1093 ShowMessages("[%s:%s] HyperDbg> ", g_ServerIp.c_str(), g_ServerPort.c_str());
1094 }
1095 else if (g_ActiveProcessDebuggingState.IsActive)
1096 {
1097 //
1098 // Debugging a special process
1099 //
1100 ShowMessages("%x:%x %s u%sHyperDbg> ",
1103 g_ActiveProcessDebuggingState.IsPaused ? "(paused)" : "(running)",
1104 g_ActiveProcessDebuggingState.Is32Bit ? "86" : "64");
1105 }
1107 {
1108 //
1109 // Remote debugging over serial (debugger-mode)
1110 //
1111 ShowMessages("%x: kHyperDbg> ", g_CurrentRemoteCore);
1112 }
1113 else
1114 {
1115 //
1116 // Anything other than above scenarios including local debugging
1117 // in vmi-mode
1118 //
1119 ShowMessages("HyperDbg> ");
1120 }
1121}
ACTIVE_DEBUGGING_PROCESS g_ActiveProcessDebuggingState
State of active debugging thread.
Definition globals.h:372
string g_ServerPort
In debugger (not debuggee), we save the port of server debuggee in this variable to use it later e....
Definition globals.h:132
string g_ServerIp
In debugger (not debuggee), we save the port of server debuggee in this variable to use it later e....
Definition globals.h:139
ULONG g_CurrentRemoteCore
Current core that the debuggee is debugging.
Definition globals.h:285

◆ HyperDbgTestCommandParser()

BOOLEAN HyperDbgTestCommandParser ( CHAR * Command,
UINT32 NumberOfTokens,
CHAR ** TokensList,
UINT32 * FailedTokenNum,
UINT32 * FailedTokenPosition )

Parse the command (used for testing purposes).

Parameters
CommandThe text of command
NumberOfTokensThe number of tokens
TokensListThe tokens list
FailedTokenNumThe failed token number (if any)
FailedTokenPositionThe failed token position (if any)
Returns
BOOLEAN returns TRUE if the command was parsed successfully and FALSE if there was an error
717{
718 CommandParser Parser;
719
720 //
721 // Convert to string
722 //
723 string CommandString(Command);
724
725 //
726 // Tokenize the command string
727 //
728 std::vector<CommandToken> Tokens = Parser.Parse(CommandString);
729
730 //
731 // Check if the number of tokens is correct
732 //
733 if (Tokens.size() != NumberOfTokens)
734 {
735 ShowMessages("err, the number of tokens is not correct\n");
736 return FALSE;
737 }
738
739 //
740 // Check if the tokens are correct
741 //
742 for (UINT32 i = 0; i < Tokens.size(); i++)
743 {
744 auto Token = Tokens.at(i);
745
746 auto CaseSensitiveText = std::get<1>(Token);
747
748 if (strcmp(CaseSensitiveText.c_str(), TokensList[i]) != 0)
749 {
750 //
751 // Set the failed token number
752 //
753 *FailedTokenNum = i;
754 *FailedTokenPosition = FindDifferencePosition(CaseSensitiveText.c_str(), TokensList[i]);
755
756 ShowMessages("err, the token is not correct\n");
757 return FALSE;
758 }
759 }
760
761 //
762 // Everything is correct
763 //
764 return TRUE;
765}
INT FindDifferencePosition(const CHAR *prsTok, const CHAR *fileTok)
Find the position of the first difference between two strings.
Definition interpreter.cpp:670

◆ HyperDbgTestCommandParserShowTokens()

VOID HyperDbgTestCommandParserShowTokens ( CHAR * Command)

Parse the command and show tokens (used for testing purposes).

Parameters
CommandThe text of command
Returns
VOID
776{
777 CommandParser Parser;
778
779 //
780 // Convert to string
781 //
782 string CommandString(Command);
783
784 //
785 // Tokenize the command string
786 //
787 std::vector<CommandToken> Tokens = Parser.Parse(CommandString);
788
789 Parser.PrintTokens(Tokens);
790}
VOID PrintTokens(const std::vector< CommandToken > &Tokens)
Function to print the elements of a vector of Tokens.
Definition interpreter.cpp:496

◆ InitializeCommandsDictionary()

VOID InitializeCommandsDictionary ( )

Initialize commands and attributes.

Returns
VOID
1344{
1349
1353
1356
1359
1362
1365
1367
1370
1373
1376
1379
1382
1385
1390
1395
1397
1400
1405
1408
1411
1414
1417
1420
1422
1425
1427
1430
1432
1434
1438
1440
1442
1445
1448
1450
1452
1454
1456
1458
1461
1463
1466
1470
1472
1474
1476
1478
1480
1482
1484
1486
1488
1490
1492
1495
1497
1499
1501
1503
1505
1507
1510
1512
1514
1517
1520
1522
1524
1526
1528
1530
1532
1535
1538
1541
1543
1560
1567
1574
1576
1579
1582
1584
1588
1592
1596
1599
1602
1604
1607
1610
1614
1623
1626
1628
1630
1632
1634
1638
1640
1641 //
1642 // hwdbg commands
1643 //
1648
1650
1652}
VOID CommandAssemble(vector< CommandToken > CommandTokens, string Command)
a and !a commands handler
Definition a.cpp:182
VOID CommandAssembleHelp()
help of a and !a command
Definition a.cpp:43
VOID CommandApic(vector< CommandToken > CommandTokens, string Command)
!apic command handler
Definition apic.cpp:186
VOID CommandApicHelp()
help of the !apic command
Definition apic.cpp:26
VOID CommandAttachHelp()
help of the .attach command
Definition attach.cpp:25
VOID CommandAttach(vector< CommandToken > CommandTokens, string Command)
.attach command handler
Definition attach.cpp:44
VOID CommandBcHelp()
help of the bc command
Definition bc.cpp:25
VOID CommandBc(vector< CommandToken > CommandTokens, string Command)
handler of bc command
Definition bc.cpp:45
VOID CommandBd(vector< CommandToken > CommandTokens, string Command)
handler of bd command
Definition bd.cpp:45
VOID CommandBdHelp()
help of the bd command
Definition bd.cpp:25
VOID CommandBe(vector< CommandToken > CommandTokens, string Command)
handler of be command
Definition be.cpp:45
VOID CommandBeHelp()
help of the be command
Definition be.cpp:25
VOID CommandBl(vector< CommandToken > CommandTokens, string Command)
handler of the bl command
Definition bl.cpp:41
VOID CommandBlHelp()
help of the bl command
Definition bl.cpp:25
VOID CommandBp(vector< CommandToken > CommandTokens, string Command)
bp command handler
Definition bp.cpp:168
VOID CommandBpHelp()
help of the bp command
Definition bp.cpp:27
VOID CommandClsHelp()
help of the .cls command
Definition cls.cpp:20
VOID CommandCls(vector< CommandToken > CommandTokens, string Command)
.cls command handler
Definition cls.cpp:36
#define DEBUGGER_COMMAND_CONTINUE_ATTRIBUTES
Definition commands.h:253
#define DEBUGGER_COMMAND_IOOUT_ATTRIBUTES
Definition commands.h:367
#define DEBUGGER_COMMAND_LOAD_ATTRIBUTES
Definition commands.h:289
#define DEBUGGER_COMMAND_PCICAM_ATTRIBUTES
Definition commands.h:471
#define DEBUGGER_COMMAND_INTERRUPT_ATTRIBUTES
Definition commands.h:371
#define DEBUGGER_COMMAND_PAGEIN_ATTRIBUTES
Definition commands.h:453
#define DEBUGGER_COMMAND_X_ATTRIBUTES
Definition commands.h:431
#define DEBUGGER_COMMAND_HELP_ATTRIBUTES
Definition commands.h:234
#define DEBUGGER_COMMAND_BD_ATTRIBUTES
Definition commands.h:416
#define DEBUGGER_COMMAND_MEASURE_ATTRIBUTES
Definition commands.h:385
#define DEBUGGER_COMMAND_HIDE_ATTRIBUTES
Definition commands.h:381
#define DEBUGGER_COMMAND_A_ATTRIBUTES
Definition commands.h:465
#define DEBUGGER_COMMAND_VMCALL_ATTRIBUTES
Definition commands.h:343
#define DEBUGGER_COMMAND_DT_ATTRIBUTES
Definition commands.h:441
#define DEBUGGER_COMMAND_FORMATS_ATTRIBUTES
Definition commands.h:329
#define DEBUGGER_COMMAND_STRUCT_ATTRIBUTES
Definition commands.h:444
#define DEBUGGER_COMMAND_PTE_ATTRIBUTES
Definition commands.h:332
#define DEBUGGER_COMMAND_APIC_ATTRIBUTES
Definition commands.h:334
#define DEBUGGER_COMMAND_DUMP_ATTRIBUTES
Definition commands.h:455
#define DEBUGGER_COMMAND_DISCONNECT_ATTRIBUTES
Definition commands.h:278
#define DEBUGGER_COMMAND_GG_ATTRIBUTES
Definition commands.h:245
#define DEBUGGER_COMMAND_TSC_ATTRIBUTES
Definition commands.h:357
#define DEBUGGER_COMMAND_K_ATTRIBUTES
Definition commands.h:438
#define DEBUGGER_COMMAND_FLUSH_ATTRIBUTES
Definition commands.h:294
#define DEBUGGER_COMMAND_S_ATTRIBUTES
Definition commands.h:404
#define DEBUGGER_COMMAND_BP_ATTRIBUTES
Definition commands.h:410
#define DEBUGGER_COMMAND_WRMSR_ATTRIBUTES
Definition commands.h:321
#define DEBUGGER_COMMAND_P_ATTRIBUTES
Definition commands.h:389
#define DEBUGGER_COMMAND_SYM_ATTRIBUTES
Definition commands.h:428
#define DEBUGGER_COMMAND_PA2VA_ATTRIBUTES
Definition commands.h:327
#define DEBUGGER_COMMAND_HWDBG_HW_ATTRIBUTES
Definition commands.h:461
#define DEBUGGER_COMMAND_CPUID_ATTRIBUTES
Definition commands.h:349
#define DEBUGGER_COMMAND_REV_ATTRIBUTES
Definition commands.h:449
#define DEBUGGER_COMMAND_PMC_ATTRIBUTES
Definition commands.h:359
#define DEBUGGER_COMMAND_LISTEN_ATTRIBUTES
Definition commands.h:240
#define DEBUGGER_COMMAND_TEST_ATTRIBUTES
Definition commands.h:317
#define DEBUGGER_COMMAND_PREACTIVATE_ATTRIBUTES
Definition commands.h:436
#define DEBUGGER_COMMAND_OUTPUT_ATTRIBUTES
Definition commands.h:302
#define DEBUGGER_COMMAND_LBR_ATTRIBUTES
Definition commands.h:480
#define DEBUGGER_COMMAND_CORE_ATTRIBUTES
Definition commands.h:338
#define DEBUGGER_COMMAND_SCRIPT_ATTRIBUTES
Definition commands.h:299
#define DEBUGGER_COMMAND_RDMSR_ATTRIBUTES
Definition commands.h:323
#define DEBUGGER_COMMAND_PE_ATTRIBUTES
Definition commands.h:447
#define DEBUGGER_COMMAND_SWITCH_ATTRIBUTES
Definition commands.h:251
#define DEBUGGER_COMMAND_IOAPIC_ATTRIBUTES
Definition commands.h:336
#define DEBUGGER_COMMAND_MSRWRITE_ATTRIBUTES
Definition commands.h:355
#define DEBUGGER_COMMAND_RESTART_ATTRIBUTES
Definition commands.h:259
#define DEBUGGER_COMMAND_SETTINGS_ATTRIBUTES
Definition commands.h:275
#define DEBUGGER_COMMAND_VA2PA_ATTRIBUTES
Definition commands.h:325
#define DEBUGGER_COMMAND_UNHIDE_ATTRIBUTES
Definition commands.h:383
#define DEBUGGER_COMMAND_STATUS_ATTRIBUTES
Definition commands.h:287
#define DEBUGGER_COMMAND_PAUSE_ATTRIBUTES
Definition commands.h:255
#define DEBUGGER_COMMAND_LOGCLOSE_ATTRIBUTES
Definition commands.h:314
#define DEBUGGER_COMMAND_G_ATTRIBUTES
Definition commands.h:243
#define DEBUGGER_COMMAND_LOGOPEN_ATTRIBUTES
Definition commands.h:311
#define DEBUGGER_COMMAND_CONNECT_ATTRIBUTES
Definition commands.h:237
#define DEBUGGER_COMMAND_E_ATTRIBUTES
Definition commands.h:401
#define DEBUGGER_COMMAND_IOIN_ATTRIBUTES
Definition commands.h:365
#define DEBUGGER_COMMAND_SYMPATH_ATTRIBUTES
Definition commands.h:425
#define DEBUGGER_COMMAND_EXCEPTION_ATTRIBUTES
Definition commands.h:369
#define DEBUGGER_COMMAND_T_ATTRIBUTES
Definition commands.h:392
#define DEBUGGER_COMMAND_XSETBV_ATTRIBUTES
Definition commands.h:351
#define DEBUGGER_COMMAND_HWDBG_HW_CLK_ATTRIBUTES
Definition commands.h:463
#define DEBUGGER_COMMAND_LBRDUMP_ATTRIBUTES
Definition commands.h:483
#define DEBUGGER_COMMAND_MODE_ATTRIBUTES
Definition commands.h:377
#define DEBUGGER_COMMAND_SMI_ATTRIBUTES
Definition commands.h:477
#define DEBUGGER_COMMAND_LM_ATTRIBUTES
Definition commands.h:387
#define DEBUGGER_COMMAND_SYSRET_ATTRIBUTES
Definition commands.h:375
#define DEBUGGER_COMMAND_TRACE_ATTRIBUTES
Definition commands.h:379
#define DEBUGGER_COMMAND_UNLOAD_ATTRIBUTES
Definition commands.h:297
#define DEBUGGER_COMMAND_IDT_ATTRIBUTES
Definition commands.h:474
#define DEBUGGER_COMMAND_THREAD_ATTRIBUTES
Definition commands.h:266
#define DEBUGGER_COMMAND_EPTHOOK_ATTRIBUTES
Definition commands.h:345
#define DEBUGGER_COMMAND_SLEEP_ATTRIBUTES
Definition commands.h:269
#define DEBUGGER_COMMAND_PREALLOC_ATTRIBUTES
Definition commands.h:434
#define DEBUGGER_COMMAND_EPTHOOK2_ATTRIBUTES
Definition commands.h:347
#define DEBUGGER_COMMAND_MONITOR_ATTRIBUTES
Definition commands.h:341
#define DEBUGGER_COMMAND_PRINT_ATTRIBUTES
Definition commands.h:305
#define DEBUGGER_COMMAND_START_ATTRIBUTES
Definition commands.h:257
#define DEBUGGER_COMMAND_DOT_STATUS_ATTRIBUTES
Definition commands.h:284
#define DEBUGGER_COMMAND_DR_ATTRIBUTES
Definition commands.h:363
#define DEBUGGER_COMMAND_CLEAR_ATTRIBUTES
Command's attributes.
Definition commands.h:231
#define DEBUGGER_COMMAND_SYSCALL_ATTRIBUTES
Definition commands.h:373
#define DEBUGGER_COMMAND_GU_ATTRIBUTES
Definition commands.h:458
#define DEBUGGER_COMMAND_PROCESS_ATTRIBUTES
Definition commands.h:263
#define DEBUGGER_COMMAND_KILL_ATTRIBUTES
Definition commands.h:261
#define DEBUGGER_COMMAND_I_ATTRIBUTES
Definition commands.h:395
#define DEBUGGER_COMMAND_PT_ATTRIBUTES
Definition commands.h:486
#define DEBUGGER_COMMAND_CRWRITE_ATTRIBUTES
Definition commands.h:361
#define DEBUGGER_COMMAND_D_AND_U_ATTRIBUTES
Definition commands.h:398
#define DEBUGGER_COMMAND_PCITREE_ATTRIBUTES
Definition commands.h:468
#define DEBUGGER_COMMAND_CPU_ATTRIBUTES
Definition commands.h:319
#define DEBUGGER_COMMAND_MSRREAD_ATTRIBUTES
Definition commands.h:353
#define DEBUGGER_COMMAND_EVENTS_ATTRIBUTES
Definition commands.h:272
#define DEBUGGER_COMMAND_ATTACH_ATTRIBUTES
Definition commands.h:247
#define DEBUGGER_COMMAND_EXIT_ATTRIBUTES
Definition commands.h:291
#define DEBUGGER_COMMAND_EVAL_ATTRIBUTES
Definition commands.h:308
#define DEBUGGER_COMMAND_DETACH_ATTRIBUTES
Definition commands.h:249
#define DEBUGGER_COMMAND_TRACK_ATTRIBUTES
Definition commands.h:451
#define DEBUGGER_COMMAND_R_ATTRIBUTES
Definition commands.h:407
#define DEBUGGER_COMMAND_DEBUG_ATTRIBUTES
Definition commands.h:281
VOID CommandConnectHelp()
help of the .connect command
Definition connect.cpp:31
VOID CommandConnect(vector< CommandToken > CommandTokens, string Command)
.connect command handler
Definition connect.cpp:107
VOID CommandContinueHelp()
help of the continue command
Definition continue.cpp:20
VOID CommandContinue(vector< CommandToken > CommandTokens, string Command)
handler of continue command
Definition continue.cpp:47
VOID CommandCore(vector< CommandToken > CommandTokens, string Command)
~ command handler
Definition core.cpp:47
VOID CommandCoreHelp()
help of the ~ command
Definition core.cpp:26
VOID CommandCpuHelp()
help of the cpu command
Definition cpu.cpp:20
VOID CommandCpu(vector< CommandToken > CommandTokens, string Command)
cpu command handler
Definition cpu.cpp:36
VOID CommandCpuid(vector< CommandToken > CommandTokens, string Command)
!cpuid command handler
Definition cpuid.cpp:48
VOID CommandCpuidHelp()
help of the !cpuid command
Definition cpuid.cpp:20
VOID CommandCrwrite(vector< CommandToken > CommandTokens, string Command)
!crwrite command handler
Definition crwrite.cpp:47
VOID CommandCrwriteHelp()
help of the !crwrite command
Definition crwrite.cpp:20
VOID CommandReadMemoryAndDisassembler(vector< CommandToken > CommandTokens, string Command)
u* d* !u* !d* commands handler
Definition d-u.cpp:73
VOID CommandReadMemoryAndDisassemblerHelp()
help of u* d* !u* !d* commands
Definition d-u.cpp:26
VOID CommandDebugHelp()
help of the .debug command
Definition debug.cpp:25
VOID CommandDebug(vector< CommandToken > CommandTokens, string Command)
.debug command handler
Definition debug.cpp:235
VOID CommandDetachHelp()
help of the .detach command
Definition detach.cpp:26
VOID CommandDetach(vector< CommandToken > CommandTokens, string Command)
.detach command handler
Definition detach.cpp:72
VOID CommandDisconnectHelp()
help of the .disconnect command
Definition disconnect.cpp:28
VOID CommandDisconnect(vector< CommandToken > CommandTokens, string Command)
.disconnect command handler
Definition disconnect.cpp:45
VOID CommandDr(vector< CommandToken > CommandTokens, string Command)
!dr command handler
Definition dr.cpp:46
VOID CommandDrHelp()
help of the !dr command
Definition dr.cpp:20
VOID CommandStructHelp()
help of the struct command
Definition dt-struct.cpp:63
VOID CommandDtAndStruct(vector< CommandToken > CommandTokens, string Command)
dt and struct command handler
Definition dt-struct.cpp:429
VOID CommandDtHelp()
help of the dt command
Definition dt-struct.cpp:26
VOID CommandDumpHelp()
help of the .dump command
Definition dump.cpp:36
VOID CommandDump(vector< CommandToken > CommandTokens, string Command)
.dump command handler
Definition dump.cpp:62
VOID CommandEditMemoryHelp()
help of !e* and e* commands
Definition e.cpp:28
VOID CommandEditMemory(vector< CommandToken > CommandTokens, string Command)
!e* and e* commands handler
Definition e.cpp:269
VOID CommandEptHook2Help()
help of the !epthook2 command
Definition epthook2.cpp:20
VOID CommandEptHook2(vector< CommandToken > CommandTokens, string Command)
!epthook2 command handler
Definition epthook2.cpp:49
VOID CommandEptHookHelp()
help of the !epthook command
Definition epthook.cpp:20
VOID CommandEptHook(vector< CommandToken > CommandTokens, string Command)
!epthook command handler
Definition epthook.cpp:48
VOID CommandEval(vector< CommandToken > CommandTokens, string Command)
handler of ? command
Definition eval.cpp:196
VOID CommandEvalHelp()
help of the ? command
Definition eval.cpp:26
VOID CommandEventsHelp()
help of the events command
Definition events.cpp:33
VOID CommandEvents(vector< CommandToken > CommandTokens, string Command)
events command handler
Definition events.cpp:67
VOID CommandExceptionHelp()
help of the !exception command
Definition exception.cpp:20
VOID CommandException(vector< CommandToken > CommandTokens, string Command)
!exception command handler
Definition exception.cpp:51
VOID CommandExit(vector< CommandToken > CommandTokens, string Command)
exit command handler
Definition exit.cpp:46
VOID CommandExitHelp()
help of the exit command
Definition exit.cpp:29
VOID CommandFlushHelp()
help of the flush command
Definition flush.cpp:26
VOID CommandFlush(vector< CommandToken > CommandTokens, string Command)
flush command handler
Definition flush.cpp:111
VOID CommandFormats(vector< CommandToken > CommandTokens, string Command)
handler of .formats command
Definition formats.cpp:106
VOID CommandFormatsHelp()
help of the help command :)
Definition formats.cpp:20
VOID CommandG(vector< CommandToken > CommandTokens, string Command)
handler of g command
Definition g.cpp:94
VOID CommandGHelp()
help of the g command
Definition g.cpp:28
VOID CommandGg(vector< CommandToken > CommandTokens, string Command)
gg command handler
Definition gg.cpp:41
VOID CommandGgHelp()
help of the g command
Definition gg.cpp:20
VOID CommandGuHelp()
help of the gu command
Definition gu.cpp:29
VOID CommandGu(vector< CommandToken > CommandTokens, string Command)
handler of gu command
Definition gu.cpp:52
VOID CommandHide(vector< CommandToken > CommandTokens, string Command)
!hide command handler
Definition hide.cpp:395
VOID CommandHideHelp()
help of the !hide command
Definition hide.cpp:27
VOID CommandHwHelp()
help of the !hw command
Definition hw.cpp:25
VOID CommandHw(vector< CommandToken > CommandTokens, string Command)
!hw command handler
Definition hw.cpp:46
VOID CommandHwClkHelp()
help of the !hw_clk command
Definition hw_clk.cpp:25
VOID CommandHwClk(vector< CommandToken > CommandTokens, string Command)
!hw_clk command handler
Definition hw_clk.cpp:154
VOID CommandIHelp()
help of the i command
Definition i.cpp:27
VOID CommandI(vector< CommandToken > CommandTokens, string Command)
handler of i command
Definition i.cpp:56
VOID CommandIdt(vector< CommandToken > CommandTokens, string Command)
!idt command handler
Definition idt.cpp:115
VOID CommandIdtHelp()
help of the !idt command
Definition idt.cpp:27
VOID CommandInterruptHelp()
help of the !interrupt command
Definition interrupt.cpp:20
VOID CommandInterrupt(vector< CommandToken > CommandTokens, string Command)
!interrupt command handler
Definition interrupt.cpp:49
VOID CommandIoapicHelp()
help of the !ioapic command
Definition ioapic.cpp:20
VOID CommandIoapic(vector< CommandToken > CommandTokens, string Command)
!ioapic command handler
Definition ioapic.cpp:194
VOID CommandIoinHelp()
help of the !ioin command
Definition ioin.cpp:20
VOID CommandIoin(vector< CommandToken > CommandTokens, string Command)
!ioin command handler
Definition ioin.cpp:48
VOID CommandIooutHelp()
help of the !ioout command
Definition ioout.cpp:20
VOID CommandIoout(vector< CommandToken > CommandTokens, string Command)
!ioout command handler
Definition ioout.cpp:48
VOID CommandKHelp()
help of the k command
Definition k.cpp:26
VOID CommandK(vector< CommandToken > CommandTokens, string Command)
k command handler
Definition k.cpp:56
VOID CommandKill(vector< CommandToken > CommandTokens, string Command)
.kill command handler
Definition kill.cpp:42
VOID CommandKillHelp()
help of the .kill command
Definition kill.cpp:26
VOID CommandLbrHelp()
help of the !lbr command
Definition lbr.cpp:26
VOID CommandLbr(vector< CommandToken > CommandTokens, string Command)
!lbr command handler
Definition lbr.cpp:329
VOID CommandLbrdump(vector< CommandToken > CommandTokens, string Command)
!lbrdump command handler
Definition lbrdump.cpp:240
VOID CommandLbrdumpHelp()
help of the !lbrdump command
Definition lbrdump.cpp:82
VOID CommandListenHelp()
help of the listen command
Definition listen.cpp:29
VOID CommandListen(vector< CommandToken > CommandTokens, string Command)
listen command handler
Definition listen.cpp:54
VOID CommandLm(vector< CommandToken > CommandTokens, string Command)
handle lm command
Definition lm.cpp:358
VOID CommandLmHelp()
help of the lm command
Definition lm.cpp:28
VOID CommandLoad(vector< CommandToken > CommandTokens, string Command)
load command handler
Definition load.cpp:50
VOID CommandLoadHelp()
help of the load command
Definition load.cpp:28
VOID CommandLogclose(vector< CommandToken > CommandTokens, string Command)
.logclose command handler
Definition logclose.cpp:42
VOID CommandLogcloseHelp()
help .logclose command
Definition logclose.cpp:26
VOID CommandLogopenHelp()
help of the .logopen command
Definition logopen.cpp:28
VOID CommandLogopen(vector< CommandToken > CommandTokens, string Command)
.logopen command handler
Definition logopen.cpp:48
VOID CommandMeasure(vector< CommandToken > CommandTokens, string Command)
!measure command handler
Definition measure.cpp:56
VOID CommandMeasureHelp()
help of the !measure command
Definition measure.cpp:33
VOID CommandModeHelp()
help of the !mode command
Definition mode.cpp:20
VOID CommandMode(vector< CommandToken > CommandTokens, string Command)
!mode command handler
Definition mode.cpp:49
VOID CommandMonitorHelp()
help of the !monitor command
Definition monitor.cpp:20
VOID CommandMonitor(vector< CommandToken > CommandTokens, string Command)
!monitor command handler
Definition monitor.cpp:62
VOID CommandMsrreadHelp()
help of the !msrread command
Definition msrread.cpp:20
VOID CommandMsrread(vector< CommandToken > CommandTokens, string Command)
!msrread command handler
Definition msrread.cpp:47
VOID CommandMsrwriteHelp()
help of the !msrwrite command
Definition msrwrite.cpp:20
VOID CommandMsrwrite(vector< CommandToken > CommandTokens, string Command)
!msrwrite command handler
Definition msrwrite.cpp:47
VOID CommandOutputHelp()
help of the output command
Definition output.cpp:26
VOID CommandOutput(vector< CommandToken > CommandTokens, string Command)
output command handler
Definition output.cpp:58
VOID CommandPHelp()
help of the p command
Definition p.cpp:27
VOID CommandP(vector< CommandToken > CommandTokens, string Command)
handler of p command
Definition p.cpp:53
VOID CommandPa2va(vector< CommandToken > CommandTokens, string Command)
!pa2va command handler
Definition pa2va.cpp:50
VOID CommandPa2vaHelp()
help of the !pa2va command
Definition pa2va.cpp:27
VOID CommandPageinHelp()
help of the .pagein command
Definition pagein.cpp:27
VOID CommandPagein(vector< CommandToken > CommandTokens, string Command)
.pagein command handler
Definition pagein.cpp:266
VOID CommandPauseHelp()
help of the pause command
Definition pause.cpp:27
VOID CommandPause(vector< CommandToken > CommandTokens, string Command)
pause command handler
Definition pause.cpp:71
VOID CommandPcicamHelp()
!pcicam command help
Definition pcicam.cpp:26
VOID CommandPcicam(vector< CommandToken > CommandTokens, string Command)
!pcicam command handler
Definition pcicam.cpp:47
VOID CommandPcitree(vector< CommandToken > CommandTokens, string Command)
!pcitree command handler
Definition pcitree.cpp:45
VOID CommandPcitreeHelp()
help of the !pcitree command
Definition pcitree.cpp:26
VOID CommandPe(vector< CommandToken > CommandTokens, string Command)
.pe command handler
Definition pe.cpp:42
VOID CommandPeHelp()
help of the .pe command
Definition pe.cpp:20
VOID CommandPmcHelp()
help of the !pmc command
Definition pmc.cpp:20
VOID CommandPmc(vector< CommandToken > CommandTokens, string Command)
!pmc command handler
Definition pmc.cpp:46
VOID CommandPreactivateHelp()
help of the preactivate command
Definition preactivate.cpp:26
VOID CommandPreactivate(vector< CommandToken > CommandTokens, string Command)
preactivate command handler
Definition preactivate.cpp:49
VOID CommandPreallocHelp()
help of the prealloc command
Definition prealloc.cpp:25
VOID CommandPrealloc(vector< CommandToken > CommandTokens, string Command)
prealloc command handler
Definition prealloc.cpp:60
VOID CommandPrintHelp()
help of the print command
Definition print.cpp:23
VOID CommandPrint(vector< CommandToken > CommandTokens, string Command)
handler of print command
Definition print.cpp:42
VOID CommandProcessHelp()
help of the .process command
Definition process.cpp:25
VOID CommandProcess(vector< CommandToken > CommandTokens, string Command)
.process command handler
Definition process.cpp:57
VOID CommandPtHelp()
help of the !pt command
Definition pt.cpp:26
VOID CommandPt(vector< CommandToken > CommandTokens, string Command)
!pt command handler
Definition pt.cpp:321
VOID CommandPte(vector< CommandToken > CommandTokens, string Command)
!pte command handler
Definition pte.cpp:93
VOID CommandPteHelp()
help of the !pte command
Definition pte.cpp:27
VOID CommandRHelp()
help of the r command
Definition r.cpp:152
VOID CommandR(vector< CommandToken > CommandTokens, string Command)
handler of r command
Definition r.cpp:452
VOID CommandRdmsr(vector< CommandToken > CommandTokens, string Command)
rdmsr command handler
Definition rdmsr.cpp:120
VOID CommandRdmsrHelp()
help of the rdmsr command
Definition rdmsr.cpp:25
VOID CommandRestart(vector< CommandToken > CommandTokens, string Command)
.restart command handler
Definition restart.cpp:47
VOID CommandRestartHelp()
help of the .restart command
Definition restart.cpp:29
VOID CommandRevHelp()
help of the !rev command
Definition rev.cpp:26
VOID CommandRev(vector< CommandToken > CommandTokens, string Command)
!rev command handler
Definition rev.cpp:50
VOID CommandSearchMemoryHelp()
help of !s* s* commands
Definition s.cpp:27
VOID CommandSearchMemory(vector< CommandToken > CommandTokens, string Command)
!s* s* commands handler
Definition s.cpp:141
VOID CommandScriptHelp()
help of the .script command
Definition script.cpp:27
VOID CommandScript(vector< CommandToken > CommandTokens, string Command)
.script command handler
Definition script.cpp:263
VOID CommandSettingsHelp()
help of the settings command
Definition settings.cpp:29
VOID CommandSettings(vector< CommandToken > CommandTokens, string Command)
settings command handler
Definition settings.cpp:553
VOID CommandSleep(vector< CommandToken > CommandTokens, string Command)
sleep command help
Definition sleep.cpp:38
VOID CommandSleepHelp()
help of the sleep command
Definition sleep.cpp:20
VOID CommandSmi(vector< CommandToken > CommandTokens, string Command)
!smi command handler
Definition smi.cpp:123
VOID CommandSmiHelp()
help of the !smi command
Definition smi.cpp:26
VOID CommandStartHelp()
help of the .start command
Definition start.cpp:27
VOID CommandStart(vector< CommandToken > CommandTokens, string Command)
.start command handler
Definition start.cpp:47
VOID CommandStatus(vector< CommandToken > CommandTokens, string Command)
.status and status command handler
Definition status.cpp:51
VOID CommandStatusHelp()
help of the .status command
Definition status.cpp:31
VOID CommandSwitch(vector< CommandToken > CommandTokens, string Command)
.switch command handler
Definition switch.cpp:45
VOID CommandSwitchHelp()
help of the .switch command
Definition switch.cpp:20
VOID CommandSymHelp()
help of the .sym command
Definition sym.cpp:26
VOID CommandSym(vector< CommandToken > CommandTokens, string Command)
.sym command handler
Definition sym.cpp:56
VOID CommandSympath(vector< CommandToken > CommandTokens, string Command)
.sympath command handler
Definition sympath.cpp:45
VOID CommandSympathHelp()
help of the .sympath command
Definition sympath.cpp:24
VOID CommandSyscallAndSysret(vector< CommandToken > CommandTokens, string Command)
!syscall, !syscall2 and !sysret, !sysret2 commands handler
Definition syscall-sysret.cpp:85
VOID CommandSysretHelp()
help of the !sysret command
Definition syscall-sysret.cpp:54
VOID CommandSyscallHelp()
help of the !syscall command
Definition syscall-sysret.cpp:20
VOID CommandTHelp()
help of the t command
Definition t.cpp:27
VOID CommandT(vector< CommandToken > CommandTokens, string Command)
handler of t command
Definition t.cpp:53
VOID CommandTest(vector< CommandToken > CommandTokens, string Command)
test command handler
Definition test.cpp:434
VOID CommandTestHelp()
help of the test command
Definition test.cpp:26
VOID CommandThreadHelp()
help of the .thread command
Definition thread.cpp:25
VOID CommandThread(vector< CommandToken > CommandTokens, string Command)
.thread command handler
Definition thread.cpp:120
VOID CommandTraceHelp()
help of the !trace command
Definition trace.cpp:20
VOID CommandTrace(vector< CommandToken > CommandTokens, string Command)
!trace command handler
Definition trace.cpp:51
VOID CommandTrack(vector< CommandToken > CommandTokens, string Command)
handler of !track command
Definition track.cpp:60
VOID CommandTrackHelp()
help of the !track command
Definition track.cpp:36
VOID CommandTsc(vector< CommandToken > CommandTokens, string Command)
handler of !tsc command
Definition tsc.cpp:46
VOID CommandTscHelp()
help of the !tsc command
Definition tsc.cpp:20
VOID CommandUnhide(vector< CommandToken > CommandTokens, string Command)
!unhide command handler
Definition unhide.cpp:100
VOID CommandUnhideHelp()
help of the !unhide command
Definition unhide.cpp:25
VOID CommandUnloadHelp()
help of the unload command
Definition unload.cpp:30
VOID CommandUnload(vector< CommandToken > CommandTokens, string Command)
unload command handler
Definition unload.cpp:82
VOID CommandVa2pa(vector< CommandToken > CommandTokens, string Command)
!va2pa command handler
Definition va2pa.cpp:51
VOID CommandVa2paHelp()
help of the !va2pa command
Definition va2pa.cpp:27
VOID CommandVmcallHelp()
help of the !vmcall command
Definition vmcall.cpp:20
VOID CommandVmcall(vector< CommandToken > CommandTokens, string Command)
!vmcall command handler
Definition vmcall.cpp:46
VOID CommandWrmsr(vector< CommandToken > CommandTokens, string Command)
wrmsr command handler
Definition wrmsr.cpp:47
VOID CommandWrmsrHelp()
help of the wrmsr command
Definition wrmsr.cpp:25
VOID CommandX(vector< CommandToken > CommandTokens, string Command)
x command handler
Definition x.cpp:41
VOID CommandXHelp()
help of the x command
Definition x.cpp:20
VOID CommandXsetbvHelp()
help of the !xsetbv command
Definition xsetbv.cpp:20
VOID CommandXsetbv(vector< CommandToken > CommandTokens, string Command)
!xsetbv command handler
Definition xsetbv.cpp:47

◆ InitializeDebugger()

VOID InitializeDebugger ( )

Initialize the debugger and adjust commands for the first run.

Returns
VOID
1289{
1290 //
1291 // Initialize the mapping of functions
1292 //
1294
1295 //
1296 // Set the callback for symbol message handler
1297 //
1298 //
1299 // ShowMessages is passed as PVOID (the callback API stores it in a PVOID and
1300 // casts to the concrete fn-ptr type at the invocation site); g++ requires the
1301 // explicit function-pointer -> void* cast that MSVC performs implicitly.
1302 //
1304
1305 //
1306 // Register the CTRL+C and CTRL+BREAK Signals handler
1307 //
1309 {
1310 ShowMessages("err, when registering CTRL+C and CTRL+BREAK Signals "
1311 "handler\n");
1312 //
1313 // prefer to continue
1314 //
1315 }
1316
1317 //
1318 // *** Check for feature indicators ***
1319 //
1320
1321 //
1322 // Get x86 processor width for virtual address
1323 //
1325
1326 //
1327 // Check if processor supports TSX (RTM)
1328 //
1330
1331 //
1332 // Load default settings
1333 //
1335}
BOOL BreakController(DWORD CtrlType)
handle CTRL+C and CTRL+Break events
Definition break-control.cpp:34
void * PVOID
Definition BasicTypes.h:56
BOOLEAN CheckCpuSupportRtm()
Check whether the processor supports RTM or not.
Definition common.cpp:950
UINT32 Getx86VirtualAddressWidth()
Get virtual address width for x86 processors.
Definition common.cpp:932
UINT32 g_VirtualAddressWidth
Virtual address width for x86 processors.
Definition globals.h:50
BOOLEAN g_RtmSupport
check for RTM support
Definition globals.h:44
VOID InitializeCommandsDictionary()
Initialize commands and attributes.
Definition interpreter.cpp:1343
BOOLEAN PlatformInstallCtrlHandler(PLATFORM_CTRL_HANDLER Handler)
VOID ScriptEngineSetTextMessageCallbackWrapper(PVOID Handler)
ScriptEngineSetTextMessageCallback wrapper.
Definition script-engine-wrapper.cpp:81
VOID CommandSettingsLoadDefaultValuesFromConfigFile()
Loads default settings values from config file.
Definition settings.cpp:161

◆ InterpreterRemoveComments()

VOID InterpreterRemoveComments ( CHAR * CommandText)

Remove batch comments.

Parameters
CommandText

deprecated, not used anymore

Returns
VOID
1021{
1022 BOOLEAN IsComment = FALSE;
1023 BOOLEAN IsOnBracketString = FALSE;
1024 BOOLEAN IsOnString = FALSE;
1025 UINT32 LengthOfCommand = (UINT32)strlen(CommandText);
1026
1027 for (SIZE_T i = 0; i < LengthOfCommand; i++)
1028 {
1029 if (IsComment)
1030 {
1031 if (CommandText[i] == '\n')
1032 {
1033 IsComment = FALSE;
1034 }
1035 else
1036 {
1037 if (CommandText[i] != '\0')
1038 {
1039 memmove((PVOID)&CommandText[i], (const PVOID)&CommandText[i + 1], strlen(CommandText) - i);
1040 i--;
1041 }
1042 }
1043 }
1044 else if (CommandText[i] == '#' && !IsOnString)
1045 {
1046 //
1047 // Comment detected
1048 //
1049 IsComment = TRUE;
1050 i--;
1051 }
1052 else if (CommandText[i] == '#' && !IsOnString)
1053 {
1054 //
1055 // Comment detected
1056 //
1057 IsComment = TRUE;
1058 i--;
1059 }
1060 else if (CommandText[i] == '"')
1061 {
1062 if (i != 0 && CommandText[i - 1] == '\\')
1063 {
1064 //
1065 // It's an escape character for : \"
1066 //
1067 }
1068 else if (IsOnString)
1069 {
1070 IsOnString = FALSE;
1071 }
1072 else
1073 {
1074 IsOnString = TRUE;
1075 }
1076 }
1077 }
1078}

Variable Documentation

◆ g_ActiveProcessDebuggingState

ACTIVE_DEBUGGING_PROCESS g_ActiveProcessDebuggingState
extern

State of active debugging thread.

372{0};

◆ g_BreakPrintingOutput

BOOLEAN g_BreakPrintingOutput
extern

Shows whether the pause command or CTRL+C or CTRL+Break is executed or not.

◆ g_CommandsList

CommandType g_CommandsList
extern

List of command and attributes.

◆ g_CurrentRemoteCore

ULONG g_CurrentRemoteCore
extern

Current core that the debuggee is debugging.

◆ g_ExecutingScript

BOOLEAN g_ExecutingScript
extern

Shows whether the target is executing a script form '.script' command or executing script by an argument.

◆ g_InterpreterCountOfOpenCurlyBrackets

UINT32 g_InterpreterCountOfOpenCurlyBrackets
extern

Keeps the trace of curly brackets in the interpreter.

◆ g_IsCommandListInitialized

BOOLEAN g_IsCommandListInitialized
extern

Is list of command initialized.

◆ g_IsConnectedToRemoteDebuggee

BOOLEAN g_IsConnectedToRemoteDebuggee
extern

Shows whether the current debugger is the host and connected to a remote debuggee (guest).

◆ g_IsInterpreterOnString

BOOLEAN g_IsInterpreterOnString
extern

shows whether the interpreter is currently on a string or not

◆ g_IsInterpreterPreviousCharacterABackSlash

BOOLEAN g_IsInterpreterPreviousCharacterABackSlash
extern

Is interpreter encountered a back slash at previous run.

◆ g_IsSerialConnectedToRemoteDebuggee

BOOLEAN g_IsSerialConnectedToRemoteDebuggee
extern

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

◆ g_LogOpened

BOOLEAN g_LogOpened
extern

Shows whether the '.logopen' command is executed and the log file is open or not.

◆ g_RtmSupport

BOOLEAN g_RtmSupport
extern

check for RTM support

◆ g_ServerIp

string g_ServerIp
extern

In debugger (not debuggee), we save the port of server debuggee in this variable to use it later e.g, in signature.

◆ g_ServerPort

string g_ServerPort
extern

In debugger (not debuggee), we save the port of server debuggee in this variable to use it later e.g, in signature.

◆ g_ShouldPreviousCommandBeContinued

BOOLEAN g_ShouldPreviousCommandBeContinued
extern

Shows whether the previous command should be continued or not.

◆ g_VirtualAddressWidth

UINT32 g_VirtualAddressWidth
extern

Virtual address width for x86 processors.