ROSE 0.11.145.147
|
Settings that control building the AST.
The runtime descriptions and command-line parser for these switches can be obtained from Engine::settings.
Definition at line 100 of file Rose/BinaryAnalysis/Partitioner2/BasicTypes.h.
#include <Rose/BinaryAnalysis/Partitioner2/BasicTypes.h>
Static Public Member Functions | |
static AstConstructionSettings | strict () |
Default strict settings. | |
static AstConstructionSettings | permissive () |
Default permissive settings. | |
Public Attributes | |
bool | allowEmptyGlobalBlock = false |
Whether to allow an empty global block. | |
bool | allowFunctionWithNoBasicBlocks = false |
Whether to allow functions with no basic blocks. | |
bool | allowEmptyBasicBlocks = false |
Whether to allow a basic block to be empty. | |
bool | copyAllInstructions = true |
Whether to allow shared instructions in the AST. | |
|
inlinestatic |
Default strict settings.
These settings try to construct an AST that will work with all old AST-based analyses. Some information represented in the partitioner might not be copied into the AST.
Definition at line 146 of file Rose/BinaryAnalysis/Partitioner2/BasicTypes.h.
References allowEmptyBasicBlocks, allowEmptyGlobalBlock, allowFunctionWithNoBasicBlocks, and copyAllInstructions.
|
inlinestatic |
Default permissive settings.
These settings allow as much of the partitioner's information as possible to be copied into the AST even if it means that AST might violate some invariants that are expected by old analyses. For instance, it will allow creation of a basic block with no instructions if the block exists at a virtual addresses that could not be disassembled.
Definition at line 160 of file Rose/BinaryAnalysis/Partitioner2/BasicTypes.h.
References allowEmptyBasicBlocks, allowEmptyGlobalBlock, allowFunctionWithNoBasicBlocks, and copyAllInstructions.
bool Rose::BinaryAnalysis::Partitioner2::AstConstructionSettings::allowEmptyGlobalBlock = false |
Whether to allow an empty global block.
If the partitioner contains no functions then either create an empty global block (top-level SgAsmBlock) when this setting is true, or return a null global block pointer when this setting is false.
Definition at line 105 of file Rose/BinaryAnalysis/Partitioner2/BasicTypes.h.
Referenced by permissive(), and strict().
bool Rose::BinaryAnalysis::Partitioner2::AstConstructionSettings::allowFunctionWithNoBasicBlocks = false |
Whether to allow functions with no basic blocks.
If the the partitioner knows about a function but was unable to produce any basic blocks then we have two choices for constructing the SgAsmFunction node in the AST: if this setting is true, then create a function node with no SgAsmBlock children; otherwise return a null pointer and do not add ths function to the AST.
Definition at line 112 of file Rose/BinaryAnalysis/Partitioner2/BasicTypes.h.
Referenced by permissive(), and strict().
bool Rose::BinaryAnalysis::Partitioner2::AstConstructionSettings::allowEmptyBasicBlocks = false |
Whether to allow a basic block to be empty.
If the partitioner contains a basic block with no instructions, such as a block whose starting address is not mapped, then we have two choices when creating the corresponding SgAsmBlock node in the AST: if this setting is true, then create a basic block with no SgAsmInstruction children; otherwise return a null pointer and do not add the basic block to the AST.
Definition at line 120 of file Rose/BinaryAnalysis/Partitioner2/BasicTypes.h.
Referenced by permissive(), and strict().
bool Rose::BinaryAnalysis::Partitioner2::AstConstructionSettings::copyAllInstructions = true |
Whether to allow shared instructions in the AST.
This setting controls how an instruction that is shared between two or more functions by virtue of its basic block being part of both functions is represented in the AST. If this setting is true, instruction ASTs (rooted at SgAsmInstruction) are deep-copied into the AST at each place they occur.
The partitioner allows an instruction to be shared by two or functions by virtue of the instruction's basic block being shared by those functions. If the copying is not performed then the AST will no longer be a tree (it will be a lattice) but each instruction can point to only one parent basic block (chosen arbitrarily). Thus, a depth-first traversal of the AST will find the same SgAsmInstruction node more than once, yet following the instruction's parent pointer will always return the same basic block.
Definition at line 133 of file Rose/BinaryAnalysis/Partitioner2/BasicTypes.h.
Referenced by permissive(), and strict().