Ghidra Decompiler Analysis Engine
|
Go to the documentation of this file.
18 #ifndef __SLEIGHBASE__
19 #define __SLEIGHBASE__
22 #include "slghsymbol.hh"
39 int4
index(
const string filename);
46 int4 leastUnusedIndex;
47 map<int4, string> indexToFile;
48 map<string, int4> fileToIndex;
58 static const int4 SLA_FORMAT_VERSION;
59 vector<string> userop;
60 map<VarnodeData,string> varnode_xref;
84 SleighSymbol *findGlobalSymbol(
const string &nm)
const {
return symtab.findGlobalSymbol(nm); }
SourceFileIndexer indexer
source file index used when generating SLEIGH constructor debug info
Definition: sleighbase.hh:67
void reregisterContext(void)
Reregister context fields for a new executable.
Definition: sleighbase.cc:109
int4 index(const string filename)
Returns the index of the file. If the file is not in the index it is added.
Definition: sleighbase.cc:22
A region where processor data is stored.
Definition: space.hh:73
Classes for disassembly and pcode generation.
virtual void getAllRegisters(map< VarnodeData, string > ®list) const
Get a list of all register names and the corresponding location.
Definition: sleighbase.cc:171
SleighBase(void)
Construct an uninitialized translator.
Definition: sleighbase.cc:62
class for recording source file information for SLEIGH constructors.
Definition: sleighbase.hh:34
virtual string getRegisterName(AddrSpace *base, uintb off, int4 size) const
Get the name of a register given its location.
Definition: sleighbase.cc:145
An XML element. A node in the DOM tree.
Definition: xml.hh:150
void saveXml(ostream &) const
save the index mapping to an XML file
Definition: sleighbase.cc:51
virtual const VarnodeData & getRegister(const string &nm) const
Get a register as VarnodeData given its name.
Definition: sleighbase.cc:134
Definition: slghsymbol.hh:564
void buildXrefs(vector< string > &errorPairs)
Build register map. Collect user-ops and context-fields.
Definition: sleighbase.cc:73
string getFilename(int4)
get the filename corresponding to an index
Definition: sleighbase.cc:36
void restoreXml(const Element *el)
read a stored index mapping from an XML file
Definition: sleighbase.cc:40
virtual void getUserOpNames(vector< string > &res) const
Get a list of all user-defined pcode ops.
Definition: sleighbase.cc:177
static const uintb MAX_UNIQUE_SIZE
Maximum size of a varnode in the unique space (should match value in SleighBase.java)
Definition: sleighbase.hh:72
uint4 maxdelayslotbytes
Maximum number of bytes in a delay-slot directive.
Definition: sleighbase.hh:64
SubtableSymbol * root
The root SLEIGH decoding symbol.
Definition: sleighbase.hh:62
The interface to a translation engine for a processor.
Definition: translate.hh:294
Definition: slghsymbol.hh:70
Common core of classes that read or write SLEIGH specification files natively.
Definition: sleighbase.hh:57
Data defining a specific memory location.
Definition: pcoderaw.hh:33
uint4 unique_allocatemask
Bits that are guaranteed to be zero in the unique allocation scheme.
Definition: sleighbase.hh:65
void saveXml(ostream &s) const
Write out the SLEIGH specification as an XML <sleigh> tag.
Definition: sleighbase.cc:185
virtual void addRegister(const string &nm, AddrSpace *base, uintb offset, int4 size)
Add a named register to the model for this processor.
Definition: sleighbase.cc:127
Definition: slghsymbol.hh:23
void restoreXml(const Element *el)
Read a SLEIGH specification from XML.
Definition: sleighbase.cc:222
int4 getIndex(const string)
get the index of a file. Error if the file is not in the index.
Definition: sleighbase.cc:32
SymbolTable symtab
The SLEIGH symbol table.
Definition: sleighbase.hh:63
uint4 numSections
Number of named sections.
Definition: sleighbase.hh:66