ROSE  0.11.2.0
BinaryUnparser.h
1 // Basic types for binary unparsing.
2 #ifndef ROSE_BinaryAnalysis_Unparser_H
3 #define ROSE_BinaryAnalysis_Unparser_H
4 
5 #include <rosePublicConfig.h>
6 #ifdef ROSE_BUILD_BINARY_ANALYSIS_SUPPORT
7 
8 #include <Sawyer/CommandLine.h>
9 #include <BaseSemantics2.h>
10 #include <BinaryEdgeArrows.h>
11 
12 namespace Rose {
13 namespace BinaryAnalysis {
14 namespace Unparser {
15 
21 struct Settings {
22  virtual ~Settings() {}
23 
24  struct {
28  struct {
29  bool showing;
30  } cg;
31  struct {
32  bool showing;
33  bool concrete;
34  } stackDelta;
35  struct {
36  bool showing;
37  } callconv;
38  struct {
39  bool showing;
40  } noop;
41  struct {
42  bool showing;
43  } mayReturn;
44  } function;
46  struct {
48  struct {
53  } cfg;
54  struct {
56  } reach;
57  } bblock;
59  struct {
61  } dblock;
62 
63  struct {
64  struct {
65  bool showing;
66  size_t fieldWidth;
67  } address;
69  struct {
70  bool showing;
71  size_t perLine;
72  size_t fieldWidth;
73  } bytes;
75  struct {
76  bool showing;
77  size_t fieldWidth;
78  } stackDelta;
80  struct {
81  size_t fieldWidth;
82  std::string semanticFailureMarker;
83  } mnemonic;
85  struct {
86  std::string separator;
87  size_t fieldWidth;
88  bool showingWidth;
89  } operands;
91  struct {
92  bool showing;
94  std::string pre;
95  std::string post;
96  size_t fieldWidth;
97  } comment;
99  struct {
100  bool showing;
102  bool tracing;
103  } semantics;
104  } insn;
106  struct {
108  } arrow;
110  Settings();
111  static Settings full();
112  static Settings minimal();
113 };
114 
115 // Forward declarations.
116 class Base;
117 class State;
118 typedef Sawyer::SharedPointer<Base> BasePtr;
119 
121 Sawyer::CommandLine::SwitchGroup commandLineSwitches(Settings &settings);
122 
123 } // namespace
124 } // namespace
125 } // namespace
126 
127 #endif
128 #endif
struct Rose::BinaryAnalysis::Unparser::Settings::@833 insn
Settings for instructions.
struct Rose::BinaryAnalysis::Unparser::Settings::@833::@846 operands
Settings for the operand list.
std::string semanticFailureMarker
Mark instruction if it had semantic failures.
struct Rose::BinaryAnalysis::Unparser::Settings::@830::@839 mayReturn
Settings for may-return analysis.
bool usingDescription
Lacking comment, use instruction description as comment?
size_t perLine
Max number of bytes to show per line of output.
struct Rose::BinaryAnalysis::Unparser::Settings::@830::@836 stackDelta
Settings for function stack deltas.
A collection of related switch declarations.
Main namespace for the ROSE library.
Settings that control unparsing.
bool showingPredecessors
Show basic block predecessors?
struct Rose::BinaryAnalysis::Unparser::Settings::@830::@837 callconv
Settings for function calling convention.
struct Rose::BinaryAnalysis::Unparser::Settings::@833::@843 bytes
Settings for the bytes that make up an instruction.
EdgeArrows::ArrowStylePreset style
One of the arrow style presets.
bool showingSharing
Show functions when block is shared?
bool showing
Show function call graph?
bool tracing
Show instruction semantics traces when showing semantics.
struct Rose::BinaryAnalysis::Unparser::Settings::@834 arrow
How to render arrows along the left margin.
bool showingReasons
Show reasons for function existing.
bool showingSourceLocation
Show source file name and line number when available.
std::string pre
String to introduce a comment.
struct Rose::BinaryAnalysis::Unparser::Settings::@830::@838 noop
Settings for no-op analysis.
struct Rose::BinaryAnalysis::Unparser::Settings::@833::@847 comment
Settings for instruction comments.
struct Rose::BinaryAnalysis::Unparser::Settings::@830::@835 cg
Settings for function call graphs.
bool showingArrows
Draw arrows from one block to another.
std::string separator
How to separate one operand from another.
struct Rose::BinaryAnalysis::Unparser::Settings::@831::@841 reach
Reachability analysis results.
struct Rose::BinaryAnalysis::Unparser::Settings::@831 bblock
Settings for basic blocks.
std::string post
String to terminate a comment.
struct Rose::BinaryAnalysis::Unparser::Settings::@833::@842 address
Settings for instruction starting addresses.
bool showingWidth
Show width of all expression terms in square brackets.
size_t fieldWidth
Min characters to use per insn address.
bool concrete
Show concrete or symbolic deltas.
bool showingDemangled
Show demangled name in preference to mangled name.
InstructionSemantics2::BaseSemantics::Formatter formatter
How to format the semantic state output.
bool showingReachability
Show code reachability in the basic block prologue area.
struct Rose::BinaryAnalysis::Unparser::Settings::@833::@845 mnemonic
Settings for instruction mnemonics.
bool showingSuccessors
Show basic block successors?
struct Rose::BinaryAnalysis::Unparser::Settings::@831::@840 cfg
Settings for control flow graphs.