decompiler
1.0.0
|
Description of the indirect effect a sub-function has on a memory range. More...
#include <fspec.hh>
Public Types | |
enum | { unaffected = 1, killedbycall = 2, return_address = 3, unknown_effect = 4 } |
Public Member Functions | |
EffectRecord (void) | |
Constructor for use with restoreXml() | |
EffectRecord (const EffectRecord &op2) | |
Copy constructor. | |
EffectRecord (const Address &addr, int4 size) | |
Construct a memory range with an unknown effect. More... | |
EffectRecord (const ParamEntry &entry, uint4 t) | |
Construct an effect on a parameter storage location. More... | |
EffectRecord (const VarnodeData &addr, uint4 t) | |
Construct an effect on a memory range. More... | |
uint4 | getType (void) const |
Get the type of effect. | |
Address | getAddress (void) const |
Get the starting address of the affected range. | |
int4 | getSize (void) const |
Get the size of the affected range. | |
bool | operator< (const EffectRecord &op2) const |
Comparator for EffectRecords. More... | |
bool | operator== (const EffectRecord &op2) const |
Equality operator. | |
bool | operator!= (const EffectRecord &op2) const |
Inequality operator. | |
void | saveXml (ostream &s) const |
Save the record to an XML stream. More... | |
void | restoreXml (uint4 grouptype, const Element *el, const AddrSpaceManager *manage) |
Restore the record from an XML stream. More... | |
Private Attributes | |
VarnodeData | address |
The memory range affected. | |
uint4 | type |
The type of effect. | |
Description of the indirect effect a sub-function has on a memory range.
This object applies only to the specific memory range, which is seen from the point of view of the calling function as a particular sub-function gets called. The main enumeration below lists the possible effects.
anonymous enum |
Enumerator | |
---|---|
unaffected |
The sub-function does not change the value at all. |
killedbycall |
The memory is changed and is completely unrelated to its original value. |
return_address |
The memory is being used to pass back a return value from the sub-function. |
unknown_effect |
An unknown effect (indicates the absence of an EffectRecord) |
EffectRecord::EffectRecord | ( | const Address & | addr, |
int4 | size | ||
) |
Construct a memory range with an unknown effect.
The type is set to unknown_effect
addr | is the start of the memory range |
size | is the number of bytes in the memory range |
References Address::getOffset(), Address::getSpace(), and AddrSpace::type.
EffectRecord::EffectRecord | ( | const ParamEntry & | entry, |
uint4 | t | ||
) |
Construct an effect on a parameter storage location.
entry | is a model of the parameter storage |
t | is the effect type |
References ParamEntry::getBase(), ParamEntry::getSize(), ParamEntry::getSpace(), and AddrSpace::type.
EffectRecord::EffectRecord | ( | const VarnodeData & | data, |
uint4 | t | ||
) |
Construct an effect on a memory range.
data | is the memory range affected |
t | is the effect type |
References AddrSpace::type.
|
inline |
void EffectRecord::restoreXml | ( | uint4 | grouptype, |
const Element * | el, | ||
const AddrSpaceManager * | manage | ||
) |
Restore the record from an XML stream.
Reads an <addr> tag to get the memory range. The effect type is inherited from the parent.
grouptype | is the effect inherited from the parent |
el | is address element |
manage | is a manager to resolve address space references |
References AddrSpace::type.
void EffectRecord::saveXml | ( | ostream & | s | ) | const |
Save the record to an XML stream.
Writes just an <addr> tag. The effect type is indicated by the parent tag.
s | is the output stream |
References Address::saveXml(), and AddrSpace::type.