diff --git a/.gitattributes b/.gitattributes index 45b1e8f6aaa3130b68d5cc4742abb2701efcae5d..cba7581e233da95ba1a0d664a5c19b18f44b548d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,6 +2,7 @@ /README -text /SDK_VERSION -text include/dollop.h -text +include/dollop_man.h -text include/memory_space.h -text include/range.h -text include/zipr.h -text diff --git a/include/dollop_man.h b/include/dollop_man.h new file mode 100644 index 0000000000000000000000000000000000000000..bdd55b5d1ab9066aeb16f8577fda8d06805881cb --- /dev/null +++ b/include/dollop_man.h @@ -0,0 +1,63 @@ +/*************************************************************************** + * Copyright (c) 2014 Zephyr Software LLC. All rights reserved. + * + * This software is furnished under a license and/or other restrictive + * terms and may be used and copied only in accordance with such terms + * and the inclusion of the above copyright notice. This software or + * any other copies thereof may not be provided or otherwise made + * available to any other person without the express written consent + * of an authorized representative of Zephyr Software LCC. Title to, + * ownership of, and all rights in the software is retained by + * Zephyr Software LCC. + * + * Zephyr Software LLC. Proprietary Information + * + * Unless otherwise specified, the information contained in this + * directory, following this legend, and/or referenced herein is + * Zephyr Software LLC. (Zephyr) Proprietary Information. + * + * CONTACT + * + * For technical assistance, contact Zephyr Software LCC. at: + * + * + * Zephyr Software, LLC + * 2040 Tremont Rd + * Charlottesville, VA 22911 + * + * E-mail: jwd@zephyr-software.com + **************************************************************************/ + +#ifndef dollop_man_h +#define dollop_man_h + +#include <dollop.h> + +namespace Zipr_SDK { +class DollopManager_t { + public: + DollopManager_t() {}; + + virtual void AddDollops(Zipr_SDK::Dollop_t *dollop_head) = 0; + virtual Zipr_SDK::Dollop_t *AddNewDollops(libIRDB::Instruction_t *start) = 0; + virtual size_t Size() = 0; + + virtual Zipr_SDK::Dollop_t *GetContainingDollop(libIRDB::Instruction_t *insn) = 0; + + virtual void AddDollopPatch(Zipr_SDK::DollopPatch_t *new_patch) = 0; + virtual std::list<Zipr_SDK::DollopPatch_t*> PatchesToDollop(Zipr_SDK::Dollop_t *target) = 0; + + virtual bool UpdateTargets(Zipr_SDK::Dollop_t *) = 0; + virtual void UpdateAllTargets() = 0; + + virtual std::list<Zipr_SDK::Dollop_t*>::const_iterator dollops_begin() = 0; + virtual std::list<Zipr_SDK::Dollop_t*>::const_iterator dollops_end() = 0; + + virtual void PrintDollopPatches(const std::ostream &) = 0; + friend std::ostream &operator<<(std::ostream &out, const DollopManager_t &dollop_man); + virtual void PrintStats(std::ostream &out) = 0; + virtual void PrintPlacementMap(const Zipr_SDK::MemorySpace_t &memory_space, + const std::string &map_filename) = 0; +}; +} +#endif diff --git a/include/zipr.h b/include/zipr.h index ecd5676d40a36d05716df4f580e839875f980793..587d39447ebe6b973ef80ca559cd6f5377721cae 100644 --- a/include/zipr.h +++ b/include/zipr.h @@ -32,6 +32,7 @@ #define zipr_h #include <memory_space.h> +#include <dollop_man.h> namespace Zipr_SDK @@ -86,6 +87,7 @@ class Zipr_t virtual ELFIO::elfio *GetELFIO()=0; virtual libIRDB::FileIR_t *GetFileIR()=0; virtual Zipr_SDK::InstructionLocationMap_t *GetLocationMap()=0; + virtual Zipr_SDK::DollopManager_t *GetDollopManager()=0; }; }; diff --git a/include/zipr_sdk.h b/include/zipr_sdk.h index 831f5ad2ac83a71d05f3f2e76ac21ae9c1024ff7..4c2a092bde6ca576a740660526e6d94986754f24 100644 --- a/include/zipr_sdk.h +++ b/include/zipr_sdk.h @@ -50,6 +50,7 @@ #include <range.h> #include <dollop.h> #include <memory_space.h> +#include <dollop_man.h> #include <zipr_options.h> #include <zipr_plugin.h> #include <zipr.h>