Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
michael@0 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #ifndef LulDwarfSummariser_h |
michael@0 | 8 | #define LulDwarfSummariser_h |
michael@0 | 9 | |
michael@0 | 10 | #include "LulMainInt.h" |
michael@0 | 11 | |
michael@0 | 12 | namespace lul { |
michael@0 | 13 | |
michael@0 | 14 | class Summariser |
michael@0 | 15 | { |
michael@0 | 16 | public: |
michael@0 | 17 | Summariser(SecMap* aSecMap, uintptr_t aTextBias, void(*aLog)(const char*)); |
michael@0 | 18 | |
michael@0 | 19 | void Entry(uintptr_t aAddress, uintptr_t aLength); |
michael@0 | 20 | void End(); |
michael@0 | 21 | void Rule(uintptr_t aAddress, |
michael@0 | 22 | int aNewReg, int aOldReg, intptr_t aOffset, bool aDeref); |
michael@0 | 23 | |
michael@0 | 24 | private: |
michael@0 | 25 | // The SecMap in which we park the finished summaries (RuleSets). |
michael@0 | 26 | SecMap* mSecMap; |
michael@0 | 27 | |
michael@0 | 28 | // Running state for the current summary (RuleSet) under construction. |
michael@0 | 29 | RuleSet mCurrRules; |
michael@0 | 30 | |
michael@0 | 31 | // The start of the address range to which the RuleSet under |
michael@0 | 32 | // construction applies. |
michael@0 | 33 | uintptr_t mCurrAddr; |
michael@0 | 34 | |
michael@0 | 35 | // The highest address, plus one, for which the RuleSet under |
michael@0 | 36 | // construction could possibly apply. If there are no further |
michael@0 | 37 | // incoming events then mCurrRules will eventually be emitted |
michael@0 | 38 | // as-is, for the range mCurrAddr.. mMax1Addr - 1, if that is |
michael@0 | 39 | // nonempty. |
michael@0 | 40 | uintptr_t mMax1Addr; |
michael@0 | 41 | |
michael@0 | 42 | // The bias value (to add to the SVMAs, to get AVMAs) to be used |
michael@0 | 43 | // when adding entries into mSecMap. |
michael@0 | 44 | uintptr_t mTextBias; |
michael@0 | 45 | |
michael@0 | 46 | // A logging sink, for debugging. |
michael@0 | 47 | void (*mLog)(const char* aFmt); |
michael@0 | 48 | }; |
michael@0 | 49 | |
michael@0 | 50 | } // namespace lul |
michael@0 | 51 | |
michael@0 | 52 | #endif // LulDwarfSummariser_h |