49{
55 UINT32 ActionBreakToDebuggerLength = 0;
56 UINT32 ActionCustomCodeLength = 0;
57 UINT32 ActionScriptLength = 0;
59 UINT64 OptionalParam1 = 0;
61
62 if (CommandTokens.size() < 2)
63 {
64 ShowMessages("incorrect use of the '%s'\n\n",
66
68 return;
69 }
70
71
72
73
75 &CommandTokens,
77 &Event,
78 &EventLength,
79 &ActionBreakToDebugger,
80 &ActionBreakToDebuggerLength,
81 &ActionCustomCode,
82 &ActionCustomCodeLength,
83 &ActionScript,
84 &ActionScriptLength,
85 &EventParsingErrorCause))
86 {
87 return;
88 }
89
90
91
92
94 {
95 ShowMessages("the utilization of 'post' or 'all' event calling stages is not meaningful "
96 "for the hidden hook; therefore, this command does not support them\n");
97
99 return;
100 }
101
102
103
104
105 for (auto Section : CommandTokens)
106 {
108 {
109 continue;
110 }
111 else if (!GetAddress)
112 {
113
114
115
118 &OptionalParam1))
119 {
120
121
122
123 ShowMessages("err, couldn't resolve error at '%s'\n\n",
126
128 return;
129 }
130 else
131 {
133 }
134 }
135 else
136 {
137
138
139
140 ShowMessages("unknown parameter '%s'\n\n",
143
145 return;
146 }
147 }
148 if (OptionalParam1 == 0)
149 {
150 ShowMessages("please choose an address to put the hidden breakpoint on it\n");
151
153 return;
154 }
155
156
157
158
160
161
162
163
165 {
166
167
168
169
170
171
173 return;
174 }
175
176
177
178
180 ActionBreakToDebugger,
181 ActionBreakToDebuggerLength,
182 ActionCustomCode,
183 ActionCustomCodeLength,
184 ActionScript,
185 ActionScriptLength))
186 {
187
188
189
190
192 return;
193 }
194}
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 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 CommandEptHookHelp()
help of the !epthook command
Definition epthook.cpp:20
NULL()
Definition test-case-generator.py:530
UINT64 OptionalParam1
Definition Events.h:277
DEBUGGER_EVENT_OPTIONS Options
Definition Events.h:396
VMM_CALLBACK_EVENT_CALLING_STAGE_TYPE EventStage
Definition Events.h:374
BOOLEAN SymbolConvertNameOrExprToAddress(const string &TextToConvert, PUINT64 Result)
check and convert string to a 64 bit unsigned integer and also check for symbol object names and eval...
Definition symbol.cpp:359