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) |
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 destructor
The main resolver method.
Given a native constant in a specific context, resolve what address is being referred to.
val | is constant to be resolved to an address |
sz | is the size of val in context. |
point | is the address at which this constant is being used |
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.