diff --git a/include/zipr.h b/include/zipr.h index c8a7e8657e5c24fa0a31b28305fee200fdb6d510..d08bc64f650a41ddb0fe9b014efff569960f8ae4 100644 --- a/include/zipr.h +++ b/include/zipr.h @@ -31,11 +31,14 @@ #ifndef zipr_h #define zipr_h -class Zipr_t +#include <memory_space.h> + + +namespace Zipr_SDK { - public: - Zipr_t() {}; +class Zipr_t +{ protected: /* * Private, but listing them here so that SDK users @@ -64,6 +67,12 @@ class Zipr_t virtual Zipr_SDK::RangeAddress_t PlopInstruction(libIRDB::Instruction_t* insn, Zipr_SDK::RangeAddress_t addr) = 0; virtual Zipr_SDK::RangeAddress_t PlopWithTarget(libIRDB::Instruction_t* insn, Zipr_SDK::RangeAddress_t at) = 0; virtual Zipr_SDK::RangeAddress_t PlopWithCallback(libIRDB::Instruction_t* insn, Zipr_SDK::RangeAddress_t at) = 0; + virtual Zipr_SDK::MemorySpace_t *GetMemorySpace()=0; + virtual ELFIO::elfio *GetELFIO()=0; + virtual libIRDB::FileIR_t *GetFileIR()=0; + virtual Zipr_SDK::InstructionLocationMap_t *GetLocationMap()=0; +}; + }; #endif diff --git a/include/zipr_plugin.h b/include/zipr_plugin.h index 935f85c79a37221ea21175729dca7e3d1a4d1732..1034c42245b40f940a7659a5f09c020463ca850f 100644 --- a/include/zipr_plugin.h +++ b/include/zipr_plugin.h @@ -3,6 +3,8 @@ namespace Zipr_SDK { typedef std::map<libIRDB::Instruction_t*,Zipr_SDK::RangeAddress_t> InstructionLocationMap_t; +class Zipr_t; + class ZiprPluginInterface_t { public: diff --git a/include/zipr_sdk.h b/include/zipr_sdk.h index e9ca4ca0961d26eb29b84054dcc8576c5a77ca8b..c61446011796b374a85ef48a97e71eb4b152f640 100644 --- a/include/zipr_sdk.h +++ b/include/zipr_sdk.h @@ -48,9 +48,13 @@ // SDK internals #include <range.h> -#include <zipr.h> #include <memory_space.h> #include <zipr_options.h> #include <zipr_plugin.h> +#include <zipr.h> + +extern "C" +Zipr_SDK::ZiprPluginInterface_t* GetPluginInterface(Zipr_SDK::Zipr_t* zipr_main_object); + #endif