FpDebug: Do not process data, after MemRead failed.

This commit is contained in:
Martin 2022-02-27 18:59:40 +01:00
parent 27f4c50dbd
commit 95a5c05edc
2 changed files with 6 additions and 3 deletions

View File

@ -754,7 +754,8 @@ begin
end;
result := FConnection.ReadData(AAdress, ASize, AData);
MaskBreakpointsInReadData(AAdress, ASize, AData);
if Result then
MaskBreakpointsInReadData(AAdress, ASize, AData);
end;
function TDbgAvrProcess.WriteData(const AAdress: TDbgPtr;

View File

@ -553,8 +553,10 @@ begin
assert(MDebugEvent.dwProcessId <> 0, 'TDbgWinProcess.ReadData: MDebugEvent.dwProcessId <> 0');
Result := ReadProcessMemory(Handle, Pointer(PtrUInt(AAdress)), @AData, ASize, BytesRead) and (BytesRead = ASize);
if not Result then LogLastError;
MaskBreakpointsInReadData(AAdress, ASize, AData);
if Result then
MaskBreakpointsInReadData(AAdress, ASize, AData)
else
LogLastError;
end;
function TDbgWinProcess.WriteData(const AAdress: TDbgPtr; const ASize: Cardinal; const AData): Boolean;