Ghidra Decompiler Analysis Engine
xml_arch.hh
Go to the documentation of this file.
1 /* ###
2  * IP: GHIDRA
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
18 #include "sleigh_arch.hh"
19 #include "loadimage_xml.hh"
20 
23  static XmlArchitectureCapability xmlArchitectureCapability;
27 public:
28  virtual Architecture *buildArchitecture(const string &filename,const string &target,ostream *estream);
29  virtual bool isFileMatch(const string &filename) const;
30  virtual bool isXmlMatch(Document *doc) const;
31 };
32 
35  long adjustvma;
36  virtual void buildLoader(DocumentStorage &store);
37  // virtual void resolveArchitecture(void); ///< Inherit SleighArchitecture's version
38  virtual void postSpecFile(void);
39 public:
40  virtual void saveXml(ostream &s) const;
41  virtual void restoreXml(DocumentStorage &store);
42  XmlArchitecture(const string &fname,const string &targ,ostream *estream);
43  virtual ~XmlArchitecture(void) {}
44 };
sleigh_arch.hh
Architecture objects that use a Translate object derived from Sleigh.
XmlArchitecture::restoreXml
virtual void restoreXml(DocumentStorage &store)
Restore the Architecture state from an XML stream.
Definition: xml_arch.cc:107
XmlArchitecture::XmlArchitecture
XmlArchitecture(const string &fname, const string &targ, ostream *estream)
Constructor.
Definition: xml_arch.cc:85
XmlArchitecture
An Architecture that loads executables using an XML format.
Definition: xml_arch.hh:34
Document
A complete in-memory XML document.
Definition: xml.hh:206
XmlArchitectureCapability::isFileMatch
virtual bool isFileMatch(const string &filename) const
Determine if this extension can handle this file.
Definition: xml_arch.cc:33
Architecture
Manager for all the major decompiler subsystems.
Definition: architecture.hh:119
SleighArchitecture
An Architecture that uses the decompiler's native SLEIGH translation engine.
Definition: sleigh_arch.hh:89
DocumentStorage
A container for parsed XML documents.
Definition: xml.hh:249
loadimage_xml.hh
Support for programs stored using an XML schema.
XmlArchitectureCapability
Extension for building an XML format capable Architecture.
Definition: xml_arch.hh:22
XmlArchitecture::saveXml
virtual void saveXml(ostream &s) const
Definition: xml_arch.cc:94
XmlArchitectureCapability::buildArchitecture
virtual Architecture * buildArchitecture(const string &filename, const string &target, ostream *estream)
Build an Architecture given a raw file or data.
Definition: xml_arch.cc:27
XmlArchitectureCapability::isXmlMatch
virtual bool isXmlMatch(Document *doc) const
Determine is this extension can handle this XML document.
Definition: xml_arch.cc:50
ArchitectureCapability
Abstract extension point for building Architecture objects.
Definition: architecture.hh:71