mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 03:49:30 +02:00
FpDebug: Do not process data, after MemRead failed.
This commit is contained in:
parent
27f4c50dbd
commit
95a5c05edc
@ -754,7 +754,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
result := FConnection.ReadData(AAdress, ASize, AData);
|
result := FConnection.ReadData(AAdress, ASize, AData);
|
||||||
MaskBreakpointsInReadData(AAdress, ASize, AData);
|
if Result then
|
||||||
|
MaskBreakpointsInReadData(AAdress, ASize, AData);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TDbgAvrProcess.WriteData(const AAdress: TDbgPtr;
|
function TDbgAvrProcess.WriteData(const AAdress: TDbgPtr;
|
||||||
|
@ -553,8 +553,10 @@ begin
|
|||||||
assert(MDebugEvent.dwProcessId <> 0, 'TDbgWinProcess.ReadData: MDebugEvent.dwProcessId <> 0');
|
assert(MDebugEvent.dwProcessId <> 0, 'TDbgWinProcess.ReadData: MDebugEvent.dwProcessId <> 0');
|
||||||
Result := ReadProcessMemory(Handle, Pointer(PtrUInt(AAdress)), @AData, ASize, BytesRead) and (BytesRead = ASize);
|
Result := ReadProcessMemory(Handle, Pointer(PtrUInt(AAdress)), @AData, ASize, BytesRead) and (BytesRead = ASize);
|
||||||
|
|
||||||
if not Result then LogLastError;
|
if Result then
|
||||||
MaskBreakpointsInReadData(AAdress, ASize, AData);
|
MaskBreakpointsInReadData(AAdress, ASize, AData)
|
||||||
|
else
|
||||||
|
LogLastError;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TDbgWinProcess.WriteData(const AAdress: TDbgPtr; const ASize: Cardinal; const AData): Boolean;
|
function TDbgWinProcess.WriteData(const AAdress: TDbgPtr; const ASize: Cardinal; const AData): Boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user