Ghidra Decompiler Analysis Engine
raw_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.hh"
20 
23  static RawBinaryArchitectureCapability rawBinaryArchitectureCapability;
27 public:
28  virtual ~RawBinaryArchitectureCapability(void);
29  virtual Architecture *buildArchitecture(const string &filename,const string &target,ostream *estream);
30  virtual bool isFileMatch(const string &filename) const;
31  virtual bool isXmlMatch(Document *doc) const;
32 };
33 
36  long adjustvma;
37  virtual void buildLoader(DocumentStorage &store);
38  virtual void resolveArchitecture(void);
39  virtual void postSpecFile(void);
40 public:
41  virtual void saveXml(ostream &s) const;
42  virtual void restoreXml(DocumentStorage &store);
43  RawBinaryArchitecture(const string &fname,const string &targ,ostream *estream);
44  virtual ~RawBinaryArchitecture(void) {}
45 };
46 
sleigh_arch.hh
Architecture objects that use a Translate object derived from Sleigh.
RawBinaryArchitecture::RawBinaryArchitecture
RawBinaryArchitecture(const string &fname, const string &targ, ostream *estream)
Constructor.
Definition: raw_arch.cc:78
loadimage.hh
Classes and API for accessing a binary load image.
Document
A complete in-memory XML document.
Definition: xml.hh:206
RawBinaryArchitectureCapability::buildArchitecture
virtual Architecture * buildArchitecture(const string &filename, const string &target, ostream *estream)
Build an Architecture given a raw file or data.
Definition: raw_arch.cc:33
Architecture
Manager for all the major decompiler subsystems.
Definition: architecture.hh:119
RawBinaryArchitecture
Architecture that reads its binary as a raw file.
Definition: raw_arch.hh:35
RawBinaryArchitecture::saveXml
virtual void saveXml(ostream &s) const
Serialize this architecture to XML.
Definition: raw_arch.cc:84
RawBinaryArchitectureCapability
Extension point for building an Architecture that reads in raw images.
Definition: raw_arch.hh:22
SleighArchitecture
An Architecture that uses the decompiler's native SLEIGH translation engine.
Definition: sleigh_arch.hh:89
RawBinaryArchitectureCapability::isXmlMatch
virtual bool isXmlMatch(Document *doc) const
Determine is this extension can handle this XML document.
Definition: raw_arch.cc:45
RawBinaryArchitecture::restoreXml
virtual void restoreXml(DocumentStorage &store)
Restore the Architecture state from an XML stream.
Definition: raw_arch.cc:96
DocumentStorage
A container for parsed XML documents.
Definition: xml.hh:249
RawBinaryArchitectureCapability::isFileMatch
virtual bool isFileMatch(const string &filename) const
Determine if this extension can handle this file.
Definition: raw_arch.cc:39
ArchitectureCapability
Abstract extension point for building Architecture objects.
Definition: architecture.hh:71