MCPcopy Create free account
hub / github.com/Vector35/debugger / ReadMemory

Method ReadMemory

core/debuggercontroller.cpp:1315–1331  ·  view source on GitHub ↗

We should call these two function instead of DebugAdapter::ReadMemory(), which will skip the memory cache

Source from the content-addressed store, hash-verified

1313
1314// We should call these two function instead of DebugAdapter::ReadMemory(), which will skip the memory cache
1315DataBuffer DebuggerController::ReadMemory(std::uintptr_t address, std::size_t size)
1316{
1317 if (!m_liveView)
1318 return DataBuffer {};
1319
1320 if (!m_state->IsConnected())
1321 return DataBuffer {};
1322
1323 if (m_state->IsRunning())
1324 return DataBuffer {};
1325
1326 DebuggerMemory* memory = m_state->GetMemory();
1327 if (!memory)
1328 return DataBuffer {};
1329
1330 return memory->ReadMemory(address, size);
1331}
1332
1333
1334bool DebuggerController::WriteMemory(std::uintptr_t address, const DataBuffer& buffer)

Callers 1

Calls 3

GetMemoryMethod · 0.80
IsConnectedMethod · 0.45
IsRunningMethod · 0.45

Tested by

no test coverage detected