decompiler  1.0.0
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
SetAction Class Reference

Command to set the root Action used by the decompiler or toggle output components. More...

#include <ghidra_process.hh>

Inheritance diagram for SetAction:
GhidraCommand

Public Member Functions

virtual void rawAction (void)
 Perform the action of the command. More...
 
- Public Member Functions inherited from GhidraCommand
 GhidraCommand (void)
 Construct given i/o streams.
 
virtual ~GhidraCommand (void)
 Destructor.
 
int4 doit (void)
 Configure and execute the command, then send back results. More...
 

Public Attributes

bool res
 Set to true if the configuration action was successful.
 

Private Member Functions

virtual void loadParameters (void)
 Read parameters directing command execution. More...
 
virtual void sendResult (void)
 Send results of the command (if any) back to the Ghidra client. More...
 

Private Attributes

string actionstring
 The root Action to switch to.
 
string printstring
 The printing output configuration to toggle.
 

Additional Inherited Members

- Protected Attributes inherited from GhidraCommand
istream & sin
 The input stream from the Ghidra client.
 
ostream & sout
 The output stream to the Ghidra client.
 
ArchitectureGhidraghidra
 The Architecture on which to perform the command.
 
int4 status
 Meta-command to system (0=wait for next command, 1=terminate process)
 

Detailed Description

Command to set the root Action used by the decompiler or toggle output components.

The command expects 3 string parameters, the encoded integer id of the program being decompiled, the root action name, and the name of the output printing configuration. If the root action name is empty, no change is made to the root action. If the printing name is empty, no change is made to what gets output. The root action name can be:

The printing configuration can be:

The command returns a single character message, 't' or 'f', indicating whether the action succeeded.

Member Function Documentation

◆ loadParameters()

void SetAction::loadParameters ( void  )
privatevirtual

Read parameters directing command execution.

This method reads an id selecting the Architecture to act on, but it can be overloaded to read any set of data from the Ghidra client to configure how the command is executed. Individual parameters are read using the method protocol.

Reimplemented from GhidraCommand.

References actionstring, GhidraCommand::loadParameters(), printstring, ArchitectureGhidra::readStringStream(), and GhidraCommand::sin.

◆ rawAction()

void SetAction::rawAction ( void  )
virtual

Perform the action of the command.

Configuration is assumed to have happened, and this object can immediately begin examining and manipulating data under the active Architecture object to perform the command.

Implements GhidraCommand.

References actionstring, Architecture::allacts, Architecture::flowoptions, GhidraCommand::ghidra, printstring, FlowInfo::record_jumploads, res, ActionDatabase::setCurrent(), ArchitectureGhidra::setSendCCode(), ArchitectureGhidra::setSendParamMeasures(), and ArchitectureGhidra::setSendSyntaxTree().

◆ sendResult()

void SetAction::sendResult ( void  )
privatevirtual

Send results of the command (if any) back to the Ghidra client.

This method sends any warnings accumulated during execution back, but it can be overloaded to send back any kind of information. Individual records are sent using the message protocol.

Reimplemented from GhidraCommand.

References res, GhidraCommand::sendResult(), GhidraCommand::sout, and ArchitectureGhidra::writeStringStream().


The documentation for this class was generated from the following files: