mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 18:39:10 +02:00
fpdebug: Pass parameters to the debuggee in the console-version
git-svn-id: trunk@47519 -
This commit is contained in:
parent
367f996fb8
commit
a479c66ebe
@ -163,6 +163,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure HandleRun(AParams: String; out CallProcessLoop: boolean);
|
procedure HandleRun(AParams: String; out CallProcessLoop: boolean);
|
||||||
|
var
|
||||||
|
AParamList: TStringList;
|
||||||
begin
|
begin
|
||||||
CallProcessLoop:=false;
|
CallProcessLoop:=false;
|
||||||
if Assigned(GController.MainProcess)
|
if Assigned(GController.MainProcess)
|
||||||
@ -177,6 +179,16 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
end;
|
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
|
if not GController.Run then
|
||||||
writeln('Failed to run '+GController.ExecutableFilename)
|
writeln('Failed to run '+GController.ExecutableFilename)
|
||||||
else
|
else
|
||||||
@ -866,7 +878,7 @@ begin
|
|||||||
MCommands.AddCommand(['file', 'f'], @HandleFile, 'file <filename>: Loads the debuggee <filename>');
|
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(['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(['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(['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(['continue', 'cont', 'c'], @HandleContinue, 'continue: Continues execution');
|
||||||
MCommands.AddCommand(['kill', 'k'], @HandleKill, 'kill: Stops execution of the debuggee');
|
MCommands.AddCommand(['kill', 'k'], @HandleKill, 'kill: Stops execution of the debuggee');
|
||||||
|
Loading…
Reference in New Issue
Block a user