ROSE  0.11.82.0
Classes | Public Member Functions | Static Public Member Functions | List of all members
Rose::BinaryAnalysis::Partitioner2::JvmEngine Class Reference

Description

Class for the JVM engine driving the partitioner.

An engine serves these main purposes:

Use of an engine is entirely optional. All of the engine's actions are implemented in terms of public APIs on other objects such as Disassembler and Partitioner. In fact, this particular engine base class is disigned so that users can pick and choose to use only those steps they need, or perhaps to call the main actions one step at a time with the user making adjustments between steps.

Custimization

The actions taken by an engine can be customized in a number of ways:

Basic usage

The most basic use case for the engine is to pass it the command-line arguments and have it do everything, eventually returning an abstract syntax tree.

#include <rose.h>
#include <Rose/BinaryAnalysis/Partitioner2/JvmEngine.h>
using namespace Rose;
int main(int argc, char *argv[]) {
std::string purpose = "disassembles a binary specimen";
std::string description =
"This tool disassembles the specified specimen and presents the "
"results as a pseudo assembly listing, that is, a listing intended "
"for human consumption rather than assembly.";
SgAsmBlock *gblock = P2::JvmEngine().frontend(argc, argv, purpose, description);

High level operations

While frontend does everything, it's often useful to break it down to individual steps so that adjustments can be made along the way. This next level of steps are:

Definition at line 95 of file JvmEngine.h.

#include <Rose/BinaryAnalysis/Partitioner2/JvmEngine.h>

Inheritance diagram for Rose::BinaryAnalysis::Partitioner2::JvmEngine:
Inheritance graph
[legend]
Collaboration diagram for Rose::BinaryAnalysis::Partitioner2::JvmEngine:
Collaboration graph
[legend]

Classes

class  Exception
 Errors from the engine. More...
 
struct  Settings
 Settings for the engine. More...
 

Public Member Functions

 JvmEngine ()
 Default constructor. More...
 
 JvmEngine (const Settings &settings)
 Construct engine with settings. More...
 
void reset ()
 Reset the engine to its initial state. More...
 
virtual Sawyer::CommandLine::Parser commandLineParser (const std::string &purpose, const std::string &description)
 Creates a command-line parser. More...
 
virtual void checkSettings ()
 Check settings after command-line is processed. More...
 
virtual DisassemblerobtainDisassembler (Disassembler *hint=NULL)
 Obtain a disassembler. More...
 
virtual Partitioner createPartitioner ()
 Create partitioner. More...
 
virtual void runPartitioner (Partitioner &)
 Partitions instructions into basic blocks and functions. More...
 
virtual void labelAddresses (Partitioner &, const Configuration &)
 Label addresses. More...
 
virtual void discoverBasicBlocks (Partitioner &)
 Discover as many basic blocks as possible. More...
 
SgAsmBlockfrontend (int argc, char *argv[], const std::string &purpose, const std::string &description)
 Most basic usage of the partitioner. More...
 
virtual SgAsmBlockfrontend (const std::vector< std::string > &args, const std::string &purpose, const std::string &description)
 Most basic usage of the partitioner. More...
 
Sawyer::CommandLine::ParserResult parseCommandLine (int argc, char *argv[], const std::string &purpose, const std::string &description)
 Parse the command-line. More...
 
virtual Sawyer::CommandLine::ParserResult parseCommandLine (const std::vector< std::string > &args, const std::string &purpose, const std::string &description)
 Parse the command-line. More...
 
SgAsmInterpretationparseContainers (const std::string &fileName)
 Parse specimen binary containers. More...
 
virtual Partitioner partition (const std::vector< std::string > &fileNames=std::vector< std::string >())
 Partition instructions into basic blocks and functions. More...
 
Partitioner partition (const std::string &fileName)
 Partition instructions into basic blocks and functions. More...
 
SgAsmBlockbuildAst (const std::vector< std::string > &fileNames=std::vector< std::string >())
 Obtain an abstract syntax tree. More...
 
SgAsmBlockbuildAst (const std::string &fileName)
 Obtain an abstract syntax tree. More...
 
const Settingssettings () const
 Property: All settings. More...
 
Settingssettings ()
 Property: All settings. More...
 
bool exitOnError () const
 Property: Error handling. More...
 
virtual void exitOnError (bool b)
 Property: Error handling. More...
 
Progress::Ptr progress () const
 Property: progress reporting. More...
 
virtual void progress (const Progress::Ptr &progress)
 Property: progress reporting. More...
 
bool doDisassemble () const
 Property: Perform disassembly. More...
 
virtual void doDisassemble (bool b)
 Property: Perform disassembly. More...
 
Disassemblerdisassembler () const
 Property: Disassembler. More...
 
virtual void disassembler (Disassembler *d)
 Property: Disassembler. More...
 
const std::string & isaName () const
 Property: Instruction set architecture name. More...
 
virtual void isaName (const std::string &s)
 Property: Instruction set architecture name. More...
 
const std::vector< rose_addr_t > & functionStartingVas () const
 Property: Starting addresses for disassembly. More...
 
std::vector< rose_addr_t > & functionStartingVas ()
 Property: Starting addresses for disassembly. More...
 
bool usingSemantics () const
 Property: Whether to use instruction semantics. More...
 
virtual void usingSemantics (bool b)
 Property: Whether to use instruction semantics. More...
 
bool ignoringUnknownInsns () const
 Property: Whether unknown instructions are ignored. More...
 
virtual void ignoringUnknownInsns (bool b)
 Property: Whether unknown instructions are ignored. More...
 
SemanticMemoryParadigm semanticMemoryParadigm () const
 Property: Type of container for semantic memory. More...
 
virtual void semanticMemoryParadigm (SemanticMemoryParadigm p)
 Property: Type of container for semantic memory. More...
 
size_t maxBasicBlockSize () const
 Property: Maximum size for basic blocks. More...
 
virtual void maxBasicBlockSize (size_t n)
 Property: Maximum size for basic blocks. More...
 
const std::vector< rose_addr_t > & ipRewrites () const
 Property: CFG edge rewrite pairs. More...
 
virtual void ipRewrites (const std::vector< rose_addr_t > &v)
 Property: CFG edge rewrite pairs. More...
 
bool findingDeadCode () const
 Property: Whether to find dead code. More...
 
virtual void findingDeadCode (bool b)
 Property: Whether to find dead code. More...
 
rose_addr_t peScramblerDispatcherVa () const
 Property: PE-Scrambler dispatcher address. More...
 
virtual void peScramblerDispatcherVa (rose_addr_t va)
 Property: PE-Scrambler dispatcher address. More...
 
size_t findingIntraFunctionCode () const
 Property: Whether to find intra-function code. More...
 
virtual void findingIntraFunctionCode (size_t n)
 Property: Whether to find intra-function code. More...
 
bool findingIntraFunctionData () const
 Property: Whether to find intra-function data. More...
 
virtual void findingIntraFunctionData (bool b)
 Property: Whether to find intra-function data. More...
 
const AddressIntervalinterruptVector () const
 Property: Location of machine interrupt vector. More...
 
virtual void interruptVector (const AddressInterval &i)
 Property: Location of machine interrupt vector. More...
 
bool doingPostAnalysis () const
 Property: Whether to perform post-partitioning analysis steps. More...
 
virtual void doingPostAnalysis (bool b)
 Property: Whether to perform post-partitioning analysis steps. More...
 
bool doingPostFunctionMayReturn () const
 Property: Whether to run the function may-return analysis. More...
 
virtual void doingPostFunctionMayReturn (bool b)
 Property: Whether to run the function may-return analysis. More...
 
bool doingPostFunctionStackDelta () const
 Property: Whether to run the function stack delta analysis. More...
 
virtual void doingPostFunctionStackDelta (bool b)
 Property: Whether to run the function stack delta analysis. More...
 
bool doingPostCallingConvention () const
 Property: Whether to run calling-convention analysis. More...
 
virtual void doingPostCallingConvention (bool b)
 Property: Whether to run calling-convention analysis. More...
 
bool doingPostFunctionNoop () const
 Property: Whether to run no-op function analysis. More...
 
virtual void doingPostFunctionNoop (bool b)
 Property: Whether to run no-op function analysis. More...
 
FunctionReturnAnalysis functionReturnAnalysis () const
 Property: Whether to run the function may-return analysis. More...
 
virtual void functionReturnAnalysis (FunctionReturnAnalysis x)
 Property: Whether to run the function may-return analysis. More...
 
size_t functionReturnAnalysisMaxSorts () const
 Property: Maximum number of function may-return sorting operations. More...
 
virtual void functionReturnAnalysisMaxSorts (size_t n)
 Property: Maximum number of function may-return sorting operations. More...
 
bool findingInterFunctionCalls () const
 Property: Whether to search for function calls between exiting functions. More...
 
virtual void findingInterFunctionCalls (bool b)
 Property: Whether to search for function calls between exiting functions. More...
 
bool findingFunctionCallFunctions () const
 Property: Whether to turn function call targets into functions. More...
 
virtual void findingFunctionCallFunctions (bool b)
 Property: Whether to turn function call targets into functions. More...
 
bool findingEntryFunctions () const
 Property: Whether to make functions at program entry points. More...
 
virtual void findingEntryFunctions (bool b)
 Property: Whether to make functions at program entry points. More...
 
bool findingErrorFunctions () const
 Property: Whether to make error handling functions. More...
 
virtual void findingErrorFunctions (bool b)
 Property: Whether to make error handling functions. More...
 
bool findingImportFunctions () const
 Property: Whether to make functions at import addresses. More...
 
virtual void findingImportFunctions (bool b)
 Property: Whether to make functions at import addresses. More...
 
bool findingExportFunctions () const
 Property: Whether to make functions at export addresses. More...
 
virtual void findingExportFunctions (bool b)
 Property: Whether to make functions at export addresses. More...
 
bool findingSymbolFunctions () const
 Property: Whether to make functions according to symbol tables. More...
 
virtual void findingSymbolFunctions (bool b)
 Property: Whether to make functions according to symbol tables. More...
 
bool findingDataFunctionPointers () const
 Property: Whether to search static data for function pointers. More...
 
virtual void findingDataFunctionPointers (bool b)
 Property: Whether to search static data for function pointers. More...
 
bool findingCodeFunctionPointers () const
 Property: Whether to search existing instructions for function pointers. More...
 
virtual void findingCodeFunctionPointers (bool b)
 Property: Whether to search existing instructions for function pointers. More...
 
bool checkingCallBranch () const
 Property: Whether to look for function calls used as branches. More...
 
virtual void checkingCallBranch (bool b)
 Property: Whether to look for function calls used as branches. More...
 
bool basicBlockSemanticsAutoDrop () const
 Property: Automatically drop semantics for attached basic blocks. More...
 
void basicBlockSemanticsAutoDrop (bool b)
 Property: Automatically drop semantics for attached basic blocks. More...
 
const std::vector< std::string > & configurationNames () const
 Property: Configuration files. More...
 
std::vector< std::string > & configurationNames ()
 Property: Configuration files. More...
 
bool namingConstants () const
 Property: Give names to constants. More...
 
virtual void namingConstants (bool b)
 Property: Give names to constants. More...
 
const AddressIntervalnamingStrings () const
 Property: Addresses where strings might start. More...
 
void namingStrings (const AddressInterval &where)
 Property: Addresses where strings might start. More...
 
bool namingSystemCalls () const
 Property: Give names to system calls. More...
 
virtual void namingSystemCalls (bool b)
 Property: Give names to system calls. More...
 
const boost::filesystem::path & systemCallHeader () const
 Property: Header file in which system calls are defined. More...
 
virtual void systemCallHeader (const boost::filesystem::path &filename)
 Property: Header file in which system calls are defined. More...
 
bool demangleNames () const
 Property: Demangle names. More...
 
virtual void demangleNames (bool b)
 Property: Demangle names. More...
 
bool astAllowEmptyGlobalBlock () const
 Property: Whether to allow empty global block in the AST. More...
 
virtual void astAllowEmptyGlobalBlock (bool b)
 Property: Whether to allow empty global block in the AST. More...
 
bool astAllowFunctionWithNoBasicBlocks () const
 Property: Whether to allow empty functions in the AST. More...
 
virtual void astAllowFunctionWithNoBasicBlocks (bool b)
 Property: Whether to allow empty functions in the AST. More...
 
bool astAllowEmptyBasicBlock () const
 Property: Whether to allow empty basic blocks in the AST. More...
 
virtual void astAllowEmptyBasicBlock (bool b)
 Property: Whether to allow empty basic blocks in the AST. More...
 
bool astCopyAllInstructions () const
 Property: Whether to copy instructions when building the AST. More...
 
virtual void astCopyAllInstructions (bool b)
 Property: Whether to copy instructions when building the AST. More...
 

Static Public Member Functions

static std::string specimenNameDocumentation ()
 Documentation for specimen names. More...
 
static void disassembleForRoseFrontend (SgAsmInterpretation *)
 
virtual Sawyer::CommandLine::SwitchGroup disassemblerSwitches ()
 Command-line switches related to the disassembler.
 
static Sawyer::CommandLine::SwitchGroup disassemblerSwitches (DisassemblerSettings &)
 Command-line switches related to the disassembler.
 
virtual Sawyer::CommandLine::SwitchGroup partitionerSwitches ()
 Command-line switches related to the partitioner.
 
static Sawyer::CommandLine::SwitchGroup partitionerSwitches (PartitionerSettings &)
 Command-line switches related to the partitioner.
 
virtual Sawyer::CommandLine::SwitchGroup engineSwitches ()
 Command-line switches related to engine behavior.
 
static Sawyer::CommandLine::SwitchGroup engineSwitches (EngineSettings &)
 Command-line switches related to engine behavior.
 
virtual Sawyer::CommandLine::SwitchGroup astConstructionSwitches ()
 Command-line switches related to AST construction.
 
static Sawyer::CommandLine::SwitchGroup astConstructionSwitches (AstConstructionSettings &)
 Command-line switches related to AST construction.
 

Constructor & Destructor Documentation

Rose::BinaryAnalysis::Partitioner2::JvmEngine::JvmEngine ( )
inline

Default constructor.

Definition at line 133 of file JvmEngine.h.

Rose::BinaryAnalysis::Partitioner2::JvmEngine::JvmEngine ( const Settings settings)
inlineexplicit

Construct engine with settings.

Definition at line 140 of file JvmEngine.h.

Member Function Documentation

SgAsmBlock* Rose::BinaryAnalysis::Partitioner2::JvmEngine::frontend ( int  argc,
char *  argv[],
const std::string &  purpose,
const std::string &  description 
)

Most basic usage of the partitioner.

This method does everything from parsing the command-line to generating an abstract syntax tree. If all is successful, then an abstract syntax tree is returned. The return value is a SgAsmBlock node that contains all the detected functions. If the specimen consisted of an ELF or PE container then the parent nodes of the returned AST will lead eventually to an SgProject node.

The command-line can be provided as a typical argc and argv pair, or as a vector of arguments. In the latter case, the vector should not include argv[0] or argv[argc] (which is always a null pointer).

The command-line supports a "--help" (or "-h") switch to describe all other switches and arguments, essentially generating output like a Unix man(1) page.

The purpose should be a single line string that will be shown in the title of the man page and should not start with an upper-case letter, a hyphen, white space, or the name of the command. E.g., a disassembler tool might specify the purpose as "disassembles a binary specimen".

The description is a full, multi-line description written in the Sawyer markup language where "@" characters have special meaning.

If an std::runtime_exception occurs and the exitOnError property is set, then the exception is caught, its text is emitted to the partitioner's fatal error stream, and exit(1) is invoked.

virtual SgAsmBlock* Rose::BinaryAnalysis::Partitioner2::JvmEngine::frontend ( const std::vector< std::string > &  args,
const std::string &  purpose,
const std::string &  description 
)
virtual

Most basic usage of the partitioner.

This method does everything from parsing the command-line to generating an abstract syntax tree. If all is successful, then an abstract syntax tree is returned. The return value is a SgAsmBlock node that contains all the detected functions. If the specimen consisted of an ELF or PE container then the parent nodes of the returned AST will lead eventually to an SgProject node.

The command-line can be provided as a typical argc and argv pair, or as a vector of arguments. In the latter case, the vector should not include argv[0] or argv[argc] (which is always a null pointer).

The command-line supports a "--help" (or "-h") switch to describe all other switches and arguments, essentially generating output like a Unix man(1) page.

The purpose should be a single line string that will be shown in the title of the man page and should not start with an upper-case letter, a hyphen, white space, or the name of the command. E.g., a disassembler tool might specify the purpose as "disassembles a binary specimen".

The description is a full, multi-line description written in the Sawyer markup language where "@" characters have special meaning.

If an std::runtime_exception occurs and the exitOnError property is set, then the exception is caught, its text is emitted to the partitioner's fatal error stream, and exit(1) is invoked.

void Rose::BinaryAnalysis::Partitioner2::JvmEngine::reset ( )

Reset the engine to its initial state.

This does not reset the settings properties since that can be done easily by constructing a new engine. It only resets the interpretation, disassembler, and memory map so all the top-level steps get executed again. This is a useful way to re-use the same partitioner to process multiple specimens.

Sawyer::CommandLine::ParserResult Rose::BinaryAnalysis::Partitioner2::JvmEngine::parseCommandLine ( int  argc,
char *  argv[],
const std::string &  purpose,
const std::string &  description 
)

Parse the command-line.

This method parses the command-line and uses it to update this engine's settings. Since a command line is usually more than just engine-related switches, the more usual approach is for the user to obtain engine-related command-line switch declarations and parse the command-line in user code.

This function automatically applies the command-line when it's successfully parsed, thereby updating this engine's settings. If something goes wrong with the command-line then an std::runtime_error is thrown.

The command-line can be provided as a typical argc and argv pair, or as a vector of arguments. In the latter case, the vector should not include argv[0] or argv[argc] (which is always a null pointer).

The purpose should be a single line string that will be shown in the title of the man page and should not start with an upper-case letter, a hyphen, white space, or the name of the command. E.g., a disassembler tool might specify the purpose as "disassembles a binary specimen".

The description is a full, multi-line description written in the Sawyer markup language where "@" characters have special meaning.

If the tool requires additional switches, an opportunity to adjust the parser, or other special handling, it can call commandLineParser to obtain a parser and then call its parse and apply methods explicitly.

If an std::runtime_exception occurs and the exitOnError property is set, then the exception is caught, its text is emitted to the partitioner's fatal error stream, and exit(1) is invoked.

virtual Sawyer::CommandLine::ParserResult Rose::BinaryAnalysis::Partitioner2::JvmEngine::parseCommandLine ( const std::vector< std::string > &  args,
const std::string &  purpose,
const std::string &  description 
)
virtual

Parse the command-line.

This method parses the command-line and uses it to update this engine's settings. Since a command line is usually more than just engine-related switches, the more usual approach is for the user to obtain engine-related command-line switch declarations and parse the command-line in user code.

This function automatically applies the command-line when it's successfully parsed, thereby updating this engine's settings. If something goes wrong with the command-line then an std::runtime_error is thrown.

The command-line can be provided as a typical argc and argv pair, or as a vector of arguments. In the latter case, the vector should not include argv[0] or argv[argc] (which is always a null pointer).

The purpose should be a single line string that will be shown in the title of the man page and should not start with an upper-case letter, a hyphen, white space, or the name of the command. E.g., a disassembler tool might specify the purpose as "disassembles a binary specimen".

The description is a full, multi-line description written in the Sawyer markup language where "@" characters have special meaning.

If the tool requires additional switches, an opportunity to adjust the parser, or other special handling, it can call commandLineParser to obtain a parser and then call its parse and apply methods explicitly.

If an std::runtime_exception occurs and the exitOnError property is set, then the exception is caught, its text is emitted to the partitioner's fatal error stream, and exit(1) is invoked.

SgAsmInterpretation* Rose::BinaryAnalysis::Partitioner2::JvmEngine::parseContainers ( const std::string &  fileName)

Parse specimen binary containers.

Parses the Java class files to create an abstract syntax tree (AST). If fileNames contains names that are either Java jar or class files.

This method tries to allocate a disassember if none is set and an ISA name is specified in the settings, otherwise the disassembler is chosen later. It also resets the interpretation to be the return value (see below), and clears the memory map.

Returns a binary interpretation (perhaps one of many). ELF files have only one interpretation; PE files have a DOS and a PE interpretation and this method will return the PE interpretation. The user may, at this point, select a different interpretation. If the list of names has nothing suitable for ROSE's frontend function (the thing that does the container parsing) then the null pointer is returned.

If an std::runtime_exception occurs and the exitOnError property is set, then the exception is caught, its text is emitted to the partitioner's fatal error stream, and exit(1) is invoked.

virtual Partitioner Rose::BinaryAnalysis::Partitioner2::JvmEngine::partition ( const std::vector< std::string > &  fileNames = std::vector< std::string >())
virtual

Partition instructions into basic blocks and functions.

Disassembles and organizes instructions into basic blocks and functions with these steps:

  • If the specimen is not loaded (areSpecimensLoaded) then call loadSpecimens. The no-argument version of this function requires that specimens have already been loaded.

Returns the partitioner that was used and which contains the results.

If an std::runtime_exception occurs and the exitOnError property is set, then the exception is caught, its text is emitted to the partitioner's fatal error stream, and exit(1) is invoked.

Partitioner Rose::BinaryAnalysis::Partitioner2::JvmEngine::partition ( const std::string &  fileName)

Partition instructions into basic blocks and functions.

Disassembles and organizes instructions into basic blocks and functions with these steps:

  • If the specimen is not loaded (areSpecimensLoaded) then call loadSpecimens. The no-argument version of this function requires that specimens have already been loaded.

Returns the partitioner that was used and which contains the results.

If an std::runtime_exception occurs and the exitOnError property is set, then the exception is caught, its text is emitted to the partitioner's fatal error stream, and exit(1) is invoked.

SgAsmBlock* Rose::BinaryAnalysis::Partitioner2::JvmEngine::buildAst ( const std::vector< std::string > &  fileNames = std::vector< std::string >())

Obtain an abstract syntax tree.

Constructs a new abstract syntax tree (AST) from partitioner information with these steps:

  • If the partitioner has not been run yet (according to isPartitioned), then do that now with the same arguments. The zero-argument version invokes the zero-argument partition, which requires that the specimen has already been loaded by loadSpecimens.

If an std::runtime_exception occurs and the exitOnError property is set, then the exception is caught, its text is emitted to the partitioner's fatal error stream, and exit(1) is invoked.

SgAsmBlock* Rose::BinaryAnalysis::Partitioner2::JvmEngine::buildAst ( const std::string &  fileName)

Obtain an abstract syntax tree.

Constructs a new abstract syntax tree (AST) from partitioner information with these steps:

  • If the partitioner has not been run yet (according to isPartitioned), then do that now with the same arguments. The zero-argument version invokes the zero-argument partition, which requires that the specimen has already been loaded by loadSpecimens.

If an std::runtime_exception occurs and the exitOnError property is set, then the exception is caught, its text is emitted to the partitioner's fatal error stream, and exit(1) is invoked.

static std::string Rose::BinaryAnalysis::Partitioner2::JvmEngine::specimenNameDocumentation ( )
static

Documentation for specimen names.

virtual Sawyer::CommandLine::Parser Rose::BinaryAnalysis::Partitioner2::JvmEngine::commandLineParser ( const std::string &  purpose,
const std::string &  description 
)
virtual

Creates a command-line parser.

Creates and returns a command-line parser suitable for parsing command-line switches and arguments needed by the disassembler.

The purpose should be a single line string that will be shown in the title of the man page and should not start with an upper-case letter, a hyphen, white space, or the name of the command. E.g., a disassembler tool might specify the purpose as "disassembles a binary specimen".

The description is a full, multi-line description written in the Sawyer markup language where "@" characters have special meaning.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::checkSettings ( )
virtual

Check settings after command-line is processed.

This does some checks and further configuration immediately after processing the command line. It's also called by most of the top-level operations.

If an ISA name is specified in the settings and no disassembler has been set yet, then a disassembler is allocated.

virtual Disassembler* Rose::BinaryAnalysis::Partitioner2::JvmEngine::obtainDisassembler ( Disassembler hint = NULL)
virtual

Obtain a disassembler.

Chooses a disassembler based on one of the following (in this order):

  • If this engine's disassembler property is non-null, then return that disassembler.
  • If this engine's ISA name setting is non-empty, then use it to obtain a disassembler.
  • If a binary container was parsed (areContainersParsed returns true and interpretation is non-null) then try to obtain a disassembler based on the interpretation.
  • If a hint is supplied, then use it.
  • If the engine doDisassemble property is false, return no disassembler (nullptr).
  • Fail by throwing an std::runtime_error.

In any case, the disassembler property is set to this method's return value.

virtual Partitioner Rose::BinaryAnalysis::Partitioner2::JvmEngine::createPartitioner ( )
virtual

Create partitioner.

This is the method usually called to create a new partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::runPartitioner ( Partitioner )
virtual

Partitions instructions into basic blocks and functions.

This method is a wrapper around a number of lower-level partitioning steps that uses the specified interpretation to instantiate functions and then uses the specified partitioner to discover basic blocks and use the CFG to assign basic blocks to functions. It is often overridden by subclasses.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::labelAddresses ( Partitioner ,
const Configuration  
)
virtual

Label addresses.

Labels addresses according to symbols, etc. Address labels are used for things like giving an unnamed function a name when it's attached to the partitioner's CFG/AUM.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::discoverBasicBlocks ( Partitioner )
virtual

Discover as many basic blocks as possible.

Processes the "undiscovered" work list until the list becomes empty. This list is the list of basic block placeholders for which no attempt has been made to discover instructions. This method implements a recursive descent disassembler, although it does not process the control flow edges in any particular order. Subclasses are expected to override this to implement a more directed approach to discovering basic blocks.

const Settings& Rose::BinaryAnalysis::Partitioner2::JvmEngine::settings ( ) const
inline

Property: All settings.

Returns a reference to the engine settings structures. Alternatively, each setting also has a corresponding engine member function to query or adjust the setting directly.

Definition at line 437 of file JvmEngine.h.

Settings& Rose::BinaryAnalysis::Partitioner2::JvmEngine::settings ( )
inline

Property: All settings.

Returns a reference to the engine settings structures. Alternatively, each setting also has a corresponding engine member function to query or adjust the setting directly.

Definition at line 438 of file JvmEngine.h.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::exitOnError ( ) const
inline

Property: Error handling.

If an exception occurs during certain high-level functions and this property is set, then the exception is caught, its text is written to a fatal error stream, and exit is called with a non-zero value. Since the error message is more user-friendly and professional looking than the uncaught exception message produced by the C++ runtime, the default is that exceptions are caught. If a tool needs to perform its own error handling, then it should clear this property.

Definition at line 449 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::engine, and Rose::BinaryAnalysis::Partitioner2::EngineSettings::exitOnError.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::exitOnError ( bool  b)
inlinevirtual

Property: Error handling.

If an exception occurs during certain high-level functions and this property is set, then the exception is caught, its text is written to a fatal error stream, and exit is called with a non-zero value. Since the error message is more user-friendly and professional looking than the uncaught exception message produced by the C++ runtime, the default is that exceptions are caught. If a tool needs to perform its own error handling, then it should clear this property.

Definition at line 450 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::engine, and Rose::BinaryAnalysis::Partitioner2::EngineSettings::exitOnError.

Progress::Ptr Rose::BinaryAnalysis::Partitioner2::JvmEngine::progress ( ) const
inline

Property: progress reporting.

The optional object to receive progress reports.

Definition at line 458 of file JvmEngine.h.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::progress ( const Progress::Ptr progress)
inlinevirtual

Property: progress reporting.

The optional object to receive progress reports.

Definition at line 459 of file JvmEngine.h.

References progress().

Referenced by progress().

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::doDisassemble ( ) const
inline

Property: Perform disassembly.

If true, then disassembly is performed, otherwise it's skipped.

Definition at line 467 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::disassembler, and Rose::BinaryAnalysis::Partitioner2::DisassemblerSettings::doDisassemble.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::doDisassemble ( bool  b)
inlinevirtual

Property: Perform disassembly.

If true, then disassembly is performed, otherwise it's skipped.

Definition at line 468 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::disassembler, and Rose::BinaryAnalysis::Partitioner2::DisassemblerSettings::doDisassemble.

Disassembler* Rose::BinaryAnalysis::Partitioner2::JvmEngine::disassembler ( ) const
inline

Property: Disassembler.

This property holds the disassembler to use whenever a new partitioner is created. If null, then the engine will choose a disassembler based on the binary container (unless doDisassemble property is clear).

Definition at line 477 of file JvmEngine.h.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::disassembler ( Disassembler d)
inlinevirtual

Property: Disassembler.

This property holds the disassembler to use whenever a new partitioner is created. If null, then the engine will choose a disassembler based on the binary container (unless doDisassemble property is clear).

Definition at line 478 of file JvmEngine.h.

const std::string& Rose::BinaryAnalysis::Partitioner2::JvmEngine::isaName ( ) const
inline

Property: Instruction set architecture name.

The instruction set architecture name is used to obtain a disassembler and overrides the disassembler that would otherwise be found by examining the binary container.

Definition at line 487 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::disassembler, and Rose::BinaryAnalysis::Partitioner2::DisassemblerSettings::isaName.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::isaName ( const std::string &  s)
inlinevirtual

Property: Instruction set architecture name.

The instruction set architecture name is used to obtain a disassembler and overrides the disassembler that would otherwise be found by examining the binary container.

Definition at line 488 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::disassembler, and Rose::BinaryAnalysis::Partitioner2::DisassemblerSettings::isaName.

const std::vector<rose_addr_t>& Rose::BinaryAnalysis::Partitioner2::JvmEngine::functionStartingVas ( ) const
inline

Property: Starting addresses for disassembly.

This is a list of addresses where functions will be created in addition to those functions discovered by examining the binary container.

Definition at line 497 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::functionStartingVas, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

std::vector<rose_addr_t>& Rose::BinaryAnalysis::Partitioner2::JvmEngine::functionStartingVas ( )
inline

Property: Starting addresses for disassembly.

This is a list of addresses where functions will be created in addition to those functions discovered by examining the binary container.

Definition at line 498 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::functionStartingVas, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::usingSemantics ( ) const
inline

Property: Whether to use instruction semantics.

If set, then instruction semantics are used to fine tune certain analyses that happen during partitioning, such as determining whether branch conditions are opaque.

Definition at line 507 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner, and Rose::BinaryAnalysis::Partitioner2::BasePartitionerSettings::usingSemantics.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::usingSemantics ( bool  b)
inlinevirtual

Property: Whether to use instruction semantics.

If set, then instruction semantics are used to fine tune certain analyses that happen during partitioning, such as determining whether branch conditions are opaque.

Definition at line 508 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner, and Rose::BinaryAnalysis::Partitioner2::BasePartitionerSettings::usingSemantics.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::ignoringUnknownInsns ( ) const
inline

Property: Whether unknown instructions are ignored.

If set, then instructions that cannot be disassembled are treated like no-ops for the purpose of building the global control flow graph (otherwise they terminate a basic block). This is useful when working with fixed-width instruction set architectures for which ROSE has an incomplete disassembler. For instance, PowerPC architectures that are augmented with additional undocumented co-processor instructions.

Definition at line 519 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::BasePartitionerSettings::ignoringUnknownInsns, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::ignoringUnknownInsns ( bool  b)
inlinevirtual

Property: Whether unknown instructions are ignored.

If set, then instructions that cannot be disassembled are treated like no-ops for the purpose of building the global control flow graph (otherwise they terminate a basic block). This is useful when working with fixed-width instruction set architectures for which ROSE has an incomplete disassembler. For instance, PowerPC architectures that are augmented with additional undocumented co-processor instructions.

Definition at line 520 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::BasePartitionerSettings::ignoringUnknownInsns, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

SemanticMemoryParadigm Rose::BinaryAnalysis::Partitioner2::JvmEngine::semanticMemoryParadigm ( ) const
inline

Property: Type of container for semantic memory.

Determines whether Partitioner objects created by this engine will be configured to use list-based or map-based semantic memory states. The list-based states are more precise, but they're also slower.

Definition at line 529 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner, and Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::semanticMemoryParadigm.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::semanticMemoryParadigm ( SemanticMemoryParadigm  p)
inlinevirtual

Property: Type of container for semantic memory.

Determines whether Partitioner objects created by this engine will be configured to use list-based or map-based semantic memory states. The list-based states are more precise, but they're also slower.

Definition at line 530 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner, and Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::semanticMemoryParadigm.

size_t Rose::BinaryAnalysis::Partitioner2::JvmEngine::maxBasicBlockSize ( ) const
inline

Property: Maximum size for basic blocks.

This property is the maximum size for basic blocks measured in number of instructions. Any basic block that would contain more than this number of instructions is split into multiple basic blocks. Having smaller basic blocks makes some intra-block analysis faster, but they have less information. A value of zero indicates no limit.

Definition at line 540 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::maxBasicBlockSize, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::maxBasicBlockSize ( size_t  n)
inlinevirtual

Property: Maximum size for basic blocks.

This property is the maximum size for basic blocks measured in number of instructions. Any basic block that would contain more than this number of instructions is split into multiple basic blocks. Having smaller basic blocks makes some intra-block analysis faster, but they have less information. A value of zero indicates no limit.

Definition at line 541 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::maxBasicBlockSize, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

const std::vector<rose_addr_t>& Rose::BinaryAnalysis::Partitioner2::JvmEngine::ipRewrites ( ) const
inline

Property: CFG edge rewrite pairs.

This property is a list of old/new instruction pointer pairs that describe how to rewrite edges of the global control flow graph. Whenever an instruction has a successor whose address is an old address, it will be replaced with a successor edge that points to the new address. This list must have an even number of elements where element 2*i+0 is and old address and element 2*i+1 is the corresponding new address.

Definition at line 552 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::ipRewrites, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::ipRewrites ( const std::vector< rose_addr_t > &  v)
inlinevirtual

Property: CFG edge rewrite pairs.

This property is a list of old/new instruction pointer pairs that describe how to rewrite edges of the global control flow graph. Whenever an instruction has a successor whose address is an old address, it will be replaced with a successor edge that points to the new address. This list must have an even number of elements where element 2*i+0 is and old address and element 2*i+1 is the corresponding new address.

Definition at line 553 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::ipRewrites, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingDeadCode ( ) const
inline

Property: Whether to find dead code.

If ghost edges are being discovered (see usingSemantics and followingGhostEdges) and are not being inserted into the global CFG, then the target address of the ghost edges might not be used as code addresses during the code discovery phase. This property, when true, will cause the target address of ghost edges to be used to discover additional instructions even if they have no incoming CFG edges.

Definition at line 564 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingDeadCode, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingDeadCode ( bool  b)
inlinevirtual

Property: Whether to find dead code.

If ghost edges are being discovered (see usingSemantics and followingGhostEdges) and are not being inserted into the global CFG, then the target address of the ghost edges might not be used as code addresses during the code discovery phase. This property, when true, will cause the target address of ghost edges to be used to discover additional instructions even if they have no incoming CFG edges.

Definition at line 565 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingDeadCode, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

rose_addr_t Rose::BinaryAnalysis::Partitioner2::JvmEngine::peScramblerDispatcherVa ( ) const
inline

Property: PE-Scrambler dispatcher address.

If non-zero then the partitioner defeats PE-scrambled binary obfuscation by replacing control flow edges that go through this function with the de-scrambled control flow edge.

Definition at line 574 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner, and Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::peScramblerDispatcherVa.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::peScramblerDispatcherVa ( rose_addr_t  va)
inlinevirtual

Property: PE-Scrambler dispatcher address.

If non-zero then the partitioner defeats PE-scrambled binary obfuscation by replacing control flow edges that go through this function with the de-scrambled control flow edge.

Definition at line 575 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner, and Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::peScramblerDispatcherVa.

size_t Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingIntraFunctionCode ( ) const
inline

Property: Whether to find intra-function code.

If positive, the partitioner will look for parts of memory that were not disassembled and occur between other parts of the same function, and will attempt to disassemble that missing part and link it into the surrounding function. It will perform up to n passes across the entire address space.

Definition at line 585 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingIntraFunctionCode, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingIntraFunctionCode ( size_t  n)
inlinevirtual

Property: Whether to find intra-function code.

If positive, the partitioner will look for parts of memory that were not disassembled and occur between other parts of the same function, and will attempt to disassemble that missing part and link it into the surrounding function. It will perform up to n passes across the entire address space.

Definition at line 586 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingIntraFunctionCode, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingIntraFunctionData ( ) const
inline

Property: Whether to find intra-function data.

If set, the partitioner will look for parts of memory that were not disassembled and occur between other parts of the same function, and will treat the missing part as static data belonging to that function.

Definition at line 595 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingIntraFunctionData, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingIntraFunctionData ( bool  b)
inlinevirtual

Property: Whether to find intra-function data.

If set, the partitioner will look for parts of memory that were not disassembled and occur between other parts of the same function, and will treat the missing part as static data belonging to that function.

Definition at line 596 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingIntraFunctionData, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

const AddressInterval& Rose::BinaryAnalysis::Partitioner2::JvmEngine::interruptVector ( ) const
inline

Property: Location of machine interrupt vector.

If non-empty, the partitioner will treat the specified area as a machine interrupt vector. The effect of the vector varies by architecture.

Definition at line 605 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::interruptVector, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::interruptVector ( const AddressInterval i)
inlinevirtual

Property: Location of machine interrupt vector.

If non-empty, the partitioner will treat the specified area as a machine interrupt vector. The effect of the vector varies by architecture.

Definition at line 606 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::interruptVector, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::doingPostAnalysis ( ) const
inline

Property: Whether to perform post-partitioning analysis steps.

If set, then each of the enabled post-partitioning analysis steps are executed. Some of these can be quite expensive, but they can be enabled and disabled individually. Those that are enabled are only run if this property also is set.

Definition at line 615 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::doingPostAnalysis, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::doingPostAnalysis ( bool  b)
inlinevirtual

Property: Whether to perform post-partitioning analysis steps.

If set, then each of the enabled post-partitioning analysis steps are executed. Some of these can be quite expensive, but they can be enabled and disabled individually. Those that are enabled are only run if this property also is set.

Definition at line 616 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::doingPostAnalysis, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::doingPostFunctionMayReturn ( ) const
inline

Property: Whether to run the function may-return analysis.

Determines whether the may-return analysis is run when doingPostAnalysis is true.

Definition at line 624 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::doingPostFunctionMayReturn, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::doingPostFunctionMayReturn ( bool  b)
inlinevirtual

Property: Whether to run the function may-return analysis.

Determines whether the may-return analysis is run when doingPostAnalysis is true.

Definition at line 625 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::doingPostFunctionMayReturn, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::doingPostFunctionStackDelta ( ) const
inline

Property: Whether to run the function stack delta analysis.

Determines whether the stack delta analysis is run when doingPostAnalysis is true.

Definition at line 633 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::doingPostFunctionStackDelta, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::doingPostFunctionStackDelta ( bool  b)
inlinevirtual

Property: Whether to run the function stack delta analysis.

Determines whether the stack delta analysis is run when doingPostAnalysis is true.

Definition at line 634 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::doingPostFunctionStackDelta, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::doingPostCallingConvention ( ) const
inline

Property: Whether to run calling-convention analysis.

Determines whether calling convention analysis is run on each function when doingPostAnalysis is true.

Definition at line 642 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::doingPostCallingConvention, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::doingPostCallingConvention ( bool  b)
inlinevirtual

Property: Whether to run calling-convention analysis.

Determines whether calling convention analysis is run on each function when doingPostAnalysis is true.

Definition at line 643 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::doingPostCallingConvention, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::doingPostFunctionNoop ( ) const
inline

Property: Whether to run no-op function analysis.

Determines whether function no-op analysis is run on each function when doingPostAnalysis is true. This analysis determines whether a function is effectively a no-op and gives it a name indicative of a no-op if it is one.

Definition at line 652 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::doingPostFunctionNoop, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::doingPostFunctionNoop ( bool  b)
inlinevirtual

Property: Whether to run no-op function analysis.

Determines whether function no-op analysis is run on each function when doingPostAnalysis is true. This analysis determines whether a function is effectively a no-op and gives it a name indicative of a no-op if it is one.

Definition at line 653 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::doingPostFunctionNoop, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

FunctionReturnAnalysis Rose::BinaryAnalysis::Partitioner2::JvmEngine::functionReturnAnalysis ( ) const
inline

Property: Whether to run the function may-return analysis.

The caller can decide whether may-return analysis runs, or if it runs whether an indeterminate result should be considered true or false.

Definition at line 662 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::functionReturnAnalysis, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::functionReturnAnalysis ( FunctionReturnAnalysis  x)
inlinevirtual

Property: Whether to run the function may-return analysis.

The caller can decide whether may-return analysis runs, or if it runs whether an indeterminate result should be considered true or false.

Definition at line 663 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::functionReturnAnalysis, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

size_t Rose::BinaryAnalysis::Partitioner2::JvmEngine::functionReturnAnalysisMaxSorts ( ) const
inline

Property: Maximum number of function may-return sorting operations.

If function may-return analysis is being run, the functions are normally sorted according to their call depth (after arbitrarily breaking cycles) and the analysis is run from the leaf functions to the higher functions in order to minimize forward dependencies. However, the functions need to be resorted each time a new function is discovered and/or when the global CFG is sufficiently modified. Therefore, the total cost of the sorting can be substantial for large specimens. This property limits the total number of sorting operations and reverts to unsorted analysis once the limit is reached. This allows smaller specimens to be handled as accurately as possible, but still allows large specimens to be processed in a reasonable amount of time. The limit is based on the number of sorting operations rather than the specimen size.

Definition at line 678 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::functionReturnAnalysisMaxSorts, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::functionReturnAnalysisMaxSorts ( size_t  n)
inlinevirtual

Property: Maximum number of function may-return sorting operations.

If function may-return analysis is being run, the functions are normally sorted according to their call depth (after arbitrarily breaking cycles) and the analysis is run from the leaf functions to the higher functions in order to minimize forward dependencies. However, the functions need to be resorted each time a new function is discovered and/or when the global CFG is sufficiently modified. Therefore, the total cost of the sorting can be substantial for large specimens. This property limits the total number of sorting operations and reverts to unsorted analysis once the limit is reached. This allows smaller specimens to be handled as accurately as possible, but still allows large specimens to be processed in a reasonable amount of time. The limit is based on the number of sorting operations rather than the specimen size.

Definition at line 679 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::functionReturnAnalysisMaxSorts, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingInterFunctionCalls ( ) const
inline

Property: Whether to search for function calls between exiting functions.

If set, then JvmEngine::makeFunctionFromInterFunctionCalls is invoked, which looks for call-like code between existing functions in order to create new functions at the call target addresses.

Definition at line 688 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingInterFunctionCalls, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingInterFunctionCalls ( bool  b)
inlinevirtual

Property: Whether to search for function calls between exiting functions.

If set, then JvmEngine::makeFunctionFromInterFunctionCalls is invoked, which looks for call-like code between existing functions in order to create new functions at the call target addresses.

Definition at line 689 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingInterFunctionCalls, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingFunctionCallFunctions ( ) const
inline

Property: Whether to turn function call targets into functions.

If set, then sequences of instructions that behave like a function call (including plain old function call instructions) will cause a function to be created at the call's target address under most circumstances.

Definition at line 698 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingFunctionCallFunctions, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingFunctionCallFunctions ( bool  b)
inlinevirtual

Property: Whether to turn function call targets into functions.

If set, then sequences of instructions that behave like a function call (including plain old function call instructions) will cause a function to be created at the call's target address under most circumstances.

Definition at line 699 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingFunctionCallFunctions, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingEntryFunctions ( ) const
inline

Property: Whether to make functions at program entry points.

If set, then all program entry points are assumed to be the start of a function.

Definition at line 707 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingEntryFunctions, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingEntryFunctions ( bool  b)
inlinevirtual

Property: Whether to make functions at program entry points.

If set, then all program entry points are assumed to be the start of a function.

Definition at line 708 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingEntryFunctions, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingErrorFunctions ( ) const
inline

Property: Whether to make error handling functions.

If set and information is available about error handling and exceptions, then that information is used to create entry points for functions.

Definition at line 717 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingErrorFunctions, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingErrorFunctions ( bool  b)
inlinevirtual

Property: Whether to make error handling functions.

If set and information is available about error handling and exceptions, then that information is used to create entry points for functions.

Definition at line 718 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingErrorFunctions, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingImportFunctions ( ) const
inline

Property: Whether to make functions at import addresses.

If set and the file contains a table describing the addresses of imported functions, then each of those addresses is assumed to be the entry point of a function.

Definition at line 727 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingImportFunctions, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingImportFunctions ( bool  b)
inlinevirtual

Property: Whether to make functions at import addresses.

If set and the file contains a table describing the addresses of imported functions, then each of those addresses is assumed to be the entry point of a function.

Definition at line 728 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingImportFunctions, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingExportFunctions ( ) const
inline

Property: Whether to make functions at export addresses.

If set and the file contains a table describing the addresses of exported functions, then each of those addresses is assumed to be the entry point of a function.

Definition at line 737 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingExportFunctions, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingExportFunctions ( bool  b)
inlinevirtual

Property: Whether to make functions at export addresses.

If set and the file contains a table describing the addresses of exported functions, then each of those addresses is assumed to be the entry point of a function.

Definition at line 738 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingExportFunctions, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingSymbolFunctions ( ) const
inline

Property: Whether to make functions according to symbol tables.

If set and the file contains symbol tables, then symbols that define function addresses cause functions to be created at those addresses.

Definition at line 747 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingSymbolFunctions, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingSymbolFunctions ( bool  b)
inlinevirtual

Property: Whether to make functions according to symbol tables.

If set and the file contains symbol tables, then symbols that define function addresses cause functions to be created at those addresses.

Definition at line 748 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingSymbolFunctions, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingDataFunctionPointers ( ) const
inline

Property: Whether to search static data for function pointers.

If this property is set, then the partitioner will scan static data to look for things that might be pointers to functions.

Definition at line 757 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingDataFunctionPointers, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingDataFunctionPointers ( bool  b)
inlinevirtual

Property: Whether to search static data for function pointers.

If this property is set, then the partitioner will scan static data to look for things that might be pointers to functions.

Definition at line 758 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingDataFunctionPointers, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingCodeFunctionPointers ( ) const
inline

Property: Whether to search existing instructions for function pointers.

If this property is set, then the partitioner scans existing instructions to look for constants that seem to be pointers to functions that haven't been discovered yet.

Definition at line 767 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingCodeFunctionPointers, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::findingCodeFunctionPointers ( bool  b)
inlinevirtual

Property: Whether to search existing instructions for function pointers.

If this property is set, then the partitioner scans existing instructions to look for constants that seem to be pointers to functions that haven't been discovered yet.

Definition at line 768 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::findingCodeFunctionPointers, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::checkingCallBranch ( ) const
inline

Property: Whether to look for function calls used as branches.

If this property is set, then function call instructions are not automatically assumed to be actual function calls.

Definition at line 776 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::BasePartitionerSettings::checkingCallBranch, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::checkingCallBranch ( bool  b)
inlinevirtual

Property: Whether to look for function calls used as branches.

If this property is set, then function call instructions are not automatically assumed to be actual function calls.

Definition at line 777 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::BasePartitionerSettings::checkingCallBranch, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::basicBlockSemanticsAutoDrop ( ) const
inline

Property: Automatically drop semantics for attached basic blocks.

Basic blocks normally cache their semantic state as they're being discovered so that the state does not need to be recomputed from the beginning of the block each time a new instruction is appended. However, caching this information can consume a large number of symbolic expression nodes which are seldom needed once the basic block is fully discovered. Therefore, setting this property to true will cause a basic block's semantic information to be forgotten as soon as the basic block is attached to the CFG.

See also
Partitioner::basicBlockDropSemantics

Definition at line 791 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::BasePartitionerSettings::basicBlockSemanticsAutoDrop, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

void Rose::BinaryAnalysis::Partitioner2::JvmEngine::basicBlockSemanticsAutoDrop ( bool  b)
inline

Property: Automatically drop semantics for attached basic blocks.

Basic blocks normally cache their semantic state as they're being discovered so that the state does not need to be recomputed from the beginning of the block each time a new instruction is appended. However, caching this information can consume a large number of symbolic expression nodes which are seldom needed once the basic block is fully discovered. Therefore, setting this property to true will cause a basic block's semantic information to be forgotten as soon as the basic block is attached to the CFG.

See also
Partitioner::basicBlockDropSemantics

Definition at line 792 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::BasePartitionerSettings::basicBlockSemanticsAutoDrop, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

const std::vector<std::string>& Rose::BinaryAnalysis::Partitioner2::JvmEngine::configurationNames ( ) const
inline

Property: Configuration files.

This property holds a list of configuration files or directories.

Definition at line 800 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::EngineSettings::configurationNames, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::engine.

std::vector<std::string>& Rose::BinaryAnalysis::Partitioner2::JvmEngine::configurationNames ( )
inline

Property: Configuration files.

This property holds a list of configuration files or directories.

Definition at line 801 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::EngineSettings::configurationNames, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::engine.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::namingConstants ( ) const
inline

Property: Give names to constants.

If this property is set, then the partitioner calls Modules::nameConstants as part of its final steps.

Definition at line 809 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::namingConstants, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::namingConstants ( bool  b)
inlinevirtual

Property: Give names to constants.

If this property is set, then the partitioner calls Modules::nameConstants as part of its final steps.

Definition at line 810 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::namingConstants, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

const AddressInterval& Rose::BinaryAnalysis::Partitioner2::JvmEngine::namingStrings ( ) const
inline

Property: Addresses where strings might start.

Within instruction operands, any constants that fall within this set of addresses are checked to see if they point into an ASCII C-style NUL-terminated string. If so, and if the constant doesn't already have a comment, then a comment is attached describing the string. Setting this to empty disables assigning string literal comments to integer values.

Definition at line 820 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::namingStrings, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

void Rose::BinaryAnalysis::Partitioner2::JvmEngine::namingStrings ( const AddressInterval where)
inline

Property: Addresses where strings might start.

Within instruction operands, any constants that fall within this set of addresses are checked to see if they point into an ASCII C-style NUL-terminated string. If so, and if the constant doesn't already have a comment, then a comment is attached describing the string. Setting this to empty disables assigning string literal comments to integer values.

Definition at line 821 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::namingStrings, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::namingSystemCalls ( ) const
inline

Property: Give names to system calls.

If this property is set, then the partitioner makes a pass after the control flow graph is finalized and tries to give names to system calls using the Rose::BinaryAnalysis::SystemCall analysis.

Definition at line 830 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::namingSyscalls, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::namingSystemCalls ( bool  b)
inlinevirtual

Property: Give names to system calls.

If this property is set, then the partitioner makes a pass after the control flow graph is finalized and tries to give names to system calls using the Rose::BinaryAnalysis::SystemCall analysis.

Definition at line 831 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::namingSyscalls, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

const boost::filesystem::path& Rose::BinaryAnalysis::Partitioner2::JvmEngine::systemCallHeader ( ) const
inline

Property: Header file in which system calls are defined.

If this property is not empty, then the specified Linux header file is parsed to obtain the mapping between system call numbers and their names. Otherwise, any analysis that needs system call names obtains them by looking in predetermined system header files.

Definition at line 841 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner, and Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::syscallHeader.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::systemCallHeader ( const boost::filesystem::path &  filename)
inlinevirtual

Property: Header file in which system calls are defined.

If this property is not empty, then the specified Linux header file is parsed to obtain the mapping between system call numbers and their names. Otherwise, any analysis that needs system call names obtains them by looking in predetermined system header files.

Definition at line 842 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner, and Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::syscallHeader.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::demangleNames ( ) const
inline

Property: Demangle names.

If this property is set, then names are passed through a demangle step, which generally converts them from a low-level format to a source language format.

Definition at line 851 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::demangleNames, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::demangleNames ( bool  b)
inlinevirtual

Property: Demangle names.

If this property is set, then names are passed through a demangle step, which generally converts them from a low-level format to a source language format.

Definition at line 852 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::PartitionerSettings::demangleNames, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::partitioner.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::astAllowEmptyGlobalBlock ( ) const
inline

Property: Whether to allow empty global block in the AST.

If partitioner has not detected any functions, then it will create an AST containing either a single global block with no children (true) or no global block at all (false).

Definition at line 861 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::AstConstructionSettings::allowEmptyGlobalBlock, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::astConstruction.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::astAllowEmptyGlobalBlock ( bool  b)
inlinevirtual

Property: Whether to allow empty global block in the AST.

If partitioner has not detected any functions, then it will create an AST containing either a single global block with no children (true) or no global block at all (false).

Definition at line 862 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::AstConstructionSettings::allowEmptyGlobalBlock, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::astConstruction.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::astAllowFunctionWithNoBasicBlocks ( ) const
inline

Property: Whether to allow empty functions in the AST.

If a function has no basic blocks then the partitioner will create an AST containing either a function node (SgAsmFunction) with no basic block children (true) or no function node at all (false).

Definition at line 871 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::AstConstructionSettings::allowFunctionWithNoBasicBlocks, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::astConstruction.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::astAllowFunctionWithNoBasicBlocks ( bool  b)
inlinevirtual

Property: Whether to allow empty functions in the AST.

If a function has no basic blocks then the partitioner will create an AST containing either a function node (SgAsmFunction) with no basic block children (true) or no function node at all (false).

Definition at line 874 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::AstConstructionSettings::allowFunctionWithNoBasicBlocks, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::astConstruction.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::astAllowEmptyBasicBlock ( ) const
inline

Property: Whether to allow empty basic blocks in the AST.

If a basic block has no instructions then the partitioner will create an AST containing either a basic block node (SgAsmNode) with no instruction children (true) or no basic block node at all (false).

Definition at line 885 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::AstConstructionSettings::allowEmptyBasicBlocks, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::astConstruction.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::astAllowEmptyBasicBlock ( bool  b)
inlinevirtual

Property: Whether to allow empty basic blocks in the AST.

If a basic block has no instructions then the partitioner will create an AST containing either a basic block node (SgAsmNode) with no instruction children (true) or no basic block node at all (false).

Definition at line 886 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::AstConstructionSettings::allowEmptyBasicBlocks, and Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::astConstruction.

bool Rose::BinaryAnalysis::Partitioner2::JvmEngine::astCopyAllInstructions ( ) const
inline

Property: Whether to copy instructions when building the AST.

Determines whether each instruction is deep-copied into the AST from the instruction provider (true) or simply referenced (false). Note that because the partitioner allows the same instruction to appear in more than one function, referencing instructions directly in the AST will violate the basic property of a tree: the instruction will be reachable in an AST depth-first traversal more than once although the instruction will have only one arbitrarily chosen basic block as its parent. Turning off the copying makes AST construction faster.

Definition at line 898 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::astConstruction, and Rose::BinaryAnalysis::Partitioner2::AstConstructionSettings::copyAllInstructions.

virtual void Rose::BinaryAnalysis::Partitioner2::JvmEngine::astCopyAllInstructions ( bool  b)
inlinevirtual

Property: Whether to copy instructions when building the AST.

Determines whether each instruction is deep-copied into the AST from the instruction provider (true) or simply referenced (false). Note that because the partitioner allows the same instruction to appear in more than one function, referencing instructions directly in the AST will violate the basic property of a tree: the instruction will be reachable in an AST depth-first traversal more than once although the instruction will have only one arbitrarily chosen basic block as its parent. Turning off the copying makes AST construction faster.

Definition at line 899 of file JvmEngine.h.

References Rose::BinaryAnalysis::Partitioner2::JvmEngine::Settings::astConstruction, and Rose::BinaryAnalysis::Partitioner2::AstConstructionSettings::copyAllInstructions.


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