Ghidra Decompiler Analysis Engine
Public Member Functions | Public Attributes | List of all members
InjectContext Class Referenceabstract

Context needed to emit a p-code injection as a full set of p-code operations. More...

#include <pcodeinject.hh>

Inheritance diagram for InjectContext:
Inheritance graph
[legend]
Collaboration diagram for InjectContext:
Collaboration graph
[legend]

Public Member Functions

virtual void saveXml (ostream &s) const =0
 Save this context to an XML stream as a <context> tag. More...
 

Public Attributes

Architectureglb
 Architecture associated with the injection.
 
Address baseaddr
 Address of instruction causing inject.
 
Address nextaddr
 Address of following instruction.
 
Address calladdr
 If the instruction being injected is a call, this is the address being called.
 
vector< VarnodeDatainputlist
 Storage location for input parameters.
 
vector< VarnodeDataoutput
 Storage location for output.
 

Detailed Description

Context needed to emit a p-code injection as a full set of p-code operations.

P-code injection works by passing a pre-built template of p-code operations (ConstructTpl) to an emitter (PcodeEmit), which makes the final resolution SLEIGH concepts like inst_next to concrete Varnodes. This class contains the context dependent data to resolve:

Member Function Documentation

◆ saveXml()

virtual void InjectContext::saveXml ( ostream &  s) const
pure virtual

Save this context to an XML stream as a <context> tag.

Parameters
sis the output stream

Implemented in InjectContextGhidra, and InjectContextSleigh.


The documentation for this class was generated from the following file: