23 #ifndef __CPUI_DATABASE__ 24 #define __CPUI_DATABASE__ 76 : uselimit(ul) { symbol = sym; extraflags=exfl; space = spc; offset = off; }
96 if (val) { useindex=0xffff; }
97 else { useindex=0; useoffset=0; }
101 useindex = op2.useindex;
102 useoffset = op2.useoffset;
106 if (useindex != op2.useindex)
107 return (useindex < op2.useindex);
108 return (useoffset < op2.useoffset);
138 void saveXml(ostream &s)
const;
172 void setDisplayFormat(uint4 val);
173 void checkSizeTypeLock(
void);
188 { scope=sc; name=nm; nameDedup=0; type=ct; flags=0; dispflags=0; category=-1; symbolId=0; wholeCount=0; }
191 Symbol(
Scope *sc) { scope=sc; nameDedup=0; flags=0; dispflags=0; category=-1; symbolId = 0; wholeCount=0; }
193 const string &
getName(
void)
const {
return name; }
195 uint8
getId(
void)
const {
return symbolId; }
205 bool isNameUndefined(
void)
const;
209 bool isIsolated(
void)
const {
return ((dispflags & isolate)!=0); }
210 void setIsolated(
bool val);
216 int4 getMapEntryPosition(
const SymbolEntry *entry)
const;
217 int4 getResolutionDepth(
const Scope *useScope)
const;
218 void saveXmlHeader(ostream &s)
const;
219 void restoreXmlHeader(
const Element *el);
220 void saveXmlBody(ostream &s)
const;
221 void restoreXmlBody(List::const_iterator iter);
222 virtual void saveXml(ostream &s)
const;
224 virtual int4 getBytesConsumed(
void)
const;
233 dispflags &= 0xfffffff8;
240 return extraflags | symbol->getFlags();
255 void buildType(
void);
260 virtual void saveXml(ostream &s)
const;
275 bool isValueClose(uintb op2Value,int4 size)
const;
276 virtual void saveXml(ostream &s)
const;
282 void buildType(
void);
286 virtual void saveXml(ostream &s)
const;
298 void buildNameType(
void);
304 virtual void saveXml(ostream &s)
const;
318 int4 comp = sym1->
name.compare(sym2->
name);
319 if (comp < 0)
return true;
320 if (comp > 0)
return false;
331 const vector<EntryMap *> *map;
332 vector<EntryMap *>::const_iterator curmap;
333 list<SymbolEntry>::const_iterator curiter;
343 vector<EntryMap *>::const_iterator cm,
344 list<SymbolEntry>::const_iterator ci) {
345 map = m; curmap = cm; curiter = ci;
350 map = op2.map; curmap = op2.curmap; curiter = op2.curiter;
360 curiter = op2.curiter;
366 if (curmap != op2.curmap)
return false;
367 if (curmap == map->end())
return true;
368 return (curiter==op2.curiter);
373 if (curmap != op2.curmap)
return true;
374 if (curmap == map->end())
return false;
375 return (curiter!=op2.curiter);
387 ScopeKey(
const string &nm,uint4
id) { name = nm; dedupId = id; }
388 bool operator<(
const ScopeKey &op2)
const;
415 friend class ScopeCompare;
419 void attachScope(
Scope *child);
420 void detachScope(ScopeMap::iterator iter);
421 void assignId(uint4 val) { uniqueId = val; }
428 static const Scope *stackAddr(
const Scope *scope1,
433 static const Scope *stackContainer(
const Scope *scope1,
438 static const Scope *stackClosestFit(
const Scope *scope1,
443 static const Scope *stackFunction(
const Scope *scope1,
447 static const Scope *stackExternalRef(
const Scope *scope1,
451 static const Scope *stackCodeLabel(
const Scope *scope1,
457 virtual void restrictScope(
Funcdata *f);
461 virtual void addRange(
AddrSpace *spc,uintb first,uintb last);
462 virtual void removeRange(
AddrSpace *spc,uintb first,uintb last);
467 virtual void addSymbolInternal(
Symbol *sym)=0;
494 virtual SymbolEntry *addDynamicMapInternal(
Symbol *sym,uint4 exfl,uint8 hash,int4 off,int4 sz,
499 #ifdef OPACTION_DEBUG 500 mutable bool debugon;
501 void turnOnDebug(
void)
const { debugon =
true; }
502 void turnOffDebug(
void)
const { debugon =
false; }
506 name = nm; glb = g; parent = (
Scope *)0; fd = (
Funcdata *)0; uniqueId = 0;
507 #ifdef OPACTION_DEBUG 511 virtual ~
Scope(
void);
514 virtual list<SymbolEntry>::const_iterator beginDynamic(
void)
const=0;
515 virtual list<SymbolEntry>::const_iterator endDynamic(
void)
const=0;
516 virtual list<SymbolEntry>::iterator beginDynamic(
void)=0;
517 virtual list<SymbolEntry>::iterator endDynamic(
void)=0;
518 virtual void clear(
void)=0;
519 virtual void clearCategory(int4 cat)=0;
520 virtual void clearUnlocked(
void)=0;
521 virtual void clearUnlockedCategory(int4 cat)=0;
532 return rangetree.
inRange(addr,size); }
534 virtual void removeSymbolMappings(
Symbol *symbol)=0;
535 virtual void removeSymbol(
Symbol *symbol)=0;
536 virtual void renameSymbol(
Symbol *sym,
const string &newname)=0;
544 virtual void setAttribute(
Symbol *sym,uint4 attr)=0;
545 virtual void clearAttribute(
Symbol *sym,uint4 attr)=0;
546 virtual void setDisplayFormat(
Symbol *sym,uint4 attr)=0;
564 const Address &usepoint)
const=0;
573 const Address &usepoint)
const=0;
605 virtual void findByName(
const string &name,vector<Symbol *> &res)
const=0;
613 virtual bool isNameUsed(
const string &name)
const=0;
629 virtual string buildVariableName(
const Address &addr,
631 Datatype *ct,int4 &index,uint4 flags)
const=0;
636 virtual string buildUndefinedName(
void)
const=0;
642 virtual string makeNameUnique(
const string &nm)
const=0;
644 virtual void saveXml(ostream &s)
const=0;
646 virtual void printEntries(ostream &s)
const=0;
652 virtual int4 getCategorySize(int4 cat)
const=0;
659 virtual Symbol *getCategorySymbol(int4 cat,int4 ind)
const=0;
666 virtual void setCategory(
Symbol *sym,int4 cat,int4 ind)=0;
671 const string &
getName(
void)
const {
return name; }
675 void queryByName(
const string &name,vector<Symbol *> &res)
const;
676 Funcdata *queryFunction(
const string &name)
const;
678 const Address &usepoint)
const;
680 const Address &usepoint)
const;
682 const Address &usepoint,uint4 &flags)
const;
687 Scope *resolveScope(
const string &name)
const;
690 ScopeMap::const_iterator
childrenEnd()
const {
return children.end(); }
691 void saveXmlRecursive(ostream &s,
bool onlyGlobal)
const;
693 void resetSizeLockType(
Symbol *sym);
694 bool isSubScope(
const Scope *scp)
const;
695 string getFullName(
void)
const;
696 void getNameSegments(vector<string> &vec)
const;
697 void getScopePath(vector<Scope *> &vec)
const;
698 bool isNameUsed(
const string &nm,
const Scope *op2)
const;
699 const Scope *findDistinguishingScope(
const Scope *op2)
const;
710 string buildDefaultName(
Symbol *sym,int4 &base,
Varnode *vn)
const;
711 bool isReadOnly(
const Address &addr,int4 size,
const Address &usepoint)
const;
722 void processHole(
const Element *el);
723 void insertNameTree(
Symbol *sym);
724 SymbolNameTree::const_iterator findFirstByName(
const string &name)
const;
726 virtual void addSymbolInternal(
Symbol *sym);
728 virtual SymbolEntry *addDynamicMapInternal(
Symbol *sym,uint4 exfl,uint8 hash,int4 off,int4 sz,
738 virtual void clear(
void);
739 virtual void categorySanity(
void);
740 virtual void clearCategory(int4 cat);
741 virtual void clearUnlocked(
void);
742 virtual void clearUnlockedCategory(int4 cat);
746 virtual list<SymbolEntry>::const_iterator beginDynamic(
void)
const;
747 virtual list<SymbolEntry>::const_iterator endDynamic(
void)
const;
748 virtual list<SymbolEntry>::iterator beginDynamic(
void);
749 virtual list<SymbolEntry>::iterator endDynamic(
void);
750 virtual void removeSymbolMappings(
Symbol *symbol);
751 virtual void removeSymbol(
Symbol *symbol);
752 virtual void renameSymbol(
Symbol *sym,
const string &newname);
754 virtual void setAttribute(
Symbol *sym,uint4 attr);
755 virtual void clearAttribute(
Symbol *sym,uint4 attr);
756 virtual void setDisplayFormat(
Symbol *sym,uint4 attr);
760 const Address &usepoint)
const;
762 const Address &usepoint)
const;
768 virtual void findByName(
const string &name,vector<Symbol *> &res)
const;
769 virtual bool isNameUsed(
const string &name)
const;
772 virtual string buildVariableName(
const Address &addr,
774 Datatype *ct,int4 &index,uint4 flags)
const;
775 virtual string buildUndefinedName(
void)
const;
776 virtual string makeNameUnique(
const string &nm)
const;
777 virtual void saveXml(ostream &s)
const;
779 virtual void printEntries(ostream &s)
const;
780 virtual int4 getCategorySize(int4 cat)
const;
781 virtual Symbol *getCategorySymbol(int4 cat,int4 ind)
const;
782 virtual void setCategory(
Symbol *sym,int4 cat,int4 ind);
783 void assignDefaultNames(int4 &base);
784 set<Symbol *>::const_iterator
beginMultiEntry(
void)
const {
return multiEntrySet.begin(); }
785 set<Symbol *>::const_iterator
endMultiEntry(
void)
const {
return multiEntrySet.end(); }
786 static void savePathXml(ostream &s,
const vector<string> &vec);
787 static void restorePathXml(vector<string> &vec,
const Element *el);
801 NullSubsort(
bool val) {}
802 NullSubsort(
const NullSubsort &op2) {}
803 bool operator<(
const NullSubsort &op2) {
return false; }
820 scope = data; first = f; last = l; }
844 void clearResolve(
Scope *scope);
845 void clearResolveRecursive(
Scope *scope);
846 void fillResolve(
Scope *scope);
847 static void parseParentTag(
const Element *el,
string &name,vector<string> &parnames);
852 void attachScope(
Scope *newscope,
Scope *parent);
853 void deleteScope(
Scope *scope);
854 void deleteSubScopes(
Scope *scope);
855 void clearUnlocked(
Scope *scope);
857 void addRange(
Scope *scope,
AddrSpace *spc,uintb first,uintb last);
858 void removeRange(
Scope *scope,
AddrSpace *spc,uintb first,uintb last);
860 Scope *resolveScope(
const vector<string> &subnames)
const;
861 Scope *resolveScopeSymbolName(
const string &fullname,
const string &delim,
string &basename,
Scope *start)
const;
865 void setPropertyRange(uint4 flags,
const Range &range);
868 void saveXml(ostream &s)
const;
870 void restoreXmlScope(
const Element *el,
Scope *new_scope);
vector< vector< Symbol * > > category
References to Symbol objects organized by category.
Definition: database.hh:732
Symbol(Scope *sc)
Construct for use with restoreXml()
Definition: database.hh:191
uint2 catindex
Index within category.
Definition: database.hh:167
bool inUse(const Address &usepoint) const
Is this storage valid for the given code address.
Definition: database.cc:90
bool isHiddenReturn(void) const
Is this a reference to the function return value.
Definition: database.hh:204
A region where processor data is stored.
Definition: space.hh:73
const _valuetype & defaultValue(void) const
Get the default value object.
Definition: partmap.hh:61
uint4 dispflags
Flags affecting the display of this symbol.
Definition: database.hh:165
void printBounds(ostream &s) const
Print a description of this Scope's owned memory ranges.
Definition: database.hh:712
bool isPiece(void) const
Is this a high or low piece of the whole Symbol.
Definition: database.hh:117
The base datatype class for the decompiler.
Definition: type.hh:62
static uint8 ID_BASE
Base of internal ID's.
Definition: database.hh:225
void saveXml(ostream &s) const
Save this to an XML stream.
Definition: database.cc:176
uint4 getAllFlags(void) const
Get all Varnode flags for this storage.
Definition: database.hh:239
list< SymbolEntry > dynamicentry
Dynamic symbol entries.
Definition: database.hh:733
A storage location for a particular Symbol.
Definition: database.hh:51
int4 getSize(void) const
Get the number of bytes consumed by this storage.
Definition: database.hh:129
Is this Varnode the high part of a double precision value.
Definition: varnode.hh:104
bool isInvalid(void) const
Is this storage invalid.
Definition: database.hh:119
A manager for different address spaces.
Definition: translate.hh:218
uint8 nextUniqueId
Next available symbol id.
Definition: database.hh:735
virtual ~Symbol(void)
Destructor.
Definition: database.hh:171
Datatype * getSizedType(const Address &addr, int4 sz) const
Get the data-type associated with (a piece of) this.
Definition: database.cc:127
Address linetype
The linear element for a rangemap.
Definition: database.hh:806
Datatype * getType(void) const
Get the data-type.
Definition: database.hh:194
EntrySubsort(const Address &addr)
Construct given a sub-sorting address.
Definition: database.hh:88
Container for data structures associated with a single function.
Definition: funcdata.hh:45
void printEntry(ostream &s) const
Dump a description of this to a stream.
Definition: database.cc:155
const Address & getAddr(void) const
Get the starting address of this storage.
Definition: database.hh:127
Architecture * getArch(void) const
Get the Architecture associate with this.
Definition: database.hh:851
A function Symbol referring to an external location.
Definition: database.hh:296
A manager for symbol scopes for a whole executable.
Definition: database.hh:838
bool isIsolated(void) const
Return true if this is isolated from speculative merging.
Definition: database.hh:209
Scope * inittype
Initialization data for a ScopeMapper.
Definition: database.hh:808
A contiguous range of bytes in some address space.
Definition: address.hh:161
uint8 getId(void) const
Get a unique id for the symbol.
Definition: database.hh:195
const RangeList & getRangeTree(void) const
Access the address ranges owned by this Scope.
Definition: database.hh:456
Definitions for high-level variables.
bool isMultiEntry(void) const
Does this have more than one entire mapping.
Definition: database.hh:206
int2 category
Special category (-1==none 0=parameter 1=equate)
Definition: database.hh:166
A disjoint set of Ranges, possibly across multiple address spaces.
Definition: address.hh:203
void setDisplayFormat(uint4 val)
Set the display format for this Symbol.
Definition: database.hh:230
ScopeMap::const_iterator childrenBegin() const
Beginning iterator of child scopes.
Definition: database.hh:689
SymbolNameTree multiEntrySet
Set of symbols with multiple entries.
Definition: database.hh:734
_valuetype & getValue(const _linetype &pnt)
Get the value object at a point.
Definition: partmap.hh:81
map< ScopeKey, Scope * > ScopeMap
A map from ScopeKey to Scope.
Definition: database.hh:390
Funcdata * fd
(If non-null) the function which this is the local Scope for
Definition: database.hh:426
string name
The local name of the symbol.
Definition: database.hh:159
Scope * getGlobalScope(void) const
Get the global Scope.
Definition: database.hh:859
An iterator over SymbolEntry objects in multiple address spaces.
Definition: database.hh:330
Architecture * glb
Architecture of this scope.
Definition: database.hh:424
MapIterator(const MapIterator &op2)
Copy constructor.
Definition: database.hh:349
bool isNameLocked(void) const
Is the Symbol name-locked.
Definition: database.hh:201
Datatype * type
The symbol's data-type.
Definition: database.hh:160
rangemap< SymbolEntry > EntryMap
A rangemap of SymbolEntry.
Definition: database.hh:141
bool isSizeTypeLocked(void) const
Is the Symbol size type-locked.
Definition: database.hh:202
A Symbol representing an executable function.
Definition: database.hh:251
EquateSymbol(Scope *sc)
Constructor for use with restoreXml.
Definition: database.hh:273
Templates to define interval map containers.
EntryInitData inittype
Initialization data for a SymbolEntry in a rangemap.
Definition: database.hh:113
Scope * getScope(void) const
Get the Scope owning this address range.
Definition: database.hh:818
bool isGlobal(void) const
Return true if this scope is global.
Definition: database.hh:672
subsorttype getSubsort(void) const
Get the sub-sort object.
Definition: database.cc:73
SymbolNameTree nametree
The set of Symbol objects, sorted by name.
Definition: database.hh:730
vector< list< SymbolEntry >::iterator > mapentry
List of storage locations labeled with this Symbol.
Definition: database.hh:169
bool inRange(const Address &addr, int4 size) const
Check containment an address range.
Definition: address.cc:402
An Address range associated with the symbol Scope that owns it.
Definition: database.hh:795
A Symbol that labels code internal to a function.
Definition: database.hh:281
A low-level machine address for labelling bytes and data.
Definition: address.hh:46
MapIterator(void)
Construct an uninitialized iterator.
Definition: database.hh:335
Database(Architecture *g)
Constructor.
Definition: database.hh:849
const Address & getRefAddr(void) const
Return the placeholder address.
Definition: database.hh:303
EntrySubsort(void)
Construct earliest possible sub-sort.
Definition: database.hh:90
Symbol(Scope *sc, const string &nm, Datatype *ct)
Construct given a name and data-type.
Definition: database.hh:187
EntrySubsort subsorttype
The sub-sort object for a rangemap.
Definition: database.hh:112
uint4 uniqueId
Unique id for the scope, for deduping scope names, assigning symbol ids.
Definition: database.hh:427
void initialize(const inittype &data, const Address &f, const Address &l)
Initialize the range (with the owning Scope)
Definition: database.hh:819
AddrSpace * getSpace(void) const
Get the address space.
Definition: address.hh:294
List::const_iterator restoreXml(List::const_iterator iter, const AddrSpaceManager *manage)
Restore this from an XML stream.
Definition: database.cc:195
Is this Varnode storing a pointer to the actual symbol.
Definition: varnode.hh:105
bool hasMergeProblems(void) const
Were some SymbolEntrys not merged.
Definition: database.hh:207
High-level variable is tied to address.
Definition: varnode.hh:92
void setSymbolId(Symbol *sym, uint8 id) const
Adjust the id associated with a symbol.
Definition: database.hh:497
The partmap<> template mapping a linear space to value objects.
Manager for all the major decompiler subsystems.
Definition: architecture.hh:117
const RangeList & getUseLimit(void) const
Get the set of valid code addresses for this storage.
Definition: database.hh:131
bool operator==(const MapIterator &op2) const
Equality operator.
Definition: database.hh:365
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
set< Symbol * >::const_iterator endMultiEntry(void) const
End of symbols with more than one entry.
Definition: database.hh:785
void setUseLimit(const RangeList &uselim)
Set the range of code addresses where this is valid.
Definition: database.hh:133
bool updateType(Varnode *vn) const
Update a Varnode data-type from this.
Definition: database.cc:111
uint8 symbolId
Unique id, 0=unassigned.
Definition: database.hh:168
bool isInvalid(void) const
Is the address invalid?
Definition: address.hh:256
string name
Name of this scope.
Definition: database.hh:425
An XML element. A node in the DOM tree.
Definition: xml.hh:150
Address getFirstUseAddress(void) const
Get the first code address where this storage is valid.
Definition: database.cc:98
virtual int4 getBytesConsumed(void) const
Get number of bytes consumed within the address->symbol map.
Definition: database.hh:262
uintb getOffset(void) const
Get the address offset.
Definition: address.hh:300
A key for looking up child symbol scopes within a parent, based on name.
Definition: database.hh:383
NullSubsort subsorttype
The sub-sort object for a rangemap.
Definition: database.hh:807
int2 getCategory(void) const
Get the Symbol category.
Definition: database.hh:198
void printBounds(ostream &s) const
Print a description of this RangeList to stream.
Definition: address.cc:522
virtual bool inScope(const Address &addr, int4 size, const Address &usepoint) const
Query if the given range is owned by this Scope.
Definition: database.hh:531
EntrySubsort(const EntrySubsort &op2)
Copy constructor.
Definition: database.hh:100
Does this varnode point to the return value storage location.
Definition: varnode.hh:106
void setProperties(const partmap< Address, uint4 > &newflags)
Replace the property map.
Definition: database.hh:866
A Symbol that holds equate information for a constant.
Definition: database.hh:270
Address getLast(void) const
Get the last address in the range.
Definition: database.hh:816
uintb getLast(void) const
Get the last offset of this storage location.
Definition: database.hh:123
An interval map container.
Definition: rangemap.hh:65
uintb linetype
The linear element for a rangemap of SymbolEntry.
Definition: database.hh:111
An in-memory implementation of the Scope interface.
Definition: database.hh:721
Initialization data for a SymbolEntry to facilitate a rangemap.
Definition: database.hh:67
void initialize(const EntryInitData &data, uintb a, uintb b)
Fully initialize this.
Definition: database.cc:60
uint4 wholeCount
Number of SymbolEntries that map to the whole Symbol.
Definition: database.hh:170
uint4 getDisplayFormat(void) const
Get the format to display the Symbol in.
Definition: database.hh:197
Class for sub-sorting different SymbolEntry objects at the same address.
Definition: database.hh:83
bool isIndirectStorage(void) const
Is storage really a pointer to the true Symbol.
Definition: database.hh:203
uint4 getProperty(const Address &addr) const
Get boolean properties at the given address.
Definition: database.hh:864
vector< EntryMap * > maptable
Rangemaps of SymbolEntry, one map for each address space.
Definition: database.hh:731
EntryInitData(Symbol *sym, uint4 exfl, AddrSpace *spc, int4 off, const RangeList &ul)
Constructor.
Definition: database.hh:75
Symbol * getSymbol(void) const
Get the Symbol associated with this.
Definition: database.hh:126
uintb getFirst(void) const
Get the first offset of this storage location.
Definition: database.hh:122
const string & getName(void) const
Get the local name of the symbol.
Definition: database.hh:193
bool isAddrTied(void) const
Is this storage address tied.
Definition: database.hh:243
bool operator!=(const MapIterator &op2) const
Inequality operator.
Definition: database.hh:372
MapIterator(const vector< EntryMap *> *m, vector< EntryMap *>::const_iterator cm, list< SymbolEntry >::const_iterator ci)
Construct iterator at a specific position.
Definition: database.hh:342
The base class for a symbol in a symbol table or scope.
Definition: database.hh:153
bool isTypeLocked(void) const
Is the Symbol type-locked.
Definition: database.hh:200
bool isDynamic(void) const
Is storage dynamic.
Definition: database.hh:118
Comparator for sorting Symbol objects by name.
Definition: database.hh:309
The Dataype of the Varnode is locked.
Definition: varnode.hh:82
uint8 getHash(void) const
Get the hash used to identify this storage.
Definition: database.hh:128
set< Symbol * >::const_iterator beginMultiEntry(void) const
Start of symbols with more than one entry.
Definition: database.hh:784
MapIterator & operator=(const MapIterator &op2)
Assignment operator.
Definition: database.hh:357
Address getFirst(void) const
Get the first address in the range.
Definition: database.hh:815
void setMergeProblems(void)
Mark that some SymbolEntrys could not be merged.
Definition: database.hh:208
Scope * scope
The scope that owns this symbol.
Definition: database.hh:158
bool operator<(const EntrySubsort &op2)
Compare this with another sub-sort.
Definition: database.hh:105
int4 getIndex(void) const
Get the integer identifier.
Definition: space.hh:317
NullSubsort getSubsort(void) const
Get the sub-subsort object.
Definition: database.hh:817
EntrySubsort(bool val)
Given a boolean value, construct the earliest/latest possible sub-sort.
Definition: database.hh:95
Architecture * getArch(void) const
Get the Architecture associated with this.
Definition: database.hh:700
uint2 getCategoryIndex(void) const
Get the position of the Symbol within its category.
Definition: database.hh:199
uint4 getFlags(void) const
Get the boolean properties of the Symbol.
Definition: database.hh:196
int4 getOffset(void) const
Get offset of this within the Symbol.
Definition: database.hh:121
ScopeMapper(void)
Constructor for use with rangemap.
Definition: database.hh:814
uint4 nameDedup
id to distinguish symbols with the same name
Definition: database.hh:161
const SymbolEntry * operator*(void) const
Return the SymbolEntry being pointed at.
Definition: database.hh:352
bool operator()(const Symbol *sym1, const Symbol *sym2) const
Compare two Symbol pointers.
Definition: database.hh:317
ScopeMap::const_iterator childrenEnd() const
Ending iterator of child scopes.
Definition: database.hh:690
Scope * getScope(void) const
Get the scope owning this Symbol.
Definition: database.hh:211
set< Symbol *, SymbolCompareName > SymbolNameTree
A set of Symbol objects sorted by name.
Definition: database.hh:324
ScopeKey(const string &nm, uint4 id)
Construct given a name and id.
Definition: database.hh:387
SymbolEntry * getMapEntry(int4 i) const
Return the i-th SymbolEntry for this Symbol.
Definition: database.hh:215
The base class API for emitting a high-level language.
Definition: printlanguage.hh:134
const string & getName(void) const
Get the name of the Scope.
Definition: database.hh:671
int4 numEntries(void) const
Return the number of SymbolEntrys.
Definition: database.hh:214
rangemap< ScopeMapper > ScopeResolve
A map from address to the owning Scope.
Definition: database.hh:822
uint4 flags
Varnode-like properties of the symbol.
Definition: database.hh:162
Scope * getParent(void) const
Get the parent Scope (or NULL if this is the global Scope)
Definition: database.hh:701
SymbolEntry(void)
Constructor for use with rangemap.
Definition: database.hh:115
ExternRefSymbol(Scope *sc)
For use with restoreXml.
Definition: database.hh:302
uintb getValue(void) const
Get the constant value.
Definition: database.hh:274
const partmap< Address, uint4 > & getProperties(void) const
Get the entire property map.
Definition: database.hh:867
A collection of Symbol objects within a single (namespace or functional) scope.
Definition: database.hh:413
Is this Varnode the low part of a double precision value.
Definition: varnode.hh:103