LazDebuggerFp: Ability to select console to attach debuggee onto

git-svn-id: trunk@48455 -
This commit is contained in:
joost 2015-03-22 12:53:35 +00:00
parent fbbe781a3c
commit f8ba7fd9c8

View File

@ -59,10 +59,15 @@ type
TFpDebugDebuggerProperties = class(TDebuggerProperties) TFpDebugDebuggerProperties = class(TDebuggerProperties)
private private
FConsoleTty: string;
FNextOnlyStopOnStartLine: boolean; FNextOnlyStopOnStartLine: boolean;
public public
constructor Create; override; constructor Create; override;
procedure Assign(Source: TPersistent); override; procedure Assign(Source: TPersistent); override;
{$ifdef unix}
published
{$endif unix}
property ConsoleTty: string read FConsoleTty write FConsoleTty;
published published
property NextOnlyStopOnStartLine: boolean read FNextOnlyStopOnStartLine write FNextOnlyStopOnStartLine; property NextOnlyStopOnStartLine: boolean read FNextOnlyStopOnStartLine write FNextOnlyStopOnStartLine;
end; end;
@ -319,6 +324,7 @@ begin
inherited Assign(Source); inherited Assign(Source);
if Source is TFpDebugDebuggerProperties then begin if Source is TFpDebugDebuggerProperties then begin
FNextOnlyStopOnStartLine := TFpDebugDebuggerProperties(Source).NextOnlyStopOnStartLine; FNextOnlyStopOnStartLine := TFpDebugDebuggerProperties(Source).NextOnlyStopOnStartLine;
FConsoleTty:=TFpDebugDebuggerProperties(Source).ConsoleTty;
end; end;
end; end;
@ -1421,6 +1427,7 @@ function TFpDebugDebugger.RequestCommand(const ACommand: TDBGCommand;
const AParams: array of const): Boolean; const AParams: array of const): Boolean;
var var
EvalFlags: TDBGEvaluateFlags; EvalFlags: TDBGEvaluateFlags;
AConsoleTty: string;
addr: TDBGPtr; addr: TDBGPtr;
begin begin
result := False; result := False;
@ -1432,6 +1439,9 @@ begin
if not assigned(FDbgController.MainProcess) then if not assigned(FDbgController.MainProcess) then
begin begin
FDbgController.ExecutableFilename:=FileName; FDbgController.ExecutableFilename:=FileName;
AConsoleTty:=TFpDebugDebuggerProperties(GetProperties).ConsoleTty;
FDbgController.ConsoleTty:=AConsoleTty;
FDbgController.RedirectConsoleOutput:=AConsoleTty='';
FDbgController.Params.Clear; FDbgController.Params.Clear;
if Arguments<>'' then if Arguments<>'' then
CommandToList(Arguments, FDbgController.Params); CommandToList(Arguments, FDbgController.Params);