52{
55 UINT64 TargetVa;
58
59 if (CommandTokens.size() == 1 || CommandTokens.size() >= 5 || CommandTokens.size() == 3)
60 {
61 ShowMessages("incorrect use of the '%s'\n\n",
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 }
103
105 {
106
107
108
109 ShowMessages("err, couldn't resolve error at '%s'\n",
111 return;
112 }
113 }
115 {
117 {
118
119
120
121 ShowMessages("err, couldn't resolve error at '%s'\n",
123 return;
124 }
125
127 {
128 ShowMessages("incorrect address, please enter a valid process id\n");
129 return;
130 }
131 }
132 else
133 {
134 ShowMessages("incorrect use of the '%s'\n\n",
137 return;
138 }
139 }
140
141
142
143
144
148
150 {
151
152
153
154 if (Pid != 0)
155 {
157 return;
158 }
159
160
161
162
163
165 }
166 else
167 {
169
170 if (Pid == 0)
171 {
172 Pid = GetCurrentProcessId();
174 }
175
176
177
178
179 Status = DeviceIoControl(
182 &AddressDetails,
184 &AddressDetails,
186
187 &ReturnedLength,
188 NULL
189 );
190
191 if (!Status)
192 {
193 ShowMessages("ioctl failed with code 0x%x\n", GetLastError());
194 return;
195 }
196
198 {
199
200
201
203 }
204 else
205 {
206
207
208
210 }
211 }
212}
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
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
VOID CommandVa2paHelp()
help of the !va2pa command
Definition va2pa.cpp:27