mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 09:38:12 +02:00
Debugger: Fixed an issue, with freeing objects, on certain gdb errors
git-svn-id: trunk@31833 -
This commit is contained in:
parent
226bb2cc9a
commit
1ee93b1f0d
@ -590,6 +590,7 @@ type
|
||||
function DoExecute: Boolean; override;
|
||||
public
|
||||
constructor Create(AOwner: TGDBMIDebugger; AContinueCommand: TGDBMIDebuggerCommand);
|
||||
destructor Destroy; override;
|
||||
function DebugText: String; override;
|
||||
property ContinueCommand: TGDBMIDebuggerCommand read FContinueCommand;
|
||||
property Success: Boolean read FSuccess;
|
||||
@ -3967,8 +3968,7 @@ begin
|
||||
if DebuggerState = dsPause
|
||||
then ProcessFrame;
|
||||
finally
|
||||
if assigned(FContinueCommand)
|
||||
then FContinueCommand.Free;
|
||||
ReleaseAndNil(FContinueCommand);
|
||||
end;
|
||||
|
||||
FSuccess := True;
|
||||
@ -3978,10 +3978,18 @@ constructor TGDBMIDebuggerCommandStartDebugging.Create(AOwner: TGDBMIDebugger;
|
||||
AContinueCommand: TGDBMIDebuggerCommand);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
// AContinueCommand, takes over the current reference.
|
||||
// Caller will never Release it. So TGDBMIDebuggerCommandStartDebugging must do this
|
||||
FContinueCommand := AContinueCommand;
|
||||
FSuccess := False;
|
||||
end;
|
||||
|
||||
destructor TGDBMIDebuggerCommandStartDebugging.Destroy;
|
||||
begin
|
||||
ReleaseAndNil(FContinueCommand);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TGDBMIDebuggerCommandStartDebugging.DebugText: String;
|
||||
var
|
||||
s: String;
|
||||
|
Loading…
Reference in New Issue
Block a user