ROSE  0.10.0.0
Public Member Functions | List of all members
Rose::BinaryAnalysis::Debugger::Specimen Class Reference

Description

Describes the specimen to be debugged.

A specimen can be either an executable program or a running process.

Definition at line 51 of file BinaryDebugger.h.

#include <BinaryDebugger.h>

Public Member Functions

 Specimen ()
 Default construct an empty specimen descriptor. More...
 
 Specimen (int pid)
 Construct a specimen description for a process. More...
 
 Specimen (const boost::filesystem::path &name)
 Construct a specimen description for a program with no arguments. More...
 
 Specimen (const boost::filesystem::path &name, const std::vector< std::string > &args)
 Construct a specimen description for a program with arguments. More...
 
 Specimen (const std::vector< std::string > &nameAndArgs)
 Construct a specimen description from combined program and arguments. More...
 
void print (std::ostream &out) const
 Print some basic info about the specimen. More...
 
boost::filesystem::path program () const
 Property: Name of executable program to run. More...
 
void program (const boost::filesystem::path &name)
 Property: Name of executable program to run. More...
 
const std::vector< std::string > & arguments () const
 Property: Program command-line arguments. More...
 
void arguments (const std::vector< std::string > &args)
 Property: Program command-line arguments. More...
 
boost::filesystem::path workingDirectory () const
 Property: Current working directory for running a program. More...
 
void workingDirectory (const boost::filesystem::path &name)
 Property: Current working directory for running a program. More...
 
const BitFlags< Flag > & flags () const
 Property: Operational flags. More...
 
BitFlags< Flag > & flags ()
 Property: Operational flags. More...
 
unsigned long persona () const
 Property: Personality flags. More...
 
void persona (unsigned long bits)
 Property: Personality flags. More...
 
bool randomizedAddresses () const
 Property: Whether to randomize addresses of a process. More...
 
void randomizedAddresses (bool)
 Property: Whether to randomize addresses of a process. More...
 
int process () const
 Property: Process ID. More...
 
void process (int pid)
 Property: Process ID. More...
 

Constructor & Destructor Documentation

Rose::BinaryAnalysis::Debugger::Specimen::Specimen ( )
inline

Default construct an empty specimen descriptor.

Definition at line 65 of file BinaryDebugger.h.

Rose::BinaryAnalysis::Debugger::Specimen::Specimen ( int  pid)
inline

Construct a specimen description for a process.

Definition at line 69 of file BinaryDebugger.h.

Rose::BinaryAnalysis::Debugger::Specimen::Specimen ( const boost::filesystem::path &  name)
inline

Construct a specimen description for a program with no arguments.

Definition at line 73 of file BinaryDebugger.h.

Rose::BinaryAnalysis::Debugger::Specimen::Specimen ( const boost::filesystem::path &  name,
const std::vector< std::string > &  args 
)
inline

Construct a specimen description for a program with arguments.

Definition at line 77 of file BinaryDebugger.h.

Rose::BinaryAnalysis::Debugger::Specimen::Specimen ( const std::vector< std::string > &  nameAndArgs)
inline

Construct a specimen description from combined program and arguments.

Definition at line 81 of file BinaryDebugger.h.

Member Function Documentation

boost::filesystem::path Rose::BinaryAnalysis::Debugger::Specimen::program ( ) const
inline

Property: Name of executable program to run.

A specimen description can be either a program or a process, but not both. Setting this property will clear the process property.

Definition at line 93 of file BinaryDebugger.h.

void Rose::BinaryAnalysis::Debugger::Specimen::program ( const boost::filesystem::path &  name)
inline

Property: Name of executable program to run.

A specimen description can be either a program or a process, but not both. Setting this property will clear the process property.

Definition at line 96 of file BinaryDebugger.h.

const std::vector<std::string>& Rose::BinaryAnalysis::Debugger::Specimen::arguments ( ) const
inline

Property: Program command-line arguments.

This property is the list of command-line arguments supplied to a program when starting it. This property is not used when attaching to an existing process.

Definition at line 108 of file BinaryDebugger.h.

void Rose::BinaryAnalysis::Debugger::Specimen::arguments ( const std::vector< std::string > &  args)
inline

Property: Program command-line arguments.

This property is the list of command-line arguments supplied to a program when starting it. This property is not used when attaching to an existing process.

Definition at line 111 of file BinaryDebugger.h.

boost::filesystem::path Rose::BinaryAnalysis::Debugger::Specimen::workingDirectory ( ) const
inline

Property: Current working directory for running a program.

This property is only used for starting a new program, not for attaching to a process (which already has a current working directory). If no working directory is specified then the program's working directory will be this process's current working directory.

Definition at line 123 of file BinaryDebugger.h.

void Rose::BinaryAnalysis::Debugger::Specimen::workingDirectory ( const boost::filesystem::path &  name)
inline

Property: Current working directory for running a program.

This property is only used for starting a new program, not for attaching to a process (which already has a current working directory). If no working directory is specified then the program's working directory will be this process's current working directory.

Definition at line 126 of file BinaryDebugger.h.

const BitFlags<Flag>& Rose::BinaryAnalysis::Debugger::Specimen::flags ( ) const
inline

Property: Operational flags.

These flags control some finer aspects of the operations.

Definition at line 136 of file BinaryDebugger.h.

BitFlags<Flag>& Rose::BinaryAnalysis::Debugger::Specimen::flags ( )
inline

Property: Operational flags.

These flags control some finer aspects of the operations.

Definition at line 139 of file BinaryDebugger.h.

unsigned long Rose::BinaryAnalysis::Debugger::Specimen::persona ( ) const
inline

Property: Personality flags.

These flags are identical to the bit flags used by the Linux personality function. For instance, to turn off address space randomization, include sys/personality.h and pass ADDR_NO_RANDOMIZE. See also, randomizedAddresses property.

Definition at line 151 of file BinaryDebugger.h.

void Rose::BinaryAnalysis::Debugger::Specimen::persona ( unsigned long  bits)
inline

Property: Personality flags.

These flags are identical to the bit flags used by the Linux personality function. For instance, to turn off address space randomization, include sys/personality.h and pass ADDR_NO_RANDOMIZE. See also, randomizedAddresses property.

Definition at line 154 of file BinaryDebugger.h.

bool Rose::BinaryAnalysis::Debugger::Specimen::randomizedAddresses ( ) const

Property: Whether to randomize addresses of a process.

This is actually a persona property, but it's used so commonly that we have a separate API for turning it on and off. The alleviates the user from having to test what kind of machine he's compiling on and using conditional compilation to include the correct files and use the correct constants. If the host machine doesn't support adjusting whether address space randomization is used, then setting this property is a no-op and false is always returned.

void Rose::BinaryAnalysis::Debugger::Specimen::randomizedAddresses ( bool  )

Property: Whether to randomize addresses of a process.

This is actually a persona property, but it's used so commonly that we have a separate API for turning it on and off. The alleviates the user from having to test what kind of machine he's compiling on and using conditional compilation to include the correct files and use the correct constants. If the host machine doesn't support adjusting whether address space randomization is used, then setting this property is a no-op and false is always returned.

int Rose::BinaryAnalysis::Debugger::Specimen::process ( ) const
inline

Property: Process ID.

This is the identification number for a specimen process to which the debugger should be attached. Setting this property will clear the program property.

Definition at line 177 of file BinaryDebugger.h.

void Rose::BinaryAnalysis::Debugger::Specimen::process ( int  pid)
inline

Property: Process ID.

This is the identification number for a specimen process to which the debugger should be attached. Setting this property will clear the program property.

Definition at line 180 of file BinaryDebugger.h.

void Rose::BinaryAnalysis::Debugger::Specimen::print ( std::ostream &  out) const

Print some basic info about the specimen.


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