diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..1377554ebea6f98a2c748183bc5a96852af12ac2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.swp diff --git a/include/private-include/zipr.h b/include/private-include/zipr.h index fe4aa6322ed1dc82407683532ccee348868f1d88..95fc13c1c5addb6fb52de4144357c512d4254149 100644 --- a/include/private-include/zipr.h +++ b/include/private-include/zipr.h @@ -11,36 +11,39 @@ namespace Zipr_SDK class Zipr_t { + protected: + Zipr_t() { } + Zipr_t(const Zipr_t& copy) = delete; public: /* * These are public functions that the SDK user way want to use. */ virtual size_t determineDollopEntrySize( DollopEntry_t*, - bool account_for_fallthrough) = 0; + bool account_for_fallthrough) = 0; virtual RangeAddress_t plopDollopEntry( DollopEntry_t *, RangeAddress_t = 0, - RangeAddress_t = 0) = 0; + RangeAddress_t = 0) = 0; virtual RangeAddress_t plopDollopEntryWithTarget( DollopEntry_t *, RangeAddress_t = 0, - RangeAddress_t = 0) = 0; + RangeAddress_t = 0) = 0; virtual RangeAddress_t plopDollopEntryWithCallback( DollopEntry_t *, - RangeAddress_t = 0) = 0; - - virtual MemorySpace_t *getMemorySpace()=0; - virtual IRDB_SDK::FileIR_t *getFileIR()=0; - virtual InstructionLocationMap_t *getLocationMap()=0; - virtual DollopManager_t *getDollopManager()=0; - virtual PlacementQueue_t* getPlacementQueue()=0; + RangeAddress_t = 0) = 0; virtual void applyPatch( RangeAddress_t from_addr, - RangeAddress_t to_addr)=0; + RangeAddress_t to_addr) = 0; + + virtual MemorySpace_t* getMemorySpace() = 0; + virtual IRDB_SDK::FileIR_t* getFileIR() = 0; + virtual InstructionLocationMap_t* getLocationMap() = 0; + virtual DollopManager_t* getDollopManager() = 0; + virtual PlacementQueue_t* getPlacementQueue() = 0; }; diff --git a/include/private-include/zipr_plugin.h b/include/private-include/zipr_plugin.h index 01d67aa7a8743c748d754abb70fa1059b94d54dc..77e5db03bcac1cbf5c6c64cd0eb7d3d7f4561a7c 100644 --- a/include/private-include/zipr_plugin.h +++ b/include/private-include/zipr_plugin.h @@ -6,11 +6,11 @@ namespace Zipr_SDK using InstructionLocationMap_t = map<Instruction_t*,RangeAddress_t>; - enum ZiprPreference - { - None, - Must, - }; + using ZiprPreference_t = enum ZiprPreference + { + None, + Must, + }; class ZiprPluginInterface_t { @@ -22,7 +22,7 @@ namespace Zipr_SDK virtual void doCallbackLinkingBegin() { } virtual void doCallbackLinkingEnd() { } - virtual ZiprPreference addressDollop(const Dollop_t *dollop, const RangeAddress_t &source, Range_t &place, bool &coalesce, bool &fallthrough_ok) + virtual ZiprPreference_t addressDollop(const Dollop_t *dollop, const RangeAddress_t &source, Range_t &place, bool &coalesce, bool &fallthrough_ok) { return None; } virtual bool willPluginPlop(Instruction_t*) @@ -88,10 +88,10 @@ namespace Zipr_SDK virtual ZiprOptionsNamespace_t *registerOptions(ZiprOptionsNamespace_t *) { return new ZiprOptionsNamespace_t(""); } - virtual ZiprPreference retargetPin(const RangeAddress_t &, const Dollop_t *, RangeAddress_t &) + virtual ZiprPreference_t retargetPin(const RangeAddress_t &, const Dollop_t *, RangeAddress_t &) { return None; } - virtual ZiprPreference retargetCallback(const RangeAddress_t &, const DollopEntry_t *, RangeAddress_t &) + virtual ZiprPreference_t retargetCallback(const RangeAddress_t &, const DollopEntry_t *, RangeAddress_t &) { return None; } virtual RangeAddress_t doPlaceScoopsBegin(const RangeAddress_t max_addr)