OpenASIP  2.0
Public Member Functions | List of all members
InfoBreakpointsCommand Class Reference
Inheritance diagram for InfoBreakpointsCommand:
Inheritance graph
Collaboration diagram for InfoBreakpointsCommand:
Collaboration graph

Public Member Functions

 InfoBreakpointsCommand (SimControlLanguageCommand &parentCommand)
 
virtual ~InfoBreakpointsCommand ()
 
virtual bool execute (const std::vector< DataObject > &arguments)
 
- Public Member Functions inherited from SimControlLanguageSubCommand
 SimControlLanguageSubCommand (SimControlLanguageCommand &parentCommand)
 
virtual ~SimControlLanguageSubCommand ()
 
virtual SimControlLanguageCommandparent ()
 

Detailed Description

Implementation of "info breakpoints".

Definition at line 1351 of file InfoCommand.cc.

Constructor & Destructor Documentation

◆ InfoBreakpointsCommand()

InfoBreakpointsCommand::InfoBreakpointsCommand ( SimControlLanguageCommand parentCommand)
inline

Constructor.

Definition at line 1356 of file InfoCommand.cc.

1356  :
1357  SimControlLanguageSubCommand(parentCommand) {
1358  }

◆ ~InfoBreakpointsCommand()

virtual InfoBreakpointsCommand::~InfoBreakpointsCommand ( )
inlinevirtual

Destructor.

Definition at line 1363 of file InfoCommand.cc.

1363  {
1364  }

Member Function Documentation

◆ execute()

virtual bool InfoBreakpointsCommand::execute ( const std::vector< DataObject > &  arguments)
inlinevirtual

Executes the "info breakpoints" command.

Prints a table of all breakpoints. Each breakpoint is printed in a separate line. If argument is given, only the breakpoint with handle num is printed.

Parameters
argumentsArguments to the command, including the command.
Returns
true in case execution was successful.

Implements SimControlLanguageSubCommand.

Definition at line 1376 of file InfoCommand.cc.

1376  {
1377  const int argumentCount = arguments.size() - 2;
1378  if (!parent().checkArgumentCount(argumentCount, 0, 1)) {
1379  return false;
1380  }
1381 
1382  if (argumentCount == 1 &&
1383  !parent().checkPositiveIntegerArgument(arguments[2])) {
1384  return false;
1385  }
1386 
1387  if (!parent().checkSimulationEnded() &&
1388  !parent().checkSimulationStopped() &&
1389  !parent().checkSimulationInitialized()) {
1390  return false;
1391  }
1392 
1393  if (argumentCount == 1) {
1394  unsigned int breakpointHandle =
1395  static_cast<unsigned int>(arguments[2].integerValue());
1396  return parent().printBreakpointInfo(breakpointHandle);
1397  } else {
1398  StopPointManager& bpManager =
1400  for (unsigned int i = 0; i < bpManager.stopPointCount(); ++i) {
1401  parent().printBreakpointInfo(bpManager.stopPointHandle(i));
1402  }
1403  return true;
1404  }
1405  }

References SimControlLanguageSubCommand::parent(), SimControlLanguageCommand::printBreakpointInfo(), SimControlLanguageCommand::simulatorFrontend(), StopPointManager::stopPointCount(), StopPointManager::stopPointHandle(), and SimulatorFrontend::stopPointManager().

Here is the call graph for this function:

The documentation for this class was generated from the following file:
SimControlLanguageSubCommand::parent
virtual SimControlLanguageCommand & parent()
Definition: SimControlLanguageCommand.cc:842
SimControlLanguageSubCommand::SimControlLanguageSubCommand
SimControlLanguageSubCommand(SimControlLanguageCommand &parentCommand)
Definition: SimControlLanguageCommand.cc:824
StopPointManager::stopPointCount
unsigned int stopPointCount()
Definition: StopPointManager.cc:269
StopPointManager
Definition: StopPointManager.hh:50
StopPointManager::stopPointHandle
unsigned int stopPointHandle(unsigned int index)
Definition: StopPointManager.cc:231
SimControlLanguageCommand::simulatorFrontend
SimulatorFrontend & simulatorFrontend()
Definition: SimControlLanguageCommand.cc:214
SimulatorFrontend::stopPointManager
StopPointManager & stopPointManager()
Definition: SimulatorFrontend.cc:2108
SimControlLanguageCommand::printBreakpointInfo
virtual bool printBreakpointInfo(unsigned int breakpointHandle)
Definition: SimControlLanguageCommand.cc:678