MCPcopy Create free account
hub / github.com/beefytech/Beef / SetupDyn

Method SetupDyn

IDEHelper/DebugTarget.cpp:218–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216}
217
218DbgModule* DebugTarget::SetupDyn(const StringImpl& filePath, DataStream* stream, intptr imageBase)
219{
220 BP_ZONE("DebugTarget::SetupDyn");
221
222 //AutoDbgTime dbgTime("DebugTarget::SetupDyn " + filePath);
223
224 DbgModule* dwarf = new COFF(this);
225 dwarf->mFilePath = filePath;
226 dwarf->mImageBase = (intptr)imageBase;
227 if (!dwarf->ReadCOFF(stream, DbgModuleKind_Module))
228 {
229 //mDebugger->OutputMessage(StrFormat("Debugger failed to read binary: %s", fileName.c_str()));
230 delete dwarf;
231 return NULL;
232 }
233 AddDbgModule(dwarf);
234
235 dwarf->mDisplayName = GetFileName(filePath);
236 dwarf->mOrigImageData = new DbgModuleMemoryCache(dwarf->mImageBase, dwarf->mImageSize);
237 CheckTargetBinary(dwarf);
238
239 /*dbgModule->mOrigImageData = new uint8[dbgModule->mImageSize];
240 memset(dbgModule->mOrigImageData, 0xCC, dbgModule->mImageSize);
241 for (auto& section : dbgModule->mSections)
242 {
243 bool couldRead = mDebugger->ReadMemory((intptr)imageBase + section.mAddrStart, section.mAddrLength, dbgModule->mOrigImageData + section.mAddrStart);
244 BF_ASSERT(couldRead);
245 }
246 dbgModule->GotImageData();*/
247 return dwarf;
248}
249
250String DebugTarget::UnloadDyn(addr_target imageBase)
251{

Callers 1

DoUpdateMethod · 0.80

Calls 1

ReadCOFFMethod · 0.80

Tested by

no test coverage detected