decompiler
1.0.0
|
Abstract class for emitting pcode to an application. More...
#include <translate.hh>
Public Member Functions | |
virtual | ~PcodeEmit (void) |
Virtual destructor. | |
virtual void | dump (const Address &addr, OpCode opc, VarnodeData *outvar, VarnodeData *vars, int4 isize)=0 |
The main pcode emit method. More... | |
void | decodeOp (const Address &addr, Decoder &decoder) |
Emit pcode directly from an <op> element. More... | |
Abstract class for emitting pcode to an application.
Translation engines pass back the generated pcode for an instruction to the application using this class.
Emit pcode directly from an <op> element.
A convenience method for passing around p-code operations via stream. A single p-code operation is parsed from an <op> element and returned to the application via the PcodeEmit::dump method.
addr | is the address (of the instruction) to associate with the p-code op |
decoder | is the stream decoder |
References ghidra::Decoder::closeElement(), ghidra::PcodeOpRaw::decode(), ghidra::Decoder::openElement(), and ghidra::Decoder::readSignedInteger().
Referenced by ghidra::InjectPayloadGhidra::inject(), ghidra::ExecutablePcodeGhidra::inject(), and ghidra::GhidraTranslate::oneInstruction().
|
pure virtual |
The main pcode emit method.
A single pcode instruction is returned to the application via this method. Particular applications override it to tailor how the operations are used.
addr | is the Address of the machine instruction |
opc | is the opcode of the particular pcode instruction |
outvar | if not null is a pointer to data about the output varnode |
vars | is a pointer to an array of VarnodeData for each input varnode |
isize | is the number of input varnodes |
Implemented in ghidra::PcodeEmitFd, and ghidra::PcodeEmitCache.
Referenced by ghidra::PcodeCacher::emit().