51{
54 UINT64 TargetPa;
57
58 if (CommandTokens.size() == 1 || CommandTokens.size() >= 5 || CommandTokens.size() == 3)
59 {
60 ShowMessages("incorrect use of the '%s'\n\n",
62
64 return;
65 }
66
67
68
69
70
72 {
74 }
75
76 if (CommandTokens.size() == 2)
77 {
78
79
80
82 {
83
84
85
86 ShowMessages("err, couldn't resolve error at '%s'\n",
88 return;
89 }
90 }
91 else
92 {
93
94
95
97 {
99 {
100 ShowMessages("incorrect address, please enter a valid process id\n");
101 return;
102 }
104 {
105
106
107
108 ShowMessages("err, couldn't resolve error at '%s'\n",
110 return;
111 }
112 }
114 {
116 {
117
118
119
120 ShowMessages("err, couldn't resolve error at '%s'\n",
122
123 return;
124 }
126 {
127 ShowMessages("incorrect address, please enter a valid process id\n");
128 return;
129 }
130 }
131 else
132 {
133 ShowMessages("incorrect use of the '%s'\n\n",
136 return;
137 }
138 }
139
140
141
142
143
147
149 {
150
151
152
153 if (Pid != 0)
154 {
156 return;
157 }
158
159
160
161
162
164 }
165 else
166 {
168
169 if (Pid == 0)
170 {
171 Pid = GetCurrentProcessId();
173 }
174
175
176
177
178 Status = DeviceIoControl(
181 &AddressDetails,
183 &AddressDetails,
185
186 &ReturnedLength,
187 NULL
188 );
189
190 if (!Status)
191 {
192 ShowMessages("ioctl failed with code 0x%x\n", GetLastError());
193 return;
194 }
195
197 {
198
199
200
202 }
203 else
204 {
205
206
207
209 }
210 }
211}
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 KdSendVa2paAndPa2vaPacketToDebuggee(PDEBUGGER_VA2PA_AND_PA2VA_COMMANDS Va2paAndPa2vaPacket)
Sends VA2PA and PA2VA packest, or '!va2pa' and '!pa2va' commands packet to the debuggee.
Definition kd.cpp:965
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 CommandPa2vaHelp()
help of the !pa2va command
Definition pa2va.cpp:27
BOOLEAN IsVirtual2Physical
Definition RequestStructures.h:89
UINT32 KernelStatus
Definition RequestStructures.h:90
UINT64 PhysicalAddress
Definition RequestStructures.h:87
UINT32 ProcessId
Definition RequestStructures.h:88
UINT64 VirtualAddress
Definition RequestStructures.h:86
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