mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 05:09:27 +02:00
FpDebug: Prevent range checks on target address computation
This commit is contained in:
parent
8da1763be3
commit
ad54dc2ceb
@ -4461,7 +4461,9 @@ begin
|
||||
Exit;
|
||||
end;
|
||||
DW_LNS_advance_pc: begin
|
||||
{$PUSH}{$R-}{$Q-}
|
||||
Inc(FAddress, ULEB128toOrdinal(pbyte(FLineInfoPtr)));
|
||||
{$POP}
|
||||
end;
|
||||
DW_LNS_advance_line: begin
|
||||
Inc(FLine, SLEB128toOrdinal(pbyte(FLineInfoPtr)));
|
||||
@ -4480,12 +4482,16 @@ begin
|
||||
end;
|
||||
DW_LNS_const_add_pc: begin
|
||||
Opcode := 255 - Length(FOwner.FLineInfo.StandardOpcodeLengths);
|
||||
{$PUSH}{$R-}{$Q-}
|
||||
if FOwner.FLineInfo.LineRange = 0
|
||||
then Inc(FAddress, Opcode * FOwner.FLineInfo.MinimumInstructionLength)
|
||||
else Inc(FAddress, (Opcode div FOwner.FLineInfo.LineRange) * FOwner.FLineInfo.MinimumInstructionLength);
|
||||
{$POP}
|
||||
end;
|
||||
DW_LNS_fixed_advance_pc: begin
|
||||
{$PUSH}{$R-}{$Q-}
|
||||
Inc(FAddress, PWord(FLineInfoPtr)^);
|
||||
{$POP}
|
||||
Inc(pbyte(FLineInfoPtr), 2);
|
||||
end;
|
||||
DW_LNS_set_prologue_end: begin
|
||||
@ -4548,6 +4554,7 @@ begin
|
||||
|
||||
// Special opcode
|
||||
Dec(Opcode, Length(FOwner.FLineInfo.StandardOpcodeLengths)+1);
|
||||
{$PUSH}{$R-}{$Q-}
|
||||
if FOwner.FLineInfo.LineRange = 0
|
||||
then begin
|
||||
Inc(FAddress, Opcode * FOwner.FLineInfo.MinimumInstructionLength);
|
||||
@ -4556,6 +4563,7 @@ begin
|
||||
Inc(FAddress, (Opcode div FOwner.FLineInfo.LineRange) * FOwner.FLineInfo.MinimumInstructionLength);
|
||||
Inc(FLine, FOwner.FLineInfo.LineBase + (Opcode mod FOwner.FLineInfo.LineRange));
|
||||
end;
|
||||
{$POP}
|
||||
Result := True;
|
||||
Exit;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user