| 
    Ghidra Decompiler Analysis Engine
    
   | 
 
The segmented address operator. More...
#include <userop.hh>


Public Member Functions | |
| SegmentOp (Architecture *g, const string &nm, int4 ind) | |
| Constructor.  More... | |
| virtual int4 | getNumVariableTerms (void) const | 
| Get the number of input Varnodes expected.  | |
| virtual bool | unify (Funcdata &data, PcodeOp *op, vector< Varnode * > &bindlist) const | 
| Gather the formal input Varnode objects given the root PcodeOp.  More... | |
| virtual uintb | execute (const vector< uintb > &input) const | 
| Compute the output value of this operation, given constant inputs.  More... | |
| virtual void | restoreXml (const Element *el) | 
| Restore the detailed description from an XML stream.  More... | |
  Public Member Functions inherited from UserPcodeOp | |
| virtual string | getOperatorName (const PcodeOp *op) const | 
| Get the symbol representing this operation in decompiled code.  More... | |
Additional Inherited Members | |
  Protected Attributes inherited from UserPcodeOp | |
| string | name | 
| Low-level name of p-code operator.  | |
| int4 | useropindex | 
| Index passed in the CALLOTHER op.  | |
| Architecture * | glb | 
| Architecture owning the user defined op.  | |
The segmented address operator.
This op is a placeholder for address mappings involving segments. The map goes between a high-level view of a pointer, consisting of multiple pieces, and a low-level view, where there is only a single absolute pointer. The mapping could be
The output of the operator is always a full low-level pointer. The operator takes two inputs:
High-level analysis can ignore the base/segment and any normalization on the near pointer. Emitted expressions involving this segment op prints only the near portion. Data-type information propagates only through this high-level side.
The decompiler looks for the term-tree defined in SegmentOp and replaces it with the SEGMENTOP operator in any p-code it analyzes. The core routine that looks for the term-tree is unify().
| SegmentOp::SegmentOp | ( | Architecture * | g, | 
| const string & | nm, | ||
| int4 | ind | ||
| ) | 
| g | is the owning Architecture for this instance of the segment operation | 
| nm | is the low-level name of the segment operation | 
| ind | is the constant id identifying the specific CALLOTHER variant | 
      
  | 
  virtual | 
Compute the output value of this operation, given constant inputs.
| input | is the ordered list of constant inputs | 
Implements TermPatternOp.
      
  | 
  virtual | 
Restore the detailed description from an XML stream.
The details of how a user defined operation behaves can be dynamically configured from an XML tag.
| el | is the root XML element describing the op | 
Implements UserPcodeOp.
      
  | 
  virtual | 
Gather the formal input Varnode objects given the root PcodeOp.
| data | is the function being analyzed | 
| op | is the root operation | 
| bindlist | will hold the ordered list of input Varnodes | 
Implements TermPatternOp.
 1.8.17