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

A resolver for segmented architectures. More...

#include <architecture.hh>

Inheritance diagram for SegmentedResolver:
AddressResolver

Public Member Functions

 SegmentedResolver (Architecture *g, AddrSpace *sp, SegmentOp *sop)
 
virtual Address resolve (uintb val, int4 sz, const Address &point)
 

Virtual destructor

More...
 

Private Attributes

Architectureglb
 The architecture owning the segmented space.
 
AddrSpacespc
 The address space being segmented.
 
SegmentOpsegop
 The segment operator.
 

Detailed Description

A resolver for segmented architectures.

When the decompiler is attempting to resolve embedded constants as pointers, this class tries to recover segment info for near pointers by looking up tracked registers in context

Constructor & Destructor Documentation

◆ SegmentedResolver()

SegmentedResolver::SegmentedResolver ( Architecture g,
AddrSpace sp,
SegmentOp sop 
)
inline

Construct a segmented resolver

Parameters
gis the owning Architecture
spis the segmented space
sopis the segment operator

References glb, segop, and spc.

Member Function Documentation

◆ resolve()

Address SegmentedResolver::resolve ( uintb  val,
int4  sz,
const Address point 
)
virtual

Virtual destructor

The main resolver method.

Given a native constant in a specific context, resolve what address is being referred to.

Parameters
valis constant to be resolved to an address
szis the size of val in context.
pointis the address at which this constant is being used
Returns
the resolved Address

Implements AddressResolver.

References AddrSpace::addressToByte(), calc_mask(), Architecture::context, SegmentOp::execute(), SegmentOp::getBaseSize(), SegmentOp::getInnerSize(), SegmentOp::getResolve(), ContextDatabase::getTrackedValue(), AddrSpace::getWordSize(), glb, segop, VarnodeData::space, and spc.


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