Ghidra Decompiler Analysis Engine
|
Go to the documentation of this file.
19 #ifndef __INJECT_GHIDRA__
20 #define __INJECT_GHIDRA__
31 virtual void saveXml(ostream &s)
const;
46 virtual string getSource(
void)
const {
return source; }
82 vector<OpBehavior *> inst;
83 virtual int4 allocateInject(
const string &sourceName,
const string &name,int4 type);
84 virtual void registerInject(int4 injectid);
88 virtual int4
manualCallOtherFixup(
const string &name,
const string &outname,
const vector<string> &inname,
89 const string &snippet);
virtual void restoreXml(const Element *el)
Restore this payload from an XML stream.
Definition: inject_ghidra.cc:83
An injection payload that uses a Ghidra client to generate the p-code ops.
Definition: inject_ghidra.hh:39
Abstract class for emitting pcode to an application.
Definition: translate.hh:76
Ghidra specific architecture information and connection to a Ghidra client.
A p-code injection library that uses a Ghidra client to generate/compile the injection p-code.
Definition: inject_ghidra.hh:80
ExecutablePcodeGhidra(Architecture *g, const string &src, const string &nm)
Constructor.
Definition: inject_ghidra.cc:106
Classes for managing p-code injection.
A callother-fixup injection that uses a Ghidra client to generate the p-code ops.
Definition: inject_ghidra.hh:57
virtual void saveXml(ostream &s) const
Save this context to an XML stream as a <context> tag.
Definition: inject_ghidra.cc:18
virtual void restoreXml(const Element *el)
Restore this payload from an XML stream.
Definition: inject_ghidra.hh:44
A collection of p-code injection payloads.
Definition: pcodeinject.hh:162
An XML element. A node in the DOM tree.
Definition: xml.hh:150
Manager for all the major decompiler subsystems.
Definition: architecture.hh:119
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
A call-fixup injection that uses a Ghidra client to generate the p-code ops.
Definition: inject_ghidra.hh:50
virtual const vector< OpBehavior * > & getBehaviors(void)
Get the array of op-code behaviors for initializing and emulator.
Definition: inject_ghidra.cc:202
virtual void restoreXml(const Element *el)
Restore this payload from an XML stream.
Definition: inject_ghidra.cc:136
virtual void printTemplate(ostream &s) const
Print the p-code ops of the injection to a stream (for debugging)
Definition: inject_ghidra.cc:143
virtual string getSource(void) const
Return a string describing the source of the injection (.cspec, prototype model, etc....
Definition: inject_ghidra.hh:46
InjectCallotherGhidra(const string &src, const string &nm)
Constructor.
Definition: inject_ghidra.cc:89
virtual void restoreXml(const Element *el)
Restore this payload from an XML stream.
Definition: inject_ghidra.cc:94
An injection context that can be serialized and sent to the Ghidra client.
Definition: inject_ghidra.hh:29
virtual void printTemplate(ostream &s) const
Print the p-code ops of the injection to a stream (for debugging)
Definition: inject_ghidra.cc:72
virtual int4 manualCallFixup(const string &name, const string &snippet)
Manually add a call-fixup payload given a compilable snippet of p-code source.
Definition: inject_ghidra.cc:210
A p-code script that uses a Ghidra client to generate the p-code ops.
Definition: inject_ghidra.hh:68
virtual void inject(InjectContext &context, PcodeEmit &emit) const
Definition: inject_ghidra.cc:47
virtual void inject(InjectContext &context, PcodeEmit &emit) const
Definition: inject_ghidra.cc:111
An implementation of the Architecture interface and connection to a Ghidra client.
Definition: ghidra_arch.hh:60
PcodeInjectLibraryGhidra(ArchitectureGhidra *ghi)
Constructor.
Definition: inject_ghidra.cc:196
virtual InjectContext & getCachedContext(void)
Retrieve a reusable context object for this library.
Definition: inject_ghidra.hh:90
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_ghidra.cc:216
A snippet of p-code that can be executed outside of normal analysis.
Definition: pcodeinject.hh:134
InjectCallfixupGhidra(const string &src, const string &nm)
Constructor.
Definition: inject_ghidra.cc:78