#ifndef __CONTEXT_GHIDRA__
#define __CONTEXT_GHIDRA__
#include "globalcontext.hh"
#include "ghidra_arch.hh"
class ContextGhidra : public ContextDatabase {
ArchitectureGhidra *glb; mutable TrackedSet cache; virtual ContextBitRange &getVariable(const string &nm) {
throw LowlevelError("getVariable should not be called for GHIDRA"); }
virtual const ContextBitRange &getVariable(const string &nm) const {
throw LowlevelError("getVariable should not be called for GHIDRA"); }
virtual void getRegionForSet(vector<uintm *> &res,const Address &addr1,const Address &addr2,int4 num,uintm mask) {
throw LowlevelError("getRegionForSet should not be called for GHIDRA"); }
virtual void getRegionToChangePoint(vector<uintm *> &res,const Address &addr,int4 num,uintm mask) {
throw LowlevelError("getRegionToChangePoint should not be called for GHIDRA"); }
virtual const uintm *getDefaultValue(void) const {
throw LowlevelError("getDefaultValue should not be called for GHIDRA"); }
virtual uintm *getDefaultValue(void) {
throw LowlevelError("getDefaultValue should not be called for GHIDRA"); }
public:
ContextGhidra(ArchitectureGhidra *g) { glb = g; } virtual ~ContextGhidra(void) {}
virtual const TrackedSet &getTrackedSet(const Address &addr) const;
virtual void restoreXml(const Element *el,const AddrSpaceManager *manage) {}
virtual void restoreFromSpec(const Element *el,const AddrSpaceManager *manage) {}
virtual int getContextSize(void) const {
throw LowlevelError("getContextSize should not be called for GHIDRA"); }
virtual const uintm *getContext(const Address &addr) const {
throw LowlevelError("getContext should not be called for GHIDRA"); }
virtual const uintm *getContext(const Address &addr,uintb &first,uintb &last) const {
throw LowlevelError("getContext should not be called for GHIDRA"); }
virtual void registerVariable(const string &nm,int4 sbit,int4 ebit) {
throw LowlevelError("registerVariable should not be called for GHIDRA"); }
virtual void saveXml(ostream &s) const {
throw LowlevelError("context::saveXml should not be called for GHIDRA"); }
virtual TrackedSet &createSet(const Address &addr1,const Address &addr2) {
throw LowlevelError("createSet should not be called for GHIDRA"); }
virtual TrackedSet &getTrackedDefault(void) {
throw LowlevelError("getTrackedDefault should not be called for GHIDRA"); }
};
#endif