decompiler  1.0.0
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
ghidra::SetOptions Class Reference

Command to toggle options within the decompiler. More...

#include <ghidra_process.hh>

Inheritance diagram for ghidra::SetOptions:
ghidra::GhidraCommand

Public Member Functions

 SetOptions (void)
 Constructor.
 
virtual void rawAction (void)
 Perform the action of the command. More...
 
- Public Member Functions inherited from ghidra::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 option change succeeded.
 

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

Decoderdecoder
 The <optionslist> decoder.
 

Additional Inherited Members

- Protected Attributes inherited from ghidra::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 toggle options within the decompiler.

The decompiler supports configuration of a variety of named options that affect everything from how code is transformed to how it is displayed (See ArchOption). The command expects 2 string parameters: the encoded integer id of the program, and an encoded document containing an <optionslist> element. The <optionslist> element contains one child element for each option to be configured. The command returns a single character message, 't' or 'f', indicating whether the configuration succeeded.

Member Function Documentation

◆ loadParameters()

void ghidra::SetOptions::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 ghidra::GhidraCommand.

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

◆ rawAction()

void ghidra::SetOptions::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 ghidra::GhidraCommand.

◆ sendResult()

void ghidra::SetOptions::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 ghidra::GhidraCommand.

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


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