1#ifndef ROSE_BinaryAnalysis_Partitioner2_DataBlock_H
2#define ROSE_BinaryAnalysis_Partitioner2_DataBlock_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_BINARY_ANALYSIS
5#include <Rose/BinaryAnalysis/Partitioner2/BasicTypes.h>
7#include <Rose/BinaryAnalysis/BasicTypes.h>
8#include <Rose/SourceLocation.h>
9#include <SageBuilderAsm.h>
11#include <Sawyer/Attribute.h>
12#include <Sawyer/SharedPointer.h>
14#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
15#include <boost/serialization/access.hpp>
21namespace BinaryAnalysis {
22namespace Partitioner2 {
45 std::vector<BasicBlockPtr> attachedBasicBlockOwners_;
46 std::vector<FunctionPtr> attachedFunctionOwners_;
50#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
52 friend class boost::serialization::access;
53 template<
class S>
void serialize(S&,
unsigned version);
81 rose_addr_t
address()
const {
return startVa_; }
void type(SgAsmType *t)
Property: Type of data stored in this block.
std::vector< uint8_t > read(const MemoryMapPtr &) const
Read static data from a memory map.
AddressInterval extent() const
Addresses represented.
static Ptr instanceBytes(rose_addr_t startVa, size_t nBytes)
Static allocating constructor.
Sawyer::SharedPointer< DataBlock > Ptr
Shared pointer to a data block.
size_t nAttachedOwners() const
Number of attached basic block and function owners.
SgAsmType * type() const
Property: Type of data stored in this block.
const std::vector< BasicBlockPtr > & attachedBasicBlockOwners() const
Basic blocks that are attached to the partitioner and own this data block.
const SourceLocation & sourceLocation() const
Property: Optional location of data in source code.
const std::string & comment() const
Property: Comment.
const std::vector< FunctionPtr > & attachedFunctionOwners() const
Functions that are attached to the partitioner and own this data block.
size_t size() const
Returns the size in bytes.
static Ptr instance(rose_addr_t startVa, SgAsmType *)
Static allocating constructor.
void sourceLocation(const SourceLocation &)
Property: Optional location of data in source code.
std::string printableName() const
A printable name for this data block.
rose_addr_t address() const
Returns the starting address.
void comment(const std::string &s)
Property: Comment.
bool isFrozen() const
Determine if data block is read-only.
Partitions instructions into basic blocks and functions.
Information about a source location.
API and storage for attributes.
Base class for reference counted objects.
Reference-counting intrusive smart pointer.
Base class for binary types.