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

Method ReadMemory

IDEHelper/WinDebugger.h:694–727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

692}
693
694template<typename T> T WinDebugger::ReadMemory(intptr addr, bool local, bool* failed)
695{
696 bool success = true;
697 T val;
698 memset(&val, 0, sizeof(T));
699 if (local)
700 {
701 if (addr != 0)
702 {
703 memcpy(&val, (void*)(intptr)addr, sizeof(T));
704 /*__try
705 {
706 memcpy(&val, (void*)(intptr)addr, sizeof(T));
707 }
708 __except (EXCEPTION_EXECUTE_HANDLER)
709 {
710 success = false;
711 }*/
712 }
713 else
714 success = false;
715 }
716 else
717 {
718 //SIZE_T dwReadBytes;
719 memset(&val, 0, sizeof(T));
720 //success = ReadProcessMemory(mProcessInfo.hProcess, (void*)(intptr)addr, &val, (SIZE_T)sizeof(T), &dwReadBytes) != 0;
721 success = ReadMemory(addr, (int)sizeof(T), &val);
722 }
723
724 if (failed != NULL)
725 *failed = !success;
726 return val;
727}
728
729addr_target DecodeTargetDataPtr(const char*& strRef);
730

Callers 15

TypeIsSubTypeOfMethod · 0.45
BeefStringToStringMethod · 0.45
ReadTypedValueMethod · 0.45
StoreValueMethod · 0.45
CreateCallMethod · 0.45
Debugger_ReadMemoryFunction · 0.45
ScanSpanMethod · 0.45
ScanRootMethod · 0.45
ScanMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected