fpdebug: prevent crash if breakpoint at address already exists (can happen if line info is not read correct / generics?)

git-svn-id: trunk@49000 -
This commit is contained in:
martin 2015-05-12 20:02:18 +00:00
parent 88dd20916e
commit 44de4b4034

View File

@ -650,6 +650,11 @@ end;
function TDbgProcess.AddBreak(const ALocation: TDbgPtr): TDbgBreakpoint;
begin
if FBreakMap.HasId(ALocation) then begin
debugln(['TDbgProcess.AddBreak breakpoint already exists at ', dbgs(ALocation)]);
Result := nil;
exit;
end;
Result := OSDbgClasses.DbgBreakpointClass.Create(Self, ALocation);
FBreakMap.Add(ALocation, Result);
if (GetInstructionPointerRegisterValue=ALocation) and not assigned(FCurrentBreakpoint) then