mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 03:19:43 +02:00
lazdebugger: fixed mem leak SetSoftwareExceptionBreakpoint
git-svn-id: trunk@46952 -
This commit is contained in:
parent
3b64b2922b
commit
39eddb6bfb
@ -1310,6 +1310,7 @@ function TFpDebugDebugger.SetSoftwareExceptionBreakpoint: boolean;
|
|||||||
var
|
var
|
||||||
AContext: TFpDbgInfoContext;
|
AContext: TFpDbgInfoContext;
|
||||||
AValue: TFpDbgValue;
|
AValue: TFpDbgValue;
|
||||||
|
AnAddr: TDBGPtr;
|
||||||
begin
|
begin
|
||||||
result := false;
|
result := false;
|
||||||
if assigned(FDbgController.CurrentProcess.SymbolTableInfo) then
|
if assigned(FDbgController.CurrentProcess.SymbolTableInfo) then
|
||||||
@ -1320,7 +1321,9 @@ begin
|
|||||||
AValue := AContext.FindSymbol('FPC_RAISEEXCEPTION');
|
AValue := AContext.FindSymbol('FPC_RAISEEXCEPTION');
|
||||||
if assigned(AValue) then
|
if assigned(AValue) then
|
||||||
begin
|
begin
|
||||||
FRaiseExceptionBreakpoint := AddBreak(AValue.Address.Address);
|
AnAddr:=AValue.Address.Address;
|
||||||
|
AValue.ReleaseReference;
|
||||||
|
FRaiseExceptionBreakpoint := AddBreak(AnAddr);
|
||||||
if assigned(FRaiseExceptionBreakpoint) then
|
if assigned(FRaiseExceptionBreakpoint) then
|
||||||
result := True;
|
result := True;
|
||||||
end;
|
end;
|
||||||
@ -1735,6 +1738,8 @@ end;
|
|||||||
|
|
||||||
destructor TFpDebugDebugger.Destroy;
|
destructor TFpDebugDebugger.Destroy;
|
||||||
begin
|
begin
|
||||||
|
if FLogAsyncQueued or FWatchAsyncQueued then
|
||||||
|
debugln(['WARNING: TFpDebugDebugger.Destroy FLogAsyncQueued=',FLogAsyncQueued,' FWatchAsyncQueued=',FWatchAsyncQueued]);
|
||||||
Application.RemoveAsyncCalls(Self);
|
Application.RemoveAsyncCalls(Self);
|
||||||
if assigned(FFpDebugThread) then
|
if assigned(FFpDebugThread) then
|
||||||
FreeDebugThread;
|
FreeDebugThread;
|
||||||
|
Loading…
Reference in New Issue
Block a user