ROSE  0.9.11.42
Public Types | Public Member Functions | List of all members
Rose::BinaryAnalysis::Concolic::Specimen Class Reference

Description

Binary specimen.

The speciment represents the thing that is to be tested, but not how to test it. In other words, a specimen might be an executable, but not any specifics about how to run the executable such as which arguments to give it.

Definition at line 117 of file BinaryConcolic.h.

#include <BinaryConcolic.h>

Inheritance diagram for Rose::BinaryAnalysis::Concolic::Specimen:
Inheritance graph
[legend]
Collaboration diagram for Rose::BinaryAnalysis::Concolic::Specimen:
Collaboration graph
[legend]

Public Types

typedef Sawyer::SharedPointer< SpecimenPtr
 Referenc-counting pointer to a Specimen. More...
 

Public Member Functions

void open (const boost::filesystem::path &executableName)
 Open an executable file. More...
 
void close ()
 Close the executable file. More...
 
bool isEmpty () const
 Test whether this object is empty. More...
 
const std::vector< uint8_t > & content () const
 Property: Specimen content. More...
 
void content (std::vector< uint8_t > binary_data)
 
std::string name () const
 Property: Specimen name. More...
 
void name (const std::string &)
 Property: Specimen name. More...
 
- Public Member Functions inherited from Sawyer::SharedObject
 SharedObject ()
 Default constructor. More...
 
 SharedObject (const SharedObject &)
 Copy constructor. More...
 
virtual ~SharedObject ()
 Virtual destructor. More...
 
SharedObjectoperator= (const SharedObject &)
 Assignment. More...
 

Static Public Member Functions

static Ptr instance (const boost::filesystem::path &executableName)
 Allocating constructor.
 
static Ptr instance ()
 Allocating constructor.
 

Member Typedef Documentation

Referenc-counting pointer to a Specimen.

Definition at line 120 of file BinaryConcolic.h.

Member Function Documentation

void Rose::BinaryAnalysis::Concolic::Specimen::open ( const boost::filesystem::path &  executableName)

Open an executable file.

The contents of the executable file are copied into this object when the file is opened. After the file is opened successfully, the isEmpty predicate returns false. Throws an Exception if the file cannot be opened.

Thread safety: This method is thread-safe.

void Rose::BinaryAnalysis::Concolic::Specimen::close ( )

Close the executable file.

Removes all content from this object, or does nothing if isEmpty returns true. After this call, isEmpty returns true.

Thread safety: This method is thread-safe.

bool Rose::BinaryAnalysis::Concolic::Specimen::isEmpty ( ) const

Test whether this object is empty.

Returns true if a binary executable is associated with this specimen, false otherwise. See also, open and close.

Thread safety: This method is thread-safe.

std::string Rose::BinaryAnalysis::Concolic::Specimen::name ( ) const

Property: Specimen name.

This should be a printable name, such as a file name. It's used mostly for informational purposes such as debugging. There is no requirement that names be unique or non-empty.

Thread safety: This methods is thread-safe.

void Rose::BinaryAnalysis::Concolic::Specimen::name ( const std::string &  )

Property: Specimen name.

This should be a printable name, such as a file name. It's used mostly for informational purposes such as debugging. There is no requirement that names be unique or non-empty.

Thread safety: This methods is thread-safe.

const std::vector<uint8_t>& Rose::BinaryAnalysis::Concolic::Specimen::content ( ) const

Property: Specimen content.

This property contains the bytes that compose a specimen. For instance, for an ELF executable, the content is the bytes that compose the executable file. This property is read-only, initialized when the Specimen is created.

Thread safety: This method is thread safe.


The documentation for this class was generated from the following file: