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

Method MapMemory

IDEHelper/MiniDumpDebugger.cpp:247–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247void MiniDumpDebugger::MapMemory(addr_target addr, void* data, intptr_target size)
248{
249 addr_target beginAddress = addr;
250 addr_target endAddress = addr + size;
251
252 int memSize = (int)(endAddress - beginAddress);
253 for (int memOffset = 0; true; memOffset += DBG_MAX_LOOKBACK)
254 {
255 int curSize = memSize - memOffset;
256 if (curSize <= 0)
257 break;
258
259 MiniDumpMemoryRegion* memRegion = mAlloc.Alloc<MiniDumpMemoryRegion>();
260 memRegion->mAddress = beginAddress + memOffset;
261 memRegion->mAddressLength = curSize;
262 memRegion->mData = (uint8*)data + memOffset;
263 memRegion->mNext = NULL;
264 mMemMap.Insert(memRegion);
265 }
266}
267
268MappedFile* MiniDumpDebugger::MapModule(COFF* dbgModule, const StringImpl& fileName)
269{

Callers 1

ReadCOFFMethod · 0.80

Calls 1

InsertMethod · 0.45

Tested by

no test coverage detected