decompiler  1.0.0
Public Member Functions | Private Member Functions | List of all members
LabSymbol Class Reference

A Symbol that labels code internal to a function. More...

#include <database.hh>

Inheritance diagram for LabSymbol:
Symbol

Public Member Functions

 LabSymbol (Scope *sc, const string &nm)
 Construct given name. More...
 
 LabSymbol (Scope *sc)
 Constructor for use with restoreXml. More...
 
virtual void saveXml (ostream &s) const
 Save this Symbol to an XML stream. More...
 
virtual void restoreXml (const Element *el)
 Restore this Symbol from an XML stream. More...
 
- Public Member Functions inherited from Symbol
 Symbol (Scope *sc, const string &nm, Datatype *ct)
 Construct given a name and data-type.
 
 Symbol (Scope *sc)
 Construct for use with restoreXml()
 
bool isNameUndefined (void) const
 Does this have an undefined name. More...
 
void setIsolated (bool val)
 Set whether this Symbol should be speculatively merged. More...
 
SymbolEntrygetFirstWholeMap (void) const
 Get the first entire mapping of the symbol. More...
 
SymbolEntrygetMapEntry (const Address &addr) const
 Get first mapping of the symbol that contains the given Address. More...
 
int4 getMapEntryPosition (const SymbolEntry *entry) const
 Position of given SymbolEntry within this multi-entry Symbol. More...
 
int4 getResolutionDepth (const Scope *useScope) const
 Get the number of scope names to print to resolve symbol in given context. More...
 
void saveXmlHeader (ostream &s) const
 Save basic Symbol properties as XML attributes. More...
 
void restoreXmlHeader (const Element *el)
 Restore basic Symbol properties from XML. More...
 
void saveXmlBody (ostream &s) const
 Save details of the Symbol to XML. More...
 
void restoreXmlBody (List::const_iterator iter)
 Restore details of the Symbol from XML. More...
 
virtual int4 getBytesConsumed (void) const
 Get number of bytes consumed within the address->symbol map. More...
 

Private Member Functions

void buildType (void)
 Build placeholder data-type. More...
 

Additional Inherited Members

- Public Types inherited from Symbol
enum  {
  force_hex = 1, force_dec = 2, force_oct = 3, force_bin = 4,
  force_char = 5, size_typelock = 8, isolate = 16, merge_problems = 32
}
 Possible display (dispflag) properties for a Symbol. More...
 
- Static Public Attributes inherited from Symbol
static uint8 ID_BASE = 0x4000000000000000L
 Base of internal ID's.
 
- Protected Member Functions inherited from Symbol
void setDisplayFormat (uint4 val)
 Set the display format for this Symbol. More...
 
void checkSizeTypeLock (void)
 Calculate if size_typelock property is on. More...
 
- Protected Attributes inherited from Symbol
Scopescope
 The scope that owns this symbol.
 
string name
 The local name of the symbol.
 
Datatypetype
 The symbol's data-type.
 
uint4 nameDedup
 id to distinguish symbols with the same name
 
uint4 flags
 Varnode-like properties of the symbol.
 
uint4 dispflags
 Flags affecting the display of this symbol.
 
int2 category
 Special category (-1==none 0=parameter 1=equate)
 
uint2 catindex
 Index within category.
 
uint8 symbolId
 Unique id, 0=unassigned.
 
vector< list< SymbolEntry >::iterator > mapentry
 List of storage locations labeled with this Symbol.
 
uint4 wholeCount
 Number of SymbolEntries that map to the whole Symbol.
 

Detailed Description

A Symbol that labels code internal to a function.

Constructor & Destructor Documentation

◆ LabSymbol() [1/2]

LabSymbol::LabSymbol ( Scope sc,
const string &  nm 
)

Construct given name.

Parameters
scis the Scope that will contain the new Symbol
nmis the name of the new Symbol

References buildType(), and Symbol::name.

◆ LabSymbol() [2/2]

LabSymbol::LabSymbol ( Scope sc)

Constructor for use with restoreXml.

Parameters
scis the Scope that will contain the new Symbol

References buildType().

Member Function Documentation

◆ buildType()

void LabSymbol::buildType ( void  )
private

Build placeholder data-type.

Label symbols don't really have a data-type, so we just put a size 1 placeholder.

References Symbol::scope, Symbol::type, and TYPE_UNKNOWN.

Referenced by LabSymbol().

◆ restoreXml()

void LabSymbol::restoreXml ( const Element el)
virtual

Restore this Symbol from an XML stream.

Parameters
elis the root XML tag of the symbol

Reimplemented from Symbol.

References Symbol::restoreXmlHeader().

◆ saveXml()

void LabSymbol::saveXml ( ostream &  s) const
virtual

Save this Symbol to an XML stream.

Parameters
sis the output stream

Reimplemented from Symbol.

References Symbol::saveXmlHeader().


The documentation for this class was generated from the following files: