From 95f0092b8ae7ac7c24425e56e31541959d0502a4 Mon Sep 17 00:00:00 2001 From: Jason Hiser <jdhiser@gmail.com> Date: Sun, 3 Feb 2019 20:22:56 -0500 Subject: [PATCH] update to build libirdb-deep --- include/inc-deep/deep.hpp | 16 ++++++++-------- include/inc-transform/transform.hpp | 1 + include/irdb-util | 22 +--------------------- 3 files changed, 10 insertions(+), 29 deletions(-) diff --git a/include/inc-deep/deep.hpp b/include/inc-deep/deep.hpp index 1ab8fdf..52a49bf 100644 --- a/include/inc-deep/deep.hpp +++ b/include/inc-deep/deep.hpp @@ -17,10 +17,10 @@ namespace IRDB_SDK aeRida }; - using RegisterIDSet_t = set<RegisterID_t>; - using DeadRegisterMap_t = map<Instruction_t*,RegisterIDSet_t*>; - using StaticGlobalSet_t = InstructionSet_t; - using RangeSentinalSet_t = InstructionSet_t; + using RegisterIDSet_t = set<RegisterID_t>; + using DeadRegisterMap_t = map<Instruction_t*,RegisterIDSet_t>; + using StaticGlobalStartMap_t = map<Instruction_t*, VirtualOffset_t>; + using RangeSentinelSet_t = InstructionSet_t; class DeepAnalysis_t { @@ -29,11 +29,11 @@ namespace IRDB_SDK DeepAnalysis_t(const DeepAnalysis_t& copy) = delete; public: - unique_ptr<DeadRegisterMap_t> getDeadRegisters() const = 0; - unique_ptr<StaticGlobalSet_t> getStaticGlobalRanges() const = 0; - unique_ptr<SentinalSet_t > getRangeSentials() const = 0; + virtual unique_ptr<DeadRegisterMap_t > getDeadRegisters() const = 0; + virtual unique_ptr<StaticGlobalStartMap_t > getStaticGlobalRanges() const = 0; + virtual unique_ptr<RangeSentinelSet_t > getRangeSentinels() const = 0; // factories - unique_ptr<DeepAnalysis_t> factory(FileIR_t* firp, const AnalysisEngine_t& ae=aeSTARS, vector<string> options={}); + static unique_ptr<DeepAnalysis_t> factory(FileIR_t* firp, const AnalysisEngine_t& ae=aeSTARS, const vector<string>& options={}); }; } diff --git a/include/inc-transform/transform.hpp b/include/inc-transform/transform.hpp index 1e0b8d8..2df6d8f 100644 --- a/include/inc-transform/transform.hpp +++ b/include/inc-transform/transform.hpp @@ -33,6 +33,7 @@ namespace IRDB_SDK FileIR_t* getFileIR(); + const FileIR_t* getFileIR() const; private: diff --git a/include/irdb-util b/include/irdb-util index 2468876..b52c5de 100644 --- a/include/irdb-util +++ b/include/irdb-util @@ -1,26 +1,6 @@ -/* - * Copyright (c) 2014 - Zephyr Software LLC - * - * This file may be used and modified for non-commercial purposes as long as - * all copyright, permission, and nonwarranty notices are preserved. - * Redistribution is prohibited without prior written consent from Zephyr - * Software. - * - * Please contact the authors for restrictions applying to commercial use. - * - * THIS SOURCE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Author: Zephyr Software - * e-mail: jwd@zephyr-software.com - * URL : http://www.zephyr-software.com/ - * - */ +#include <irdb-core> #ifndef IRDB_SDK_util - -#include <irdb-core> #define IRDB_SDK_util /* Building a CFG depends on core functionality */ -- GitLab