FpDebug: fix available commands in dsStop

git-svn-id: trunk@63318 -
This commit is contained in:
martin 2020-06-06 18:26:37 +00:00
parent 26272363cd
commit 3186086cda
2 changed files with 10 additions and 1 deletions

View File

@ -1986,7 +1986,7 @@ type
property PseudoTerminal: TPseudoTerminal read GetPseudoTerminal; experimental; // 'may be replaced with a more general API';
property State: TDBGState read FState; // The current state of the debugger
property SupportedCommands: TDBGCommands read GetSupportedCommands; // All available commands of the debugger
class function SupportedCommandsFor(AState: TDBGState): TDBGCommands;
class function SupportedCommandsFor(AState: TDBGState): TDBGCommands; virtual;
property TargetWidth: Byte read GetTargetWidth; // Currently only 32 or 64
//property Waiting: Boolean read GetWaiting; // Set when the debugger is wating for a command to complete
property Watches: TWatchesSupplier read FWatches; // list of all watches etc

View File

@ -320,6 +320,7 @@ type
class function RequiredCompilerOpts({%H-}ATargetCPU, {%H-}ATargetOS: String): TDebugCompilerRequirements; override;
class function CreateProperties: TDebuggerProperties; override;
class function GetSupportedCommands: TDBGCommands; override;
class function SupportedCommandsFor(AState: TDBGState): TDBGCommands; override;
end;
{ TFpLineInfo }
@ -3481,6 +3482,14 @@ begin
];
end;
class function TFpDebugDebugger.SupportedCommandsFor(AState: TDBGState
): TDBGCommands;
begin
Result := inherited SupportedCommandsFor(AState);
if AState = dsStop then
Result := Result - [dcStepInto, dcStepOver, dcStepOut, dcStepIntoInstr, dcStepOverInstr];
end;
initialization
DBG_VERBOSE := DebugLogger.FindOrRegisterLogGroup('DBG_VERBOSE' {$IFDEF DBG_VERBOSE} , True {$ENDIF} );
DBG_WARNINGS := DebugLogger.FindOrRegisterLogGroup('DBG_WARNINGS' {$IFDEF DBG_WARNINGS} , True {$ENDIF} );