decompiler
1.0.0
|
A resolver for segmented architectures. More...
#include <architecture.hh>
Public Member Functions | |
SegmentedResolver (Architecture *g, AddrSpace *sp, SegmentOp *sop) | |
virtual Address | resolve (uintb val, int4 sz, const Address &point, uintb &fullEncoding) |
More... | |
Private Attributes | |
Architecture * | glb |
The architecture owning the segmented space. | |
AddrSpace * | spc |
The address space being segmented. | |
SegmentOp * | segop |
The segment operator. | |
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
|
inline |
Construct a segmented resolver
g | is the owning Architecture |
sp | is the segmented space |
sop | is the segment operator |
|
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.
val | is constant to be resolved to an address |
sz | is the size of val in context (or -1). |
point | is the address at which this constant is being used |
fullEncoding | is used to hold the full pointer encoding if val is a partial encoding |
Implements AddressResolver.
References AddrSpace::addressToByte(), and calc_mask().