My Project
Public Member Functions | List of all members
SegmentedResolver Class Reference

A resolver for segmented architectures. More...

#include <architecture.hh>

Inheritance diagram for SegmentedResolver:
Inheritance graph
[legend]
Collaboration diagram for SegmentedResolver:
Collaboration graph
[legend]

Public Member Functions

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

Virtual destructor

More...
 

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

Member Function Documentation

◆ resolve()

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

Virtual destructor

The main resolver method.

Given a native constant in a specific context, resolve what address is being referred to. The constant can be a partially encoded pointer, in which case the full pointer encoding is recovered as well as the address. Whether or not a pointer is partially encoded or not is determined by the sz parameter, indicating the number of bytes in the pointer. A value of -1 here indicates that the pointer is known to be a full encoding.

Parameters
valis constant to be resolved to an address
szis the size of val in context (or -1).
pointis the address at which this constant is being used
fullEncodingis used to hold the full pointer encoding if val is a partial encoding
Returns
the resolved Address

Implements AddressResolver.


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