Ghidra 11.3.2
Ghidra internal decompiler documentation.
Loading...
Searching...
No Matches
ghidra::OptionSplitDatatypes Class Reference

Control which data-type assignments are split into multiple COPY/LOAD/STORE operations. More...

Inheritance diagram for ghidra::OptionSplitDatatypes:
[legend]
Collaboration diagram for ghidra::OptionSplitDatatypes:
[legend]

Public Types

enum  { option_struct = 1 , option_array = 2 , option_pointer = 4 }
 

Public Member Functions

 OptionSplitDatatypes (void)
 Constructor.
 
virtual string apply (Architecture *glb, const string &p1, const string &p2, const string &p3) const
 Apply a particular configuration option to the Architecture.
 
- Public Member Functions inherited from ghidra::ArchOption
string getName (void) const
 Return the name of the option.
 

Static Public Member Functions

static uint4 getOptionBit (const string &val)
 Translate option string to a configuration bit.
 
- Static Public Member Functions inherited from ghidra::ArchOption
static bool onOrOff (const string &p)
 Parse an "on" or "off" string.
 

Additional Inherited Members

- Protected Attributes inherited from ghidra::ArchOption
string name
 Name of the option.
 

Detailed Description

Control which data-type assignments are split into multiple COPY/LOAD/STORE operations.

Any combination of the three options can be given:

  • "struct" = Divide structure data-types into separate field assignments
  • "array" = Divide array data-types into separate element assignments
  • "pointer" = Divide assignments, via LOAD/STORE, through pointers

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
option_struct 

Split combined structure fields.

option_array 

Split combined array elements.

option_pointer 

Split combined LOAD and STORE operations.

Member Function Documentation

◆ apply()

string ghidra::OptionSplitDatatypes::apply ( Architecture glb,
const string &  p1,
const string &  p2,
const string &  p3 
) const
virtual

Apply a particular configuration option to the Architecture.

This method is overloaded by the different Option classes to provide possible configuration of different parts of the Architecture. The user can provide up to three optional parameters to tailor a specific type of configuration. The method returns a confirmation/failure message as feedback.

Parameters
glbis the Architecture being configured
p1is the first optional configuration string
p2is the second optional configuration string
p3is the third optional configuration string
Returns
a confirmation/failure message

Implements ghidra::ArchOption.

References ghidra::Architecture::allacts, ghidra::ActionDatabase::getCurrentName(), getOptionBit(), option_array, option_pointer, option_struct, ghidra::Architecture::split_datatype_config, and ghidra::ActionDatabase::toggleAction().

◆ getOptionBit()

uint4 ghidra::OptionSplitDatatypes::getOptionBit ( const string &  val)
static

Translate option string to a configuration bit.

Possible value are:

  • (empty string) = 0
  • "struct" = 1
  • "array" = 2
  • "pointer" = 4
Parameters
valis the option string
Returns
the corresponding configuration bit

References option_array, option_pointer, and option_struct.

Referenced by apply().


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