decompiler  1.0.0
Public Member Functions | List of all members
AddressResolver Class Referenceabstract

Abstract class for converting native constants to addresses. More...

#include <translate.hh>

Inheritance diagram for AddressResolver:
SegmentedResolver

Public Member Functions

virtual Address resolve (uintb val, int4 sz, const Address &point, uintb &fullEncoding)=0
 

Virtual destructor

More...
 

Detailed Description

Abstract class for converting native constants to addresses.

This class is used if there is a special calculation to get from a constant embedded in the code being analyzed to the actual Address being referred to. This is used especially in the case of a segmented architecture, where "near" pointers must be extended to a full address with implied segment information.

Member Function Documentation

virtual Address AddressResolver::resolve ( uintb  val,
int4  sz,
const Address point,
uintb &  fullEncoding 
)
pure 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

Implemented in SegmentedResolver.

Referenced by AddrSpaceManager::resolveConstant().


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