Ghidra Decompiler Analysis Engine
|
16 #ifndef __INJECT_SLEIGH__
17 #define __INJECT_SLEIGH__
42 virtual string getSource(
void)
const {
return source; }
45 const vector<InjectParameter> &
output,
const string &source);
47 const vector<InjectParameter> &
inputlist,
const vector<InjectParameter> &
output,
48 const string &source);
52 vector<string> targetSymbolNames;
79 map<Address,Document *> addrMap;
83 void restoreEntry(
const Element *el);
86 virtual string getSource(
void)
const {
return "dynamic"; }
91 vector<OpBehavior *> inst;
96 virtual int4
allocateInject(
const string &sourceName,
const string &name,int4 type);
101 virtual int4
manualCallFixup(
const string &name,
const string &snippetstring);
102 virtual int4
manualCallOtherFixup(
const string &name,
const string &outname,
const vector<string> &inname,
103 const string &snippet);
vector< InjectParameter > output
List of output parameters.
Definition: pcodeinject.hh:93
virtual void registerInject(int4 injectid)
Finalize a payload within the library, once the payload is initialized.
Definition: inject_sleigh.cc:356
Abstract class for emitting pcode to an application.
Definition: translate.hh:76
Definition: inject_sleigh.hh:77
Definition: inject_sleigh.hh:51
virtual int4 manualCallOtherFixup(const string &name, const string &outname, const vector< string > &inname, const string &snippet)
Manually add a callother-fixup payload given a compilable snippet of p-code source.
Definition: inject_sleigh.cc:428
virtual void restoreXml(const Element *el)
Restore this payload from an XML stream.
Definition: inject_sleigh.cc:141
Classes for managing p-code injection.
Definition: context.hh:68
virtual void printTemplate(ostream &s) const
Print the p-code ops of the injection to a stream (for debugging)
Definition: inject_sleigh.hh:85
virtual string getSource(void) const
Return a string describing the source of the injection (.cspec, prototype model, etc....
Definition: inject_sleigh.hh:42
virtual void inject(InjectContext &context, PcodeEmit &emit) const
Definition: inject_sleigh.cc:268
A collection of p-code injection payloads.
Definition: pcodeinject.hh:162
virtual void printTemplate(ostream &s) const
Print the p-code ops of the injection to a stream (for debugging)
Definition: inject_sleigh.cc:80
Definition: inject_sleigh.hh:31
An XML element. A node in the DOM tree.
Definition: xml.hh:150
Definition: inject_sleigh.hh:22
virtual void restoreXml(const Element *el)
Restore this payload from an XML stream.
Definition: inject_sleigh.cc:214
Manager for all the major decompiler subsystems.
Definition: architecture.hh:119
virtual int4 allocateInject(const string &sourceName, const string &name, int4 type)
Allocate a new InjectPayload object.
Definition: inject_sleigh.cc:341
virtual InjectContext & getCachedContext(void)
Retrieve a reusable context object for this library.
Definition: inject_sleigh.hh:104
virtual void inject(InjectContext &context, PcodeEmit &emit) const
Definition: inject_sleigh.cc:192
Context needed to emit a p-code injection as a full set of p-code operations.
Definition: pcodeinject.hh:56
An active container for a set of p-code operations that can be injected into data-flow.
Definition: pcodeinject.hh:78
virtual void restoreXml(const Element *el)
Restore this payload from an XML stream.
Definition: inject_sleigh.cc:64
virtual void saveXml(ostream &s) const
Save this context to an XML stream as a <context> tag.
Definition: inject_sleigh.hh:28
Definition: context.hh:163
Classes and utilities for the main SLEIGH engine.
Definition: inject_sleigh.hh:58
virtual void restoreDebug(const Element *el)
A method for reading in p-code generated externally for use in debugging.
Definition: inject_sleigh.cc:388
Class for caching a chunk of p-code, prior to emitting.
Definition: sleigh.hh:56
virtual void restoreXml(const Element *el)
Restore this payload from an XML stream.
Definition: inject_sleigh.cc:167
bool dynamic
True if the injection is generated dynamically.
Definition: pcodeinject.hh:89
virtual const vector< OpBehavior * > & getBehaviors(void)
Get the array of op-code behaviors for initializing and emulator.
Definition: inject_sleigh.cc:409
vector< InjectParameter > inputlist
List of input parameters to this payload.
Definition: pcodeinject.hh:92
virtual void inject(InjectContext &context, PcodeEmit &emit) const
Definition: inject_sleigh.cc:42
Common core of classes that read or write SLEIGH specification files natively.
Definition: sleighbase.hh:57
virtual string getSource(void) const
Return a string describing the source of the injection (.cspec, prototype model, etc....
Definition: inject_sleigh.hh:86
Definition: semantics.hh:161
Definition: inject_sleigh.hh:89
Definition: inject_sleigh.hh:64
A snippet of p-code that can be executed outside of normal analysis.
Definition: pcodeinject.hh:134
virtual int4 manualCallFixup(const string &name, const string &snippetstring)
Manually add a call-fixup payload given a compilable snippet of p-code source.
Definition: inject_sleigh.cc:417
virtual void printTemplate(ostream &s) const
Print the p-code ops of the injection to a stream (for debugging)
Definition: inject_sleigh.cc:232