27 #ifndef FCML_STATEFUL_DISASSEMBLER_HPP_ 28 #define FCML_STATEFUL_DISASSEMBLER_HPP_ 55 _disassembler(disassembler),
56 _disassemblerContext(context) {
57 _renderer = enableRendering ?
91 _disassembler.
disassemble(_disassemblerContext, _disassemblerResult);
119 _disassembler.
disassemble(_disassemblerContext, _disassemblerResult);
122 _renderer->
render(_rendererConfig, _disassemblerResult, instruction);
143 *
this >> instruction;
146 ostream << instruction << _endOfLine;
158 return _rendererConfig;
168 return _rendererConfig;
188 _endOfLine = endOfLine;
Disassembler wrapper.
Definition: fcml_disassembler.hpp:2211
Illegal state exception.
Definition: fcml_common.hpp:253
C++ wrapper for the FCML disassembler.
std::basic_string< fcml_char > fcml_cstring
By using this type definition here, it will be definitely much easier to support UNICODE in future re...
Definition: fcml_common.hpp:53
StatefulDisassembler(Disassembler &disassembler, DisassemblerContext &context, bool enableRendering=false)
Creates a stateful disassembler for given FCML disassembler and context.
Definition: fcml_stateful_disassembler.hpp:53
Disassembler configuration.
Definition: fcml_disassembler.hpp:58
#define FCML_TEXT(x)
Used to code literal strings.
Definition: fcml_types.h:61
virtual ~StatefulDisassembler()
Destructor.
Definition: fcml_stateful_disassembler.hpp:69
Dialect & getDialect() const
Gets dialect associated with the disassembler.
Definition: fcml_disassembler.hpp:2313
Definition: fcml_assembler.hpp:39
void setIncrementIp(bool incrementIp)
Definition: fcml_disassembler.hpp:132
void setThrowExceptionOnError(bool throwExceptionOnError)
Sets the way how the error handling is done.
Definition: fcml_renderer.hpp:127
StatefulDisassembler & operator>>(Instruction &instruction)
Disassembles the next instruction pointed by the disassembler state.
Definition: fcml_stateful_disassembler.hpp:82
C++ wrapper for FCML renderer.
fcml_ceh_error disassemble(DisassemblerContext &ctx, DisassemblerResult &disassemblerResult)
Disassembled the next instruction from the context.
Definition: fcml_disassembler.hpp:2253
Renderer configuration.
Definition: fcml_renderer.hpp:52
fcml_ceh_error render(const RenderConfig &renderConfig, DisassemblerResult &assemblerResult, fcml_cstring &result)
Renders a disassembled instruction.
Definition: fcml_renderer.hpp:185
const Instruction & getInstruction() const
Gets errors container with errors related to the failed disassembling process.
Definition: fcml_disassembler.hpp:1899
Disassembler result.
Definition: fcml_disassembler.hpp:1877
Stateful disassembler can be used when you have to disassemble a larger piece of code one instruction...
Definition: fcml_stateful_disassembler.hpp:42
const fcml_cstring & getEndOfLine() const
Gets end of line characters sequence used by the renderer.
Definition: fcml_stateful_disassembler.hpp:177
Describes an instruction.
Definition: fcml_common.hpp:7185
RenderConfig & getRendererConfig()
Gets renderer configuration used by the instruction buffer.
Definition: fcml_stateful_disassembler.hpp:157
std::basic_ostringstream< fcml_char > fcml_costream
String output stream.
Definition: fcml_common.hpp:59
const RenderConfig & getRendererConfig() const
Gets renderer configuration used by the internally managed instruction renderer.
Definition: fcml_stateful_disassembler.hpp:167
Disassembler context.
Definition: fcml_disassembler.hpp:183
void setThrowExceptionOnError(bool throwExceptionOnError)
Sets the way how the error handling is done.
Definition: fcml_disassembler.hpp:164
Renderer wrapper.
Definition: fcml_renderer.hpp:163
const DisassemblerConf & getDisassemblerConf() const
Gets a reference to the configuration object associated with the context.
Definition: fcml_disassembler.hpp:253
void setEndOfLine(const fcml_cstring &endOfLine)
Sets dedicated end of line characters.
Definition: fcml_stateful_disassembler.hpp:187