From c8f30b145935b3fd3a46dad7e234b105d4f0fcd3 Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 15 Aug 2024 22:43:10 +0200 Subject: [PATCH] FpDebug: fix I2O intrinsic / value to "out param" can't be passed as ref in other param. --- components/fpdebug/fpdbgdwarffreepascal.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/fpdebug/fpdbgdwarffreepascal.pas b/components/fpdebug/fpdbgdwarffreepascal.pas index cca668fc4b..238abaae81 100644 --- a/components/fpdebug/fpdbgdwarffreepascal.pas +++ b/components/fpdebug/fpdbgdwarffreepascal.pas @@ -2604,7 +2604,7 @@ var Arg: TFpValue; ctx: TFpDbgLocationContext; Addr, CodeAddr: TDBGPtr; - DataLoc: TFpDbgMemLocation; + DataLoc, DataLoc2: TFpDbgMemLocation; instr: TX86AsmInstruction; O1, O2: TInstructionOperand; OpVal: Int64; @@ -2639,14 +2639,14 @@ begin else SetError('Could not get memory address'); exit; end; - ctx.ReadAddress(DataLoc, SizeVal(ctx.SizeOfAddress), DataLoc); - if not IsTargetNotNil(DataLoc) then begin + ctx.ReadAddress(DataLoc, SizeVal(ctx.SizeOfAddress), DataLoc2); + if not IsTargetNotNil(DataLoc2) then begin if IsError(ctx.LastMemError) then SetError(ctx.LastMemError) else SetError('Could not get memory address'); exit; end; - CodeAddr := DataLoc.Address; + CodeAddr := DataLoc2.Address; instr := TX86AsmInstruction(FDisAssembler.GetInstructionInfo(CodeAddr)); if instr.X86OpCode = OPsub then begin