ROSE  0.9.9.109
BinaryUnparserX86.h
1 #ifndef ROSE_BinaryAnalysis_UnparserX86_H
2 #define ROSE_BinaryAnalysis_UnparserX86_H
3 
4 #include <BinaryUnparserBase.h>
5 
6 namespace Rose {
7 namespace BinaryAnalysis {
8 namespace Unparser {
9 
10 struct X86Settings: public Settings {};
11 
12 class X86: public Base {
13  X86Settings settings_;
14 
15 protected:
16  explicit X86(const X86Settings &settings)
17  : settings_(settings) {}
18 
19 public:
20  static Ptr instance(const X86Settings &settings = X86Settings()) {
21  return Ptr(new X86(settings));
22  }
23 
24  Ptr copy() const ROSE_OVERRIDE {
25  return instance(settings());
26  }
27 
28  const X86Settings& settings() const ROSE_OVERRIDE { return settings_; }
29  X86Settings& settings() ROSE_OVERRIDE { return settings_; }
30 
31 protected:
32  void emitInstructionMnemonic(std::ostream&, SgAsmInstruction*, State&) const ROSE_OVERRIDE;
33  void emitOperandBody(std::ostream&, SgAsmExpression*, State&) const ROSE_OVERRIDE;
34  void emitTypeName(std::ostream&, SgAsmType*, State&) const ROSE_OVERRIDE;
35 
36 private:
37  void outputExpr(std::ostream&, SgAsmExpression*, State&) const;
38 };
39 
40 } // namespace
41 } // namespace
42 } // namespace
43 
44 #endif
Base class for machine instructions.
Abstract base class for unparsers.
Main namespace for the ROSE library.
Settings that control unparsing.
void emitTypeName(std::ostream &, SgAsmType *, State &) const ROSE_OVERRIDE
Mid-level unparser function.
Base class for expressions.
Base class for binary types.
void emitOperandBody(std::ostream &, SgAsmExpression *, State &) const ROSE_OVERRIDE
Mid-level unparser function.
void emitInstructionMnemonic(std::ostream &, SgAsmInstruction *, State &) const ROSE_OVERRIDE
Mid-level unparser function.