fpdebug: Pass parameters to the debuggee in the console-version

git-svn-id: trunk@47519 -
This commit is contained in:
joost 2015-01-25 17:37:34 +00:00
parent 367f996fb8
commit a479c66ebe

View File

@ -163,6 +163,8 @@ begin
end;
procedure HandleRun(AParams: String; out CallProcessLoop: boolean);
var
AParamList: TStringList;
begin
CallProcessLoop:=false;
if Assigned(GController.MainProcess)
@ -177,6 +179,16 @@ begin
Exit;
end;
if AParams<>'' then begin
AParamList := TStringList.Create;
try
AParamList.Text:=AParams;
GController.Params.Assign(AParamList);
finally
AParamList.free;
end;
end;
if not GController.Run then
writeln('Failed to run '+GController.ExecutableFilename)
else
@ -866,7 +878,7 @@ begin
MCommands.AddCommand(['file', 'f'], @HandleFile, 'file <filename>: Loads the debuggee <filename>');
MCommands.AddCommand(['show', 's'], @HandleShow, 'show <info>: Enter show help for more info');
MCommands.AddCommand(['set'], @HandleSet, 'set param: Enter set help for more info');
MCommands.AddCommand(['run', 'r'], @HandleRun, 'run: Starts the loaded debuggee');
MCommands.AddCommand(['run', 'r'], @HandleRun, 'run [params]: Starts the loaded debuggee');
MCommands.AddCommand(['break', 'b'], @HandleBreak, 'break [-d] <adress>|<filename:line>: Set a breakpoint at <adress> or <filename:line>. -d removes');
MCommands.AddCommand(['continue', 'cont', 'c'], @HandleContinue, 'continue: Continues execution');
MCommands.AddCommand(['kill', 'k'], @HandleKill, 'kill: Stops execution of the debuggee');