19 #ifndef __CPUI_TYPEVAR__ 20 #define __CPUI_TYPEVAR__ 59 vector<Varnode *> inst;
61 mutable uint4 highflags;
64 mutable Varnode *nameRepresentative;
65 mutable Cover wholecover;
67 mutable int4 symboloffset;
68 int4 instanceIndex(
const Varnode *vn)
const;
69 void updateFlags(
void)
const;
70 void updateCover(
void)
const;
71 void updateType(
void)
const;
72 void updateSymbol(
void)
const;
73 void setCopyIn1(
void)
const { highflags |=
copy_in1; }
74 void setCopyIn2(
void)
const { highflags |=
copy_in2; }
76 bool hasCopyIn1(
void)
const {
return ((highflags&
copy_in1)!=0); }
77 bool hasCopyIn2(
void)
const {
return ((highflags&
copy_in2)!=0); }
80 void setSymbol(
Varnode *vn)
const;
81 void setSymbolReference(
Symbol *sym,int4 off);
83 void coverDirty(
void)
const { highflags |=
coverdirty; }
84 void typeDirty(
void)
const { highflags |=
typedirty; }
85 void setUnmerged(
void)
const { highflags |=
unmerged; }
133 void saveXml(ostream &s)
const;
134 #ifdef MERGEMULTI_DEBUG 135 void verifyCover(
void)
const;
The symbol attachment is dirty.
Definition: variable.hh:50
static bool compareName(Varnode *vn1, Varnode *vn2)
Determine which given Varnode is most nameable.
Definition: variable.cc:201
The base datatype class for the decompiler.
Definition: type.hh:62
A storage location for a particular Symbol.
Definition: database.hh:51
Varnode * getTypeRepresentative(void) const
Get a member Varnode with the strongest data-type.
Definition: variable.cc:122
void saveXml(ostream &s) const
Save the variable to stream as an XML <high> tag.
Definition: variable.cc:452
Class for merging low-level Varnodes into high-level HighVariables.
Definition: merge.hh:80
Varnode has a database entry associated with it.
Definition: varnode.hh:99
Set if a final data-type is locked in and dirtying is disabled.
Definition: variable.hh:53
bool isConstant(void) const
Return true if this is a constant.
Definition: variable.hh:114
bool isTypeLock(void) const
Return true if this is typelocked.
Definition: variable.hh:131
This varnode is an annotation and has no dataflow.
Definition: varnode.hh:73
Varnode * getNameRepresentative(void) const
Get a member Varnode that dictates the naming of this HighVariable.
Definition: variable.cc:235
int4 getNumMergeClasses(void) const
Get the number of speculative merges for this.
Definition: variable.hh:107
Boolean properties for the HighVariable are dirty.
Definition: variable.hh:46
bool hasCover(void) const
Determine if this HighVariable has an associated cover.
Definition: variable.hh:126
The varnode is constant.
Definition: varnode.hh:72
SymbolEntry * getSymbolEntry(void) const
Definition: variable.cc:278
There exists at least 2 COPYs into this HighVariable from other HighVariables.
Definition: variable.hh:52
bool isPersist(void) const
Return true if this is a global variable.
Definition: variable.hh:109
bool isNameLock(void) const
Return true if this is namelocked.
Definition: variable.hh:132
The data-type for the HighVariable is dirty.
Definition: variable.hh:48
Varnode * getInstance(int4 i) const
Get the i-th member Varnode.
Definition: variable.hh:93
The value in this Varnode is created indirectly.
Definition: varnode.hh:100
bool isUnaffected(void) const
Return true if this is an unaffected register.
Definition: variable.hh:115
There exists at least 1 COPY into this HighVariable from other HighVariables.
Definition: variable.hh:51
The name representative for the HighVariable is dirty.
Definition: variable.hh:47
Prevents infinite loops.
Definition: varnode.hh:71
Persists after (and before) function.
Definition: varnode.hh:91
Varnode * getInputVarnode(void) const
Find (the) input member Varnode.
Definition: variable.cc:399
High-level variable is tied to address.
Definition: varnode.hh:92
Set if part of a multi-entry Symbol but did not get merged with other SymbolEntrys.
Definition: variable.hh:54
bool isUnattached(void) const
Return true if this has no member Varnode.
Definition: variable.hh:130
int4 numInstances(void) const
Get the number of member Varnodes this has.
Definition: variable.hh:92
bool isExtraOut(void) const
Return true if this is an extra output.
Definition: variable.hh:116
void print(ostream &s) const
Dump a description of this cover to stream.
Definition: cover.cc:554
The Name of the Varnode is locked.
Definition: varnode.hh:83
A low-level variable or contiguous set of bytes described by an Address and a size.
Definition: varnode.hh:65
int4 getSymbolOffset(void) const
Get the SymbolEntry mapping to this or null.
Definition: variable.hh:91
bool hasName(void) const
Check if this HighVariable can be named.
Definition: variable.cc:350
bool isInput(void) const
Return true if this is an input variable.
Definition: variable.hh:111
void finalizeDatatype(Datatype *tp)
Set a final datatype for this variable.
Definition: variable.cc:292
A description of the topological scope of a single variable object.
Definition: cover.hh:68
HighVariable(Varnode *vn)
Construct a HighVariable with a single member Varnode.
Definition: variable.cc:22
Definition: varnode.hh:76
This varnode is a temporary variable.
Definition: varnode.hh:79
Input which is unaffected by the function.
Definition: varnode.hh:93
void setMark(void) const
Set the mark on this variable.
Definition: variable.hh:117
The base class for a symbol in a symbol table or scope.
Definition: database.hh:153
This is a base register for an address space.
Definition: varnode.hh:94
The Varnode and VarnodeBank classes.
A high-level variable modeled as a list of low-level variables, each written once.
Definition: variable.hh:38
bool isUnmerged(void) const
Return true if this has merge problems.
Definition: variable.hh:120
bool isMark(void) const
Return true if this is marked.
Definition: variable.hh:119
The Dataype of the Varnode is locked.
Definition: varnode.hh:82
Varnode * getTiedVarnode(void) const
Find the first address tied member Varnode.
Definition: variable.cc:384
void clearMark(void) const
Clear the mark on this variable.
Definition: variable.hh:118
Datatype * getType(void) const
Get the data-type.
Definition: variable.hh:88
bool isAddrTied(void) const
Return true if this is address ties.
Definition: variable.hh:110
void printCover(ostream &s) const
Print details of the cover for this (for debug purposes)
Definition: variable.hh:99
static bool compareJustLoc(const Varnode *a, const Varnode *b)
Compare based on storage location.
Definition: variable.cc:184
bool isSpacebase(void) const
Return true if this is a spacebase.
Definition: variable.hh:113
Symbol * getSymbol(void) const
Get the Symbol associated with this or null.
Definition: variable.hh:89
The cover for the HighVariable is dirty.
Definition: variable.hh:49
void printInfo(ostream &s) const
Print information about this HighVariable to stream.
Definition: variable.cc:410
This varnode has no ancestor.
Definition: varnode.hh:74
bool isMapped(void) const
Return true if this is mapped.
Definition: variable.hh:108
bool isImplied(void) const
Return true if this is an implied variable.
Definition: variable.hh:112