ROSE  0.11.98.0
Disassembler/Null.h
1 #ifndef ROSE_BinaryAnalysis_Disassembler_Null_H
2 #define ROSE_BinaryAnalysis_Disassembler_Null_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
5 
6 #include <Rose/BinaryAnalysis/Disassembler/Base.h>
7 #include <boost/serialization/access.hpp>
8 #include <boost/serialization/base_object.hpp>
9 
10 namespace Rose {
11 namespace BinaryAnalysis {
12 namespace Disassembler {
13 
18 class Null: public Base {
19 public:
21  using Ptr = NullPtr;
22 
23 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
24 private:
25  friend class boost::serialization::access;
26 
27  template<class S>
28  void serialize(S &s, const unsigned /*version*/) {
29  s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
30  }
31 #endif
32 
33 protected:
34  Null();
35 
36 public:
37  virtual ~Null();
38 
40  static Ptr instance();
41 
42  virtual Base::Ptr clone() const override;
43  virtual bool canDisassemble(SgAsmGenericHeader*) const override;
44  virtual Unparser::BasePtr unparser() const override;
45  virtual SgAsmInstruction* disassembleOne(const MemoryMap::Ptr&, rose_addr_t va, AddressSet *successors = NULL) override;
46  virtual SgAsmInstruction* makeUnknownInstruction(const Exception&) override;
47 };
48 
49 } // namespace
50 } // namespace
51 } // namespace
52 
53 #endif
54 #endif
virtual Unparser::BasePtr unparser() const override
Unparser.
virtual bool canDisassemble(SgAsmGenericHeader *) const override
Predicate determining the suitability of a disassembler for a specific file header.
Base class for machine instructions.
virtual SgAsmInstruction * makeUnknownInstruction(const Exception &) override
Makes an unknown instruction from an exception.
NullPtr Ptr
Reference counting pointer.
Main namespace for the ROSE library.
virtual Base::Ptr clone() const override
Creates a new copy of a disassembler.
Base class for container file headers.
static Ptr instance()
Allocating constructor.
Sawyer::SharedPointer< Null > NullPtr
Reference counted pointer for Null decoder.
Binary analysis.
virtual SgAsmInstruction * disassembleOne(const MemoryMap::Ptr &, rose_addr_t va, AddressSet *successors=NULL) override
This is the lowest level disassembly function and is implemented in the architecture-specific subclas...
Virtual base class for instruction disassemblers.