Ghidra Decompiler Analysis Engine
Public Member Functions | List of all members
AddTreeState Class Reference

Structure for sorting out pointer expression trees. More...

#include <ruleaction.hh>

Public Member Functions

 AddTreeState (Funcdata &d, PcodeOp *op, int4 slot)
 Construct given root of ADD tree and pointer.
 
bool apply (void)
 Attempt to transform the pointer expression. More...
 

Detailed Description

Structure for sorting out pointer expression trees.

Given a base pointer of known data-type and an additive expression involving the pointer, group the terms of the expression into:

The multiple terms are rewritten using a CPUI_PTRADD. The constant offset is rewritten using a CPUI_PTRSUB. Other terms are added back in. Analysis may cause multiplication (CPUI_INT_MULT) by a constant to be distributed to its CPUI_INT_ADD input.

Member Function Documentation

◆ apply()

bool AddTreeState::apply ( void  )

Attempt to transform the pointer expression.

Returns
true if a transform was applied

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