50{
56 UINT32 ActionBreakToDebuggerLength = 0;
57 UINT32 ActionCustomCodeLength = 0;
58 UINT32 ActionScriptLength = 0;
59 UINT64 SpecialTarget = 0;
62
63
64
65
66
68 &CommandTokens,
70 &Event,
71 &EventLength,
72 &ActionBreakToDebugger,
73 &ActionBreakToDebuggerLength,
74 &ActionCustomCode,
75 &ActionCustomCodeLength,
76 &ActionScript,
77 &ActionScriptLength,
78 &EventParsingErrorCause))
79 {
80 return;
81 }
82
83
84
85
86
87 for (auto Section : CommandTokens)
88 {
90 {
91 continue;
92 }
93 else if (!GetEntry)
94 {
95
96
97
99 {
100
101
102
103 ShowMessages("unknown parameter '%s'\n\n",
106
108 return;
109 }
110 else
111 {
112
113
114
115 if (!(SpecialTarget >= 32 && SpecialTarget <= 0xff))
116 {
117
118
119
120
121 ShowMessages("the entry should be between 0x20 to 0xFF or the "
122 "entries between 32 to 255\n\n");
124
126 return;
127 }
129 }
130 }
131 else
132 {
133
134
135
136 ShowMessages("unknown parameter '%s'\n\n",
139
141 return;
142 }
143 }
144
145 if (SpecialTarget == 0)
146 {
147
148
149
150
151
152 ShowMessages("please specify an interrupt index to monitor, HyperDbg "
153 "doesn't support to trigger events on all interrupts because "
154 "it's not reasonable and make the system unresponsive\n");
156
158 return;
159 }
160
161
162
163
165
166
167
168
170 {
171
172
173
174
175
176
178 return;
179 }
180
181
182
183
185 ActionBreakToDebugger,
186 ActionBreakToDebuggerLength,
187 ActionCustomCode,
188 ActionCustomCodeLength,
189 ActionScript,
190 ActionScriptLength))
191 {
192
193
194
195
197 return;
198 }
199}
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 ConvertTokenToUInt64(CommandToken TargetToken, PUINT64 Result)
add ` between 64 bit values and convert them to string
Definition common.cpp:447
VOID FreeEventsAndActionsMemory(PDEBUGGER_GENERAL_EVENT_DETAIL Event, PDEBUGGER_GENERAL_ACTION ActionBreakToDebugger, PDEBUGGER_GENERAL_ACTION ActionCustomCode, PDEBUGGER_GENERAL_ACTION ActionScript)
Deallocate buffers relating to events and actions.
Definition debugger.cpp:1688
BOOLEAN InterpretGeneralEventAndActionsFields(vector< CommandToken > *CommandTokens, VMM_EVENT_TYPE_ENUM EventType, PDEBUGGER_GENERAL_EVENT_DETAIL *EventDetailsToFill, PUINT32 EventBufferLength, PDEBUGGER_GENERAL_ACTION *ActionDetailsToFillBreakToDebugger, PUINT32 ActionBufferLengthBreakToDebugger, PDEBUGGER_GENERAL_ACTION *ActionDetailsToFillCustomCode, PUINT32 ActionBufferLengthCustomCode, PDEBUGGER_GENERAL_ACTION *ActionDetailsToFillScript, PUINT32 ActionBufferLengthScript, PDEBUGGER_EVENT_PARSING_ERROR_CAUSE ReasonForErrorInParsing)
Interpret general event fields.
Definition debugger.cpp:1736
BOOLEAN SendEventToKernel(PDEBUGGER_GENERAL_EVENT_DETAIL Event, UINT32 EventBufferLength)
Register the event to the kernel.
Definition debugger.cpp:1367
BOOLEAN RegisterActionToEvent(PDEBUGGER_GENERAL_EVENT_DETAIL Event, PDEBUGGER_GENERAL_ACTION ActionBreakToDebugger, UINT32 ActionBreakToDebuggerLength, PDEBUGGER_GENERAL_ACTION ActionCustomCode, UINT32 ActionCustomCodeLength, PDEBUGGER_GENERAL_ACTION ActionScript, UINT32 ActionScriptLength)
Register the action to the event.
Definition debugger.cpp:1483
VOID CommandInterruptHelp()
help of the !interrupt command
Definition interrupt.cpp:20
NULL()
Definition test-case-generator.py:530
UINT64 OptionalParam1
Definition Events.h:277
DEBUGGER_EVENT_OPTIONS Options
Definition Events.h:396