94{
97 UINT64 TargetVa;
100
101 if (CommandTokens.size() == 1 || CommandTokens.size() >= 5 ||
102 CommandTokens.size() == 3)
103 {
104 ShowMessages("incorrect use of the '%s'\n\n",
107 return;
108 }
109
110
111
112
113
115 {
117 }
118
119 if (CommandTokens.size() == 2)
120 {
121
122
123
125 {
126
127
128
129 ShowMessages("err, couldn't resolve error at '%s'\n",
131 return;
132 }
133 }
134 else
135 {
136
137
138
140 {
142 {
143 ShowMessages("incorrect address, please enter a valid process id\n");
144 return;
145 }
146
148 {
149
150
151
152 ShowMessages("err, couldn't resolve error at '%s'\n",
154 return;
155 }
156 }
158 {
160 {
161
162
163
164 ShowMessages("err, couldn't resolve error at '%s'\n\n",
166 return;
167 }
168
170 {
171 ShowMessages("incorrect address, please enter a valid process id\n");
172 return;
173 }
174 }
175 else
176 {
177 ShowMessages("incorrect use of the '%s'\n\n",
180 return;
181 }
182 }
183
184
185
186
187
190
192 {
193
194
195
196 if (Pid != 0)
197 {
199 return;
200 }
201
202
203
204
205
207 }
208 else
209 {
211
212 if (Pid == 0)
213 {
214 Pid = GetCurrentProcessId();
216 }
217
218
219
220
221 Status = DeviceIoControl(
224 &AddressDetails,
226 &AddressDetails,
228
229 &ReturnedLength,
230 NULL
231 );
232
233 if (!Status)
234 {
235 ShowMessages("ioctl failed with code 0x%x\n", GetLastError());
236 return;
237 }
238
240 {
242 return;
243 }
244
245
246
247
249 }
250}
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
Shows if the debugger was connected to remote debuggee over (A remote guest).
Definition globals.h:253
ACTIVE_DEBUGGING_PROCESS g_ActiveProcessDebuggingState
State of active debugging thread.
Definition globals.h:372
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 ConvertTokenToUInt32(CommandToken TargetToken, PUINT32 Result)
check and convert command token to a 32 bit unsigned integer
Definition common.cpp:546
BOOLEAN ShowErrorMessage(UINT32 Error)
shows the error message
Definition debugger.cpp:40
BOOLEAN KdSendPtePacketToDebuggee(PDEBUGGER_READ_PAGE_TABLE_ENTRIES_DETAILS PtePacket)
Sends a PTE or '!pte' command packet to the debuggee.
Definition kd.cpp:907
HANDLE g_DeviceHandle
Holds the global handle of device which is used to send the request to the kernel by IOCTL,...
Definition globals.h:481
BOOLEAN g_IsKdModuleLoaded
shows whether the kernel debugger (KD) module is loaded or not
Definition globals.h:22
VOID CommandPteHelp()
help of the !pte command
Definition pte.cpp:27
VOID CommandPteShowResults(UINT64 TargetVa, PDEBUGGER_READ_PAGE_TABLE_ENTRIES_DETAILS PteRead)
show results of !pte command
Definition pte.cpp:48
UINT64 VirtualAddress
Definition RequestStructures.h:55
UINT32 ProcessId
Definition RequestStructures.h:56
UINT32 KernelStatus
Definition RequestStructures.h:70
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