19 #ifndef __TRANSLATE_GHIDRA__ 20 #define __TRANSLATE_GHIDRA__ 36 mutable map<string,VarnodeData> nm2addr;
37 mutable map<VarnodeData,string> addr2nm;
39 void restoreXml(
const Element *el);
45 throw LowlevelError(
"Cannot add register name into GHIDRA through this interface"); }
49 throw LowlevelError(
"Cannot currently get all registers through this interface"); }
53 throw LowlevelError(
"Cannot currently get instruction length through this interface"); }
55 throw LowlevelError(
"Cannot dump assembly through this interface"); }
An implementation of Translate that queries a Ghidra client for p-code information.
Definition: ghidra_translate.hh:34
A container for parsed XML documents.
Definition: xml.hh:249
virtual const VarnodeData & getRegister(const string &nm) const
Get a register as VarnodeData given its name.
Definition: ghidra_translate.cc:42
A region where processor data is stored.
Definition: space.hh:73
virtual void getUserOpNames(vector< string > &res) const
Get a list of all user-defined pcode ops.
Definition: ghidra_translate.cc:88
virtual int4 printAssembly(AssemblyEmit &emit, const Address &baseaddr) const
Disassemble a single machine instruction.
Definition: ghidra_translate.hh:54
Abstract class for emitting pcode to an application.
Definition: translate.hh:76
GhidraTranslate(ArchitectureGhidra *g)
Constructor.
Definition: ghidra_translate.hh:41
virtual void addRegister(const string &nm, AddrSpace *base, uintb offset, int4 size)
Add a named register to the model for this processor.
Definition: ghidra_translate.hh:44
virtual void initialize(DocumentStorage &store)
Initialize the translator given XML configuration documents.
Definition: ghidra_translate.cc:33
virtual int4 oneInstruction(PcodeEmit &emit, const Address &baseaddr) const
Transform a single machine instruction into pcode.
Definition: ghidra_translate.cc:100
A low-level machine address for labelling bytes and data.
Definition: address.hh:46
The interface to a translation engine for a processor.
Definition: translate.hh:293
The lowest level error generated by the decompiler.
Definition: error.hh:44
An XML element. A node in the DOM tree.
Definition: xml.hh:150
virtual int4 instructionLength(const Address &baseaddr) const
Get the length of a machine instruction.
Definition: ghidra_translate.hh:52
Ghidra specific architecture information and connection to a Ghidra client.
virtual void getAllRegisters(map< VarnodeData, string > ®list) const
Get a list of all register names and the corresponding location.
Definition: ghidra_translate.hh:48
An implementation of the Architecture interface and connection to a Ghidra client.
Definition: ghidra_arch.hh:60
Abstract class for emitting disassembly to an application.
Definition: translate.hh:118
Classes for disassembly and pcode generation.
virtual string getRegisterName(AddrSpace *base, uintb off, int4 size) const
Get the name of a register given its location.
Definition: ghidra_translate.cc:71
Data defining a specific memory location.
Definition: pcoderaw.hh:33