Ghidra Decompiler Analysis Engine
|
Go to the documentation of this file.
19 #ifndef __ARCH_OPTIONS__
20 #define __ARCH_OPTIONS__
36 string getName(
void)
const {
return name; }
49 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const=0;
51 static bool onOrOff(
const string &p);
65 map<string,ArchOption *> optionmap;
70 string set(
const string &nm,
const string &p1=
"",
const string &p2=
"",
const string &p3=
"");
78 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
84 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
90 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
96 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
102 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
108 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
114 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
120 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
126 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
132 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
138 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
144 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
150 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
156 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
162 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
168 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
174 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
180 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
186 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
192 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
198 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
204 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
210 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
216 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
222 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
228 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
234 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
240 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
246 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
252 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
258 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
264 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
270 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
276 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
282 virtual string apply(
Architecture *glb,
const string &p1,
const string &p2,
const string &p3)
const;
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:758
Establish a new root Action for the decompiler.
Definition: options.hh:201
Toggle whether the disassembly engine is allowed to modify context.
Definition: options.hh:213
~OptionDatabase(void)
Destructor.
Definition: options.cc:88
OptionDatabase(Architecture *g)
Construct given the owning Architecture.
Definition: options.cc:48
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:608
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:581
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:694
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:391
Toggle whether the decompiler attempts to recover for-loop variables.
Definition: options.hh:99
Base class for error handling facilities.
Toggle whether too many instructions in one function body is considered a fatal error.
Definition: options.hh:237
Maximum number of instructions that can be processed in a single function.
Definition: options.hh:273
Toggle whether unimplemented instructions are treated as a no-operation.
Definition: options.hh:219
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:323
string name
Name of the option.
Definition: options.hh:34
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:820
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:558
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:220
Toggle whether the decompiler should try to recover the table used to evaluate a switch.
Definition: options.hh:255
Set the default prototype model for analyzing unknown functions.
Definition: options.hh:87
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:298
Toggle whether the decompiler attempts to infer constant pointers.
Definition: options.hh:93
Toggle whether a specific Rule is applied in the current Action.
Definition: options.hh:261
Toggle whether implied extensions (ZEXT or SEXT) are printed.
Definition: options.hh:153
string set(const string &nm, const string &p1="", const string &p2="", const string &p3="")
Issue an option command.
Definition: options.cc:102
Set the prototype model to use when evaluating the parameters of the current function.
Definition: options.hh:243
An XML element. A node in the DOM tree.
Definition: xml.hh:150
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:743
void parseOne(const Element *el)
Unwrap and execute a single option XML tag.
Definition: options.cc:115
Set the current language emitted by the decompiler.
Definition: options.hh:249
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:865
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:625
Manager for all the major decompiler subsystems.
Definition: architecture.hh:119
Toggle whether a warning should be issued if a specific action/rule is applied.
Definition: options.hh:123
Mark/unmark a specific function as inline.
Definition: options.hh:105
Toggle whether in-place operators (+=, *=, &=, etc.) are emitted by the decompiler.
Definition: options.hh:135
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:232
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:205
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:671
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:719
Set the maximum number of characters per decompiled line.
Definition: options.hh:159
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:845
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const =0
Apply a particular configuration option to the Architecture.
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:341
Toggle whether unimplemented instructions are treated as a fatal error.
Definition: options.hh:225
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:780
Alter the "structure alignment" data organization setting.
Definition: options.hh:117
Toggle whether cast syntax is emitted by the decompiler or stripped.
Definition: options.hh:147
Toggle a sub-group of actions within a root Action.
Definition: options.hh:207
Set how locked data-types on the stack affect alias heuristics.
Definition: options.hh:267
Toggle whether read-only memory locations have their value propagated.
Definition: options.hh:81
static bool onOrOff(const string &p)
Parse an "on" or "off" string.
Definition: options.cc:25
Set the number of characters to indent per nested scope.
Definition: options.hh:165
How should namespace tokens be displayed.
Definition: options.hh:279
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:272
Mark/unmark a specific function with the noreturn property.
Definition: options.hh:111
Lightweight (and incomplete) XML parser for marshaling data to and from the decompiler.
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:258
Base class for options classes that affect the configuration of the Architecture object.
Definition: options.hh:32
Toggle whether the calling convention is printed when emitting function prototypes.
Definition: options.hh:141
void restoreXml(const Element *el)
Execute a series of option commands passed by XML.
Definition: options.cc:146
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:376
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:439
Toggle whether off-cut reinterpretation of an instruction is a fatal error.
Definition: options.hh:231
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:456
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:361
Toggle whether null pointers should be printed as the string "NULL".
Definition: options.hh:129
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:421
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:648
virtual string apply(Architecture *glb, const string &p1, const string &p2, const string &p3) const
Apply a particular configuration option to the Architecture.
Definition: options.cc:406
A Dispatcher for possible ArchOption commands.
Definition: options.hh:63