58{
59 UINT32 TargetProcessId = 0;
60 UINT64 TargetProcess = 0;
61 UINT64 AddressOfActiveProcessHead = 0;
62 UINT32 OffsetOfImageFileName = 0;
63 UINT32 OffsetOfUniqueProcessId = 0;
64 UINT32 OffsetOfActiveProcessLinks = 0;
68
69 if (CommandTokens.size() >= 4)
70 {
71 ShowMessages("incorrect use of the '%s'\n\n",
74 return;
75 }
76
77 if (CommandTokens.size() == 1)
78 {
79
80
81
83 {
84
85
86
88 }
89 else
90 {
91
92
93
95 NULL,
96 NULL,
98 NULL);
99 }
100 }
101 else if (CommandTokens.size() == 2)
102 {
104 {
105
106
107
108
109
110
115 {
116
117
118
119
120
121
122
123
124
125
126
131
133 {
134
135
136
138 &ProcessListNeededItems,
139 NULL,
140 NULL);
141 }
142 else
143 {
144
145
146
148 NULL,
149 NULL,
151 &ProcessListNeededItems);
152 }
153 }
154 else
155 {
156 ShowMessages("err, the need offset to iterate over processes not found, "
157 "make sure to load ntoskrnl.exe's PDB file. use '.help .sym' for "
158 "more information\n");
159 return;
160 }
161 }
162 else
163 {
164 ShowMessages(
165 "err, unknown parameter at '%s'\n\n",
168 return;
169 }
170 }
171 else if (CommandTokens.size() == 3)
172 {
173
174
175
177 {
178 ShowMessages("err, you're not connected to any debuggee in Debugger Mode, "
179 "you can use the '.attach', or the '.detach' commands if you're "
180 "operating in VMI Mode\n");
181 return;
182 }
183
185 {
187 {
188 ShowMessages(
189 "please specify a correct hex value for the process id that you "
190 "want to operate on it\n\n");
192 return;
193 }
194 }
196 {
198 {
199 ShowMessages(
200 "please specify a correct hex value for the process (nt!_EPROCESS) that you "
201 "want to operate on it\n\n");
203 return;
204 }
205 }
206 else
207 {
208 ShowMessages(
209 "err, unknown parameter at '%s'\n\n",
212 return;
213 }
214
215
216
217
219 {
220 IsSetByClkIntr =
FALSE;
221 }
222 else
223 {
224 IsSetByClkIntr =
TRUE;
225 }
226
227
228
229
231 TargetProcessId,
232 TargetProcess,
233 IsSetByClkIntr,
234 NULL);
235 }
236 else
237 {
238 ShowMessages("invalid parameter\n\n");
240 return;
241 }
242}
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
Shows if the debugger was connected to remote debuggee over (A remote guest).
Definition globals.h:253
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 KdSendSwitchProcessPacketToDebuggee(DEBUGGEE_DETAILS_AND_SWITCH_PROCESS_TYPE ActionType, UINT32 NewPid, UINT64 NewProcess, BOOLEAN SetChangeByClockInterrupt, PDEBUGGEE_PROCESS_LIST_NEEDED_DETAILS SymDetailsForProcessList)
Sends a change process or show process details packet to the debuggee.
Definition kd.cpp:805
BOOLEAN ObjectShowProcessesOrThreadList(BOOLEAN IsProcess, PDEBUGGEE_PROCESS_LIST_NEEDED_DETAILS SymDetailsForProcessList, UINT64 Eprocess, PDEBUGGEE_THREAD_LIST_NEEDED_DETAILS SymDetailsForThreadList)
Get details about processes or threads.
Definition objects.cpp:138
BOOLEAN ObjectShowProcessesOrThreadDetails(BOOLEAN IsProcess)
Get details about processes or threads.
Definition objects.cpp:26
VOID CommandProcessHelp()
help of the .process command
Definition process.cpp:25
BOOLEAN ScriptEngineGetFieldOffsetWrapper(CHAR *TypeName, CHAR *FieldName, UINT32 *FieldOffset)
ScriptEngineGetFieldOffset wrapper.
Definition script-engine-wrapper.cpp:132
ULONG UniquePidOffset
Definition RequestStructures.h:739
ULONG ImageFileNameOffset
Definition RequestStructures.h:738
ULONG ActiveProcessLinksOffset
Definition RequestStructures.h:740
UINT64 PsActiveProcessHead
Definition RequestStructures.h:737
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