1#ifndef ROSE_BinaryAnalysis_BestMapAddress_H 
    2#define ROSE_BinaryAnalysis_BestMapAddress_H 
    3#include <featureTests.h> 
    4#ifdef ROSE_ENABLE_BINARY_ANALYSIS 
    6#include <Rose/Diagnostics.h> 
    7#include <Rose/BinaryAnalysis/Partitioner2/Engine.h> 
    8#include <Rose/Progress.h> 
    9#include <Rose/Exception.h> 
   10#include <Sawyer/Set.h> 
   13namespace BinaryAnalysis {
 
   61        : upToDate_(true), maxMatches_(0), nBits_(0), progress_(
Progress::instance()) {}
 
 
  116    size_t nBits()
 const { 
return nBits_; }
 
  149        if (targetVas_.
insert(va))
 
 
 
Exceptions for this analysis.
 
Exception(const std::string &mesg)
Construct an exception with a message.
 
Finds best address for mapping code.
 
void reset()
Clear gathered addresses.
 
void gatherAddresses(Partitioner2::Engine &engine)
Gather addresses for future analysis.
 
void progress(const Progress::Ptr &p)
Property: Progress reporter.
 
Progress::Ptr progress() const
Property: Progress reporter.
 
void nBits(size_t n)
Property: Number of bits in an address.
 
static Diagnostics::Facility mlog
Facility for emitting diagnostics.
 
BestMapAddress & analyze(const AddressInterval &restrictEntryAddresses=AddressInterval::whole(), const AddressInterval &restrictTargetAddresses=AddressInterval::whole())
Analyze the addresses that have been provided.
 
double bestDeltaRatio() const
How well the best shift amounts performed.
 
static MemoryMapPtr align(const MemoryMapPtr &, const Partitioner2::Engine::Settings &settings=Partitioner2::Engine::Settings(), const Progress::Ptr &progress=Progress::Ptr())
Align executable regions of a memory map.
 
size_t nBits() const
Property: Number of bits in an address.
 
Sawyer::Container::Set< Address > AddressSet
Set of addresses.
 
BestMapAddress()
Construct an empty analysis.
 
const std::vector< Address > & bestDeltas() const
Return the best shift amounts.
 
static void initDiagnostics()
Initialize diagnostic streams.
 
const AddressSet & entryAddresses() const
Returns set of entry addresses.
 
void insertTargetAddress(Address va)
Insert a call target address.
 
void insertEntryAddress(Address va)
Insert a function entry address.
 
const Settings & settings() const
Settings.
 
Address mask() const
Property: Mask to use when doing address arithmetic.
 
const AddressSet & targetAddresses() const
Returns set of target addresses.
 
Settings & settings()
Settings.
 
Base class for engines driving the partitioner.
 
Base class for all ROSE exceptions.
 
A general, thread-safe way to report progress made on some task.
 
static Interval whole()
Construct an interval that covers the entire domain.
 
Container associating values with keys.
 
Map & clear()
Remove all nodes.
 
bool insert(const Value &value)
Insert a value.
 
void clear()
Erase all values.
 
Holds a value or nothing.
 
std::uint64_t Address
Address.
 
Settings to control the analysis.
 
Sawyer::Optional< size_t > nThreads
Number of threads to use, overriding the global setting.