ROSE 0.11.145.147
Rose/BinaryAnalysis/Unparser/Jvm.h
1#ifndef ROSE_BinaryAnalysis_Unparser_Jvm_H
2#define ROSE_BinaryAnalysis_Unparser_Jvm_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_BINARY_ANALYSIS
5
6#include <Rose/BinaryAnalysis/Unparser/Base.h>
7
8namespace Rose {
9namespace BinaryAnalysis {
10namespace Unparser {
11
12std::string unparseJvmMnemonic(SgAsmJvmInstruction*);
13std::string unparseJvmExpression(SgAsmExpression*, const LabelMap*);
14
16struct JvmSettings: public Settings {};
17
19class Jvm: public Base {
20 JvmSettings settings_;
21
22protected:
23 explicit Jvm(const Architecture::BaseConstPtr&, const JvmSettings&);
24
25public:
26 ~Jvm();
27
28 static Ptr instance(const Architecture::BaseConstPtr&, const JvmSettings& = JvmSettings());
29
30 Ptr copy() const override;
31
32 const JvmSettings& settings() const override { return settings_; }
33 JvmSettings& settings() override { return settings_; }
34
35protected:
36 void emitInstructionMnemonic(std::ostream&, SgAsmInstruction*, State&) const override;
37 void emitOperandBody(std::ostream&, SgAsmExpression*, State&) const override;
38
39private:
40 void outputExpr(std::ostream&, SgAsmExpression*, State&) const;
41};
42
43} // namespace
44} // namespace
45} // namespace
46
47#endif
48#endif
Abstract base class for unparsers.
const JvmSettings & settings() const override
Property: Settings associated with this unparser.
void emitOperandBody(std::ostream &, SgAsmExpression *, State &) const override
Mid-level unparser function.
void emitInstructionMnemonic(std::ostream &, SgAsmInstruction *, State &) const override
Mid-level unparser function.
JvmSettings & settings() override
Property: Settings associated with this unparser.
Base class for expressions.
Base class for machine instructions.
Represents one JVS machine instruction.
std::shared_ptr< const Base > BaseConstPtr
Reference counted pointer for Architecture::Base.
std::map< uint64_t, std::string > LabelMap
Map from address to label.
The ROSE library.
Settings that control unparsing.