56{
59
60 if (SplitCommand.size() == 1)
61 {
64 return;
65 }
66
67 if (!SplitCommand.at(1).compare("table"))
68 {
69
70
71
72 if (SplitCommand.size() != 2)
73 {
76 return;
77 }
78
79
80
81
83 }
84 else if (!SplitCommand.at(1).compare("load") || !SplitCommand.at(1).compare("download"))
85 {
86
87
88
89 if (SplitCommand.size() != 2)
90 {
93 return;
94 }
95
96
97
98
99 if (!SplitCommand.at(1).compare("load"))
100 {
102 }
103 else if (!SplitCommand.at(1).compare("download"))
104 {
106 }
107 }
108 else if (!SplitCommand.at(1).compare("reload"))
109 {
110
111
112
113 if (SplitCommand.size() != 2 && SplitCommand.size() != 4)
114 {
117 return;
118 }
119
120
121
122
123 if (SplitCommand.size() == 4)
124 {
125 if (!SplitCommand.at(2).compare("pid"))
126 {
128 {
129
130
131
133 SplitCommand.at(3).c_str());
135 return;
136 }
137 }
138 else
139 {
142 return;
143 }
144 }
145
146
147
148
150 {
151
152
153
155 }
156 else
157 {
158
159
160
161 if (UserProcessId == NULL)
162 {
163
164
165
166
167
168
170 {
172 }
173 else
174 {
175 UserProcessId = GetCurrentProcessId();
176 }
177 }
178
179
180
181
183 {
185 }
186 }
187 }
188 else if (!SplitCommand.at(1).compare("unload"))
189 {
190
191
192
193 if (SplitCommand.size() != 2)
194 {
197 return;
198 }
199
200
201
202
203
205
206
207
208
209
210 }
211 else if (!SplitCommand.at(1).compare("add"))
212 {
213
214
215
216 if (SplitCommand.size() < 6)
217 {
220 return;
221 }
222
223 if (!SplitCommand.at(2).compare("base"))
224 {
225 string Delimiter = "";
226 string PathToPdb = "";
228 {
229 ShowMessages(
"please add a valid hex address to be used as the base address\n\n");
231 return;
232 }
233
234
235
236
237 if (SplitCommand.at(4).compare("path"))
238 {
241 return;
242 }
243
244
245
246
247 Delimiter = "path ";
248 PathToPdb = Command.substr(Command.find(Delimiter) + 5, Command.size());
249
250
251
252
254 {
256 return;
257 }
258
259 ShowMessages(
"loading module symbol at '%s'\n", PathToPdb.c_str());
260
261
262
263
264
266 }
267 else
268 {
271 return;
272 }
273 }
274 else
275 {
276 ShowMessages(
"unknown parameter at '%s'\n\n", SplitCommand.at(1).c_str());
278 return;
279 }
280}
#define TRUE
Definition BasicTypes.h:55
#define FALSE
Definition BasicTypes.h:54
unsigned __int64 UINT64
Definition BasicTypes.h:21
unsigned int UINT32
Definition BasicTypes.h:48
BOOLEAN ConvertStringToUInt64(string TextToConvert, PUINT64 Result)
check and convert string to a 64 bit unsigned integer and also check for special notations like 0x,...
Definition common.cpp:240
BOOLEAN ConvertStringToUInt32(string TextToConvert, PUINT32 Result)
check and convert string to a 32 bit unsigned it and also check for special notations like 0x etc.
Definition common.cpp:347
BOOLEAN IsFileExistA(const char *FileName)
check if a file exist or not (ASCII)
Definition common.cpp:619
VOID ShowMessages(const char *Fmt,...)
Show messages.
Definition libhyperdbg.cpp:96
NULL()
Definition test-case-generator.py:530
UINT32 ScriptEngineUnloadAllSymbolsWrapper()
ScriptEngineUnloadAllSymbols wrapper.
Definition script-engine-wrapper.cpp:91
UINT32 ScriptEngineLoadFileSymbolWrapper(UINT64 BaseAddress, const char *PdbFileName, const char *CustomModuleName)
ScriptEngineLoadFileSymbol wrapper.
Definition script-engine-wrapper.cpp:67
UINT32 ProcessId
Definition ud.h:51
BOOLEAN IsActive
Definition ud.h:49
VOID CommandSymHelp()
help of the .sym command
Definition sym.cpp:26
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
Shows if the debugger was connected to remote debuggee over (A remote guest)
Definition globals.h:231
ACTIVE_DEBUGGING_PROCESS g_ActiveProcessDebuggingState
State of active debugging thread.
Definition globals.h:362
BOOLEAN SymbolLoadOrDownloadSymbols(BOOLEAN IsDownload, BOOLEAN SilentLoad)
Load or download symbols.
Definition symbol.cpp:299
BOOLEAN SymbolReloadSymbolTableInDebuggerMode(UINT32 ProcessId)
Update the symbol table from remote debuggee in debugger mode.
Definition symbol.cpp:1004
BOOLEAN SymbolLocalReload(UINT32 UserProcessId)
Locally reload the symbol table.
Definition symbol.cpp:50
VOID SymbolBuildAndShowSymbolTable()
Build and show symbol table details.
Definition symbol.cpp:264