19 #ifndef __SLEIGH_ARCH__ 20 #define __SLEIGH_ARCH__ 22 #include "filemanage.hh" 36 const string &
getName(
void)
const {
return name; }
37 const string &
getSpec(
void)
const {
return spec; }
38 const string &
getId(
void)
const {
return id; }
60 vector<CompilerTag> compilers;
61 vector<TruncationTag> truncations;
72 const string &
getId(
void)
const {
return id; }
75 const CompilerTag &getCompiler(
const string &nm)
const;
90 static Sleigh *last_sleigh;
91 static int4 last_languageindex;
92 static vector<LanguageDescription> description;
96 static void loadLanguageDescription(
const string &specfile,ostream &errs);
97 bool isTranslateReused(
void);
101 static void collectSpecFiles(ostream &errs);
105 virtual void modifySpaces(
Translate *trans);
106 virtual void resolveArchitecture(
void);
111 void saveXmlHeader(ostream &s)
const;
112 void restoreXmlHeader(
const Element *el);
113 virtual void printMessage(
const string &message)
const { *errorstream << message << endl; }
115 virtual string getDescription(
void)
const;
117 static string normalizeProcessor(
const string &nm);
118 static string normalizeEndian(
const string &nm);
119 static string normalizeSize(
const string &nm);
120 static string normalizeArchitecture(
const string &nm);
121 static void scanForSleighDirectories(
const string &rootpath);
122 static void shutdown(
void);
A container for parsed XML documents.
Definition: xml.hh:249
ostream * errorstream
Error stream associated with this SleighArchitecture.
Definition: sleigh_arch.hh:99
Architecture and associated classes that help manage a single processor architecture and load image...
A collection of p-code injection payloads.
Definition: pcodeinject.hh:162
static FileManage specpaths
Known directories that contain .ldefs files.
Definition: sleigh_arch.hh:123
const string & getId(void) const
Get the string used as part of language id.
Definition: sleigh_arch.hh:38
Contents of the <language> tag in a .ldefs file.
Definition: sleigh_arch.hh:49
bool isDeprecated(void) const
Return true if this specification is deprecated.
Definition: sleigh_arch.hh:74
void restoreXml(const Element *el)
Restore the record from an XML stream.
Definition: sleigh_arch.cc:27
const string & getSlaFile(void) const
Get filename of the SLEIGH specification.
Definition: sleigh_arch.hh:70
An Architecture that uses the decompiler's native SLEIGH translation engine.
Definition: sleigh_arch.hh:89
const string & getVersion(void) const
Get the processor version.
Definition: sleigh_arch.hh:69
bool isBigEndian(void) const
Return true if the processor is big-endian.
Definition: sleigh_arch.hh:66
const string & getName(void) const
Get the human readable name of the spec.
Definition: sleigh_arch.hh:36
Definition: sleigh.hh:105
const string & getProcessorSpec(void) const
Get the filename of the processor specification.
Definition: sleigh_arch.hh:71
CompilerTag(void)
Constructor.
Definition: sleigh_arch.hh:34
The interface to a translation engine for a processor.
Definition: translate.hh:293
Manager for all the major decompiler subsystems.
Definition: architecture.hh:117
LanguageDescription(void)
Constructor.
Definition: sleigh_arch.hh:63
Object for describing how a space should be truncated.
Definition: translate.hh:63
An XML element. A node in the DOM tree.
Definition: xml.hh:150
Definition: filemanage.hh:29
const string & getDescription(void) const
Get a description of the processor.
Definition: sleigh_arch.hh:73
const string & getFilename(void) const
Get the executable filename.
Definition: sleigh_arch.hh:109
const TruncationTag & getTruncation(int4 i) const
Get the i-th truncation record.
Definition: sleigh_arch.hh:77
int4 getSize(void) const
Get the size of the address bus.
Definition: sleigh_arch.hh:67
virtual void printMessage(const string &message) const
Print an error message to console.
Definition: sleigh_arch.hh:113
const string & getSpec(void) const
Get the file-name.
Definition: sleigh_arch.hh:37
const string & getProcessor(void) const
Get the name of the processor.
Definition: sleigh_arch.hh:65
const string & getTarget(void) const
Get the language id of the active processor.
Definition: sleigh_arch.hh:110
const string & getId(void) const
Get the language id string associated with this processor.
Definition: sleigh_arch.hh:72
const string & getVariant(void) const
Get the processor variant.
Definition: sleigh_arch.hh:68
int4 numTruncations(void) const
Get the number of truncation records.
Definition: sleigh_arch.hh:76
Contents of a <compiler> tag in a .ldefs file.
Definition: sleigh_arch.hh:29