ROSE 0.11.145.192
Unparser/Settings.h
1// Basic types for binary unparsing.
2#ifndef ROSE_BinaryAnalysis_Unparser_Settings_H
3#define ROSE_BinaryAnalysis_Unparser_Settings_H
4#include <featureTests.h>
5#ifdef ROSE_ENABLE_BINARY_ANALYSIS
6
7#include <Rose/Color.h>
8#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics.h>
9#include <Rose/BinaryAnalysis/Unparser/EdgeArrows.h>
10#include <Sawyer/CommandLine.h>
11
12namespace Rose {
13namespace BinaryAnalysis {
14namespace Unparser {
15
24
30struct Settings {
31 virtual ~Settings() {}
32
35 struct {
36 struct {
38 } line;
39 struct {
42 } comment;
43
44 struct {
50 struct {
51 bool showing;
52 } cg;
53 struct {
54 bool showing;
55 bool concrete;
57 struct {
58 bool showing;
60 struct {
61 bool showing;
62 } noop;
63 struct {
64 bool showing;
68 struct {
70 struct {
76 } cfg;
77 struct {
83 struct {
85 } dblock;
86
87 struct {
88 struct {
89 bool showing;
90 bool useLabels;
91 size_t fieldWidth;
92 Style style;
95 struct {
96 bool showing;
97 size_t perLine;
98 size_t fieldWidth;
99 Style style;
102 struct {
103 bool showing;
104 size_t fieldWidth;
105 Style style;
108 struct {
109 bool showing;
110 size_t fieldWidth;
111 Style style;
114 struct {
115 size_t fieldWidth;
118 Style style;
121 struct {
122 std::string separator;
123 size_t fieldWidth;
125 Style style;
128 struct {
129 bool showing;
131 std::string pre;
132 std::string post;
133 size_t fieldWidth;
134 } comment;
136 struct {
137 bool showing;
139 bool tracing;
140 Style style;
141 } semantics;
144 struct {
148 std::string linePrefix;
149
150 Settings();
151 static Settings full();
152 static Settings minimal();
153};
154
155// Forward declarations.
156class Base;
157class State;
158typedef Sawyer::SharedPointer<Base> BasePtr;
159
162
163} // namespace
164} // namespace
165} // namespace
166
167#endif
168#endif
A collection of related switch declarations.
Holds a value or nothing.
Definition Optional.h:56
Reference-counting intrusive smart pointer.
Sawyer::CommandLine::SwitchGroup commandLineSwitches(Settings &settings)
Command-line switches for unparser settings.
The ROSE library.
Settings that control unparsing.
bool showingDemangled
Show demangled name in preference to mangled name.
struct Rose::BinaryAnalysis::Unparser::Settings::@688::@697 callconv
Settings for function calling convention.
bool showingPredecessors
Show basic block predecessors?
struct Rose::BinaryAnalysis::Unparser::Settings::@688::@696 stackDelta
Settings for function stack deltas.
size_t fieldWidth
Min characters to use per insn address.
bool showingReasons
Show reasons for function existing.
size_t perLine
Max number of bytes to show per line of output.
struct Rose::BinaryAnalysis::Unparser::Settings::@688::@695 cg
Settings for function call graphs.
struct Rose::BinaryAnalysis::Unparser::Settings::@691::@702 address
Settings for instruction starting addresses.
bool showingSourceLocation
Show source file name and line number when available.
InstructionSemantics::BaseSemantics::Formatter formatter
How to format the semantic state output.
std::string pre
String to introduce a comment.
bool showing
Show function call graph?
bool showingPostBlock
Show info about what happens after the last instruction.
std::string post
String to terminate a comment.
struct Rose::BinaryAnalysis::Unparser::Settings::@687::@693 line
Comment occupying an entire line.
struct Rose::BinaryAnalysis::Unparser::Settings::@687::@694 trailing
Comment extending to the end of the line.
bool tracing
Show instruction semantics traces when showing semantics.
bool showingSuccessors
Show basic block successors?
Style semanticFailureStyle
Style for the semantic failure indicator.
std::string semanticFailureMarker
Mark instruction if it had semantic failures.
struct Rose::BinaryAnalysis::Unparser::Settings::@689::@701 reach
Reachability analysis results.
bool showingReachability
Show code reachability in the basic block prologue area.
Style titleStyle
Style for title line of function.
Style separatorStyle
Style of the line separating functions.
struct Rose::BinaryAnalysis::Unparser::Settings::@691::@706 mnemonic
Settings for instruction mnemonics.
bool showingArrows
Draw arrows from one block to another.
struct Rose::BinaryAnalysis::Unparser::Settings::@688::@699 mayReturn
Settings for may-return analysis.
std::string separator
How to separate one operand from another.
struct Rose::BinaryAnalysis::Unparser::Settings::@689 bblock
Settings for basic blocks.
Color::Colorization colorization
Overrides for global color settings.
struct Rose::BinaryAnalysis::Unparser::Settings::@691 insn
Settings for instructions.
bool showingSharing
Show functions when block is shared?
struct Rose::BinaryAnalysis::Unparser::Settings::@691::@705 frameDelta
Settings for frame deltas.
struct Rose::BinaryAnalysis::Unparser::Settings::@691::@703 bytes
Settings for the bytes that make up an instruction.
struct Rose::BinaryAnalysis::Unparser::Settings::@688::@698 noop
Settings for no-op analysis.
Style style
Style for printing the address.
EdgeArrows::ArrowStylePreset style
One of the arrow style presets.
bool concrete
Show concrete or symbolic deltas.
bool useLabels
Generate labels and use them instead of addresses?
struct Rose::BinaryAnalysis::Unparser::Settings::@689::@700 cfg
Settings for control flow graphs.
struct Rose::BinaryAnalysis::Unparser::Settings::@692 arrow
How to render arrows along the left margin.
bool showingWidth
Show width of all expression terms in square brackets.
struct Rose::BinaryAnalysis::Unparser::Settings::@688 function
Settings for functions.
bool usingDescription
Lacking comment, use instruction description as comment?
struct Rose::BinaryAnalysis::Unparser::Settings::@691::@707 operands
Settings for the operand list.
Sawyer::Optional< Color::HSV > background
Optional background color.
Sawyer::Optional< Color::HSV > foreground
Optional foreground color.
std::string ansiStyle() const
Generate the ANSI escape for the style.
Control colored command output.
Definition Color.h:37