fpdebug: check for bounds, before accessing

git-svn-id: trunk@49086 -
This commit is contained in:
martin 2015-05-18 20:11:13 +00:00
parent 2c26f71ea9
commit 311acd5b58

View File

@ -2648,7 +2648,8 @@ begin
end; end;
exit; exit;
end; end;
Result := t2.OrdHighBound - t2.OrdLowBound + 1; if t2.HasBounds then
Result := Integer(t2.OrdHighBound - t2.OrdLowBound + 1);
end; end;
function TFpDwarfValueArray.GetMemberCountEx(AIndex: array of Int64): Integer; function TFpDwarfValueArray.GetMemberCountEx(AIndex: array of Int64): Integer;
@ -3505,7 +3506,7 @@ begin
InitLocParserData.ObjectDataAddrPush := False; InitLocParserData.ObjectDataAddrPush := False;
if assigned(AValueObj) and LocationFromTag(DW_AT_upper_bound, AValueObj, AnAddress, @InitLocParserData, InformationEntry, True) then begin if assigned(AValueObj) and LocationFromTag(DW_AT_upper_bound, AValueObj, AnAddress, @InitLocParserData, InformationEntry, True) then begin
FHighBoundState := rfConst; FHighBoundState := rfConst;
FHighBoundConst := AnAddress.Address; FHighBoundConst := Int64(AnAddress.Address);
end end
else else
begin begin