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

!hw command More...

#include "pch.h"

Functions

VOID CommandHwHelp ()
 help of the !hw command
VOID CommandHw (vector< CommandToken > CommandTokens, string Command)
 !hw command handler

Variables

BOOLEAN g_HwdbgInstanceInfoIsValid
 Shows whether the instance info is valid (received) or not.

Detailed Description

!hw command

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.11
Date
2024-09-29

Function Documentation

◆ CommandHw()

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

!hw command handler

Parameters
CommandTokens
Command
Returns
VOID
47{
48 if (CommandTokens.size() >= 2 && CompareLowerCaseStrings(CommandTokens.at(1), "script"))
49 {
50 //
51 // Perform test with default file path and initial BRAM buffer size
52 //
57 }
58 else if (CommandTokens.size() >= 2 &&
59 (CompareLowerCaseStrings(CommandTokens.at(1), "eval") || CompareLowerCaseStrings(CommandTokens.at(1), "evaluation")))
60 {
61 //
62 // Perform test evaluation
63 //
65 }
66 else if (CommandTokens.size() == 2 && CompareLowerCaseStrings(CommandTokens.at(1), "unload"))
67 {
68 //
69 // Unload the script
70 //
72 }
73 else
74 {
75 ShowMessages("incorrect use of the '%s'\n\n",
76 GetCaseSensitiveStringFromCommandToken(CommandTokens.at(0)).c_str());
78 return;
79 }
80}
#define FALSE
Definition BasicTypes.h:113
#define HWDBG_TEST_WRITE_SCRIPT_BUFFER_PATH
Path to write the sample of the script buffer.
Definition HardwareDebugger.h:48
#define HWDBG_TEST_READ_INSTANCE_INFO_PATH
Path to read the sample of the instance info.
Definition HardwareDebugger.h:42
#define DEFAULT_INITIAL_BRAM_BUFFER_SIZE
Initial default buffer size (BRAN Size).
Definition HardwareDebugger.h:36
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
VOID CommandHwHelp()
help of the !hw command
Definition hw.cpp:25
BOOLEAN g_HwdbgInstanceInfoIsValid
Shows whether the instance info is valid (received) or not.
Definition globals.h:697
BOOLEAN HwdbgScriptRunScript(const CHAR *Script, const TCHAR *InstanceFilePathToRead, const TCHAR *HardwareScriptFilePathToSave, UINT32 InitialBramBufferSize)
Run script in hwdbg.
Definition hwdbg-scripts.cpp:460
VOID ScriptEngineWrapperTestParserForHwdbg(const string &Expr)
test parser for hwdbg
Definition script-engine-wrapper.cpp:752

◆ CommandHwHelp()

VOID CommandHwHelp ( )

help of the !hw command

Returns
VOID
26{
27 ShowMessages("!hw : runs a hardware script in the target device.\n\n");
28
29 ShowMessages("syntax : \t!hw script [script { Script (string) }]\n");
30 ShowMessages("syntax : \t!hw script [unload]\n");
31
32 ShowMessages("\n");
33 ShowMessages("\t\te.g : !hw script { @hw_pin1 = 0; }\n");
34 ShowMessages("\t\te.g : !hw unload\n");
35}

Variable Documentation

◆ g_HwdbgInstanceInfoIsValid

BOOLEAN g_HwdbgInstanceInfoIsValid
extern

Shows whether the instance info is valid (received) or not.