ROSE  0.11.109.0
EngineJvm.h
1 #ifndef ROSE_BinaryAnalysis_Partitioner2_EngineJvm_H
2 #define ROSE_BinaryAnalysis_Partitioner2_EngineJvm_H
3 
4 #include <Rose/BinaryAnalysis/Partitioner2/Engine.h>
5 
6 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
7 
8 namespace Rose {
9 namespace BinaryAnalysis {
10 namespace Partitioner2 {
11 
91 class ROSE_DLL_API EngineJvm: private boost::noncopyable {
92 public:
96  struct Settings {
101  };
102 
104  class Exception: public Rose::Exception {
105  public:
106  Exception(const std::string &mesg)
107  : Rose::Exception(mesg) {}
108  ~Exception() throw () {}
109  };
110 
112  // Internal data structures
114 private:
115 
117  // Data members
119 private:
120  Settings settings_; // Settings for the partitioner.
121  Disassembler::BasePtr disassembler_; // not ref-counted yet, but don't destroy it since user owns it
122  Progress::Ptr progress_; // optional progress reporting
123 
125  // Constructors
127 public:
129  EngineJvm();
130 
132  explicit EngineJvm(const Settings &settings);
133 
134  virtual ~EngineJvm();
135 
137  // The very top-level use case
139 public:
164  SgAsmBlock* frontend(int argc, char *argv[],
165  const std::string &purpose, const std::string &description);
166  virtual SgAsmBlock* frontend(const std::vector<std::string> &args,
167  const std::string &purpose, const std::string &description);
170  // Basic top-level steps
173 public:
179  void reset();
180 
207  Sawyer::CommandLine::ParserResult parseCommandLine(int argc, char *argv[],
208  const std::string &purpose, const std::string &description) /*final*/;
209  virtual Sawyer::CommandLine::ParserResult parseCommandLine(const std::vector<std::string> &args,
210  const std::string &purpose, const std::string &description);
231  SgAsmInterpretation* parseContainers(const std::string &fileName) /*final*/;
253  virtual Partitioner partition(const std::vector<std::string> &fileNames = std::vector<std::string>());
254  Partitioner partition(const std::string &fileName) /*final*/;
271  SgAsmBlock* buildAst(const std::vector<std::string> &fileNames = std::vector<std::string>()) /*final*/;
272  SgAsmBlock* buildAst(const std::string &fileName) /*final*/;
275  // Command-line parsing
277  //
278  // top-level: parseCommandLine
280 public:
284  virtual Sawyer::CommandLine::SwitchGroup disassemblerSwitches();
285  static Sawyer::CommandLine::SwitchGroup disassemblerSwitches(DisassemblerSettings&);
291  virtual Sawyer::CommandLine::SwitchGroup partitionerSwitches();
292  static Sawyer::CommandLine::SwitchGroup partitionerSwitches(PartitionerSettings&);
298  virtual Sawyer::CommandLine::SwitchGroup engineSwitches();
299  static Sawyer::CommandLine::SwitchGroup engineSwitches(EngineSettings&);
305  virtual Sawyer::CommandLine::SwitchGroup astConstructionSwitches();
306  static Sawyer::CommandLine::SwitchGroup astConstructionSwitches(AstConstructionSettings&);
310  static std::string specimenNameDocumentation();
311 
323  virtual Sawyer::CommandLine::Parser commandLineParser(const std::string &purpose, const std::string &description);
324 
331  virtual void checkSettings();
332 
334  // Disassembler
336 public:
355  virtual Disassembler::BasePtr obtainDisassembler(const Disassembler::BasePtr &hint = Disassembler::BasePtr());
359  // Partitioner high-level functions
361  //
362  // top-level: partition
364 public:
368  virtual Partitioner createPartitioner();
369 
375  virtual void runPartitioner(Partitioner&);
376 
377 
379  // Partitioner mid-level functions
380  //
381  // These are the functions called by the partitioner high-level stuff. These are sometimes overridden in subclasses,
382  // although it is more likely that the high-level stuff is overridden.
384 public:
389  virtual void labelAddresses(Partitioner&, const Configuration&);
390 
397  virtual void discoverBasicBlocks(Partitioner&);
398 
400  // Partitioner low-level functions
401  //
402  // These are functions that a subclass seldom overrides, and maybe even shouldn't override because of their complexity or
403  // the way the interact with one another.
405 public:
406 
408  // Build AST
410 public:
411  // Used internally by ROSE's ::frontend disassemble instructions to build the AST that goes under each SgAsmInterpretation.
412  static void disassembleForRoseFrontend(SgAsmInterpretation*);
413 
414 
416  // Settings and properties
418 public:
425  const Settings& settings() const /*final*/ { return settings_; }
426  Settings& settings() /*final*/ { return settings_; }
437  bool exitOnError() const /*final*/ { return settings_.engine.exitOnError; }
438  virtual void exitOnError(bool b) { settings_.engine.exitOnError = b; }
446  Progress::Ptr progress() const /*final*/ { return progress_; }
447  virtual void progress(const Progress::Ptr &progress) { progress_ = progress; }
455  bool doDisassemble() const /*final*/ { return settings_.disassembler.doDisassemble; }
456  virtual void doDisassemble(bool b) { settings_.disassembler.doDisassemble = b; }
465  Disassembler::BasePtr disassembler() const /*final*/;
466  virtual void disassembler(const Disassembler::BasePtr&);
475  const std::string& isaName() const /*final*/ { return settings_.disassembler.isaName; }
476  virtual void isaName(const std::string &s) { settings_.disassembler.isaName = s; }
485  const std::vector<rose_addr_t>& functionStartingVas() const /*final*/ { return settings_.partitioner.functionStartingVas; }
486  std::vector<rose_addr_t>& functionStartingVas() /*final*/ { return settings_.partitioner.functionStartingVas; }
495  bool usingSemantics() const /*final*/ { return settings_.partitioner.base.usingSemantics; }
496  virtual void usingSemantics(bool b) { settings_.partitioner.base.usingSemantics = b; }
507  bool ignoringUnknownInsns() const /*final*/ { return settings_.partitioner.base.ignoringUnknownInsns; }
508  virtual void ignoringUnknownInsns(bool b) { settings_.partitioner.base.ignoringUnknownInsns = b; }
528  size_t maxBasicBlockSize() const /*final*/ { return settings_.partitioner.maxBasicBlockSize; }
529  virtual void maxBasicBlockSize(size_t n) { settings_.partitioner.maxBasicBlockSize = n; }
540  const std::vector<rose_addr_t>& ipRewrites() const /*final*/ { return settings_.partitioner.ipRewrites; }
541  virtual void ipRewrites(const std::vector<rose_addr_t> &v) { settings_.partitioner.ipRewrites = v; }
552  bool findingDeadCode() const /*final*/ { return settings_.partitioner.findingDeadCode; }
553  virtual void findingDeadCode(bool b) { settings_.partitioner.findingDeadCode = b; }
562  rose_addr_t peScramblerDispatcherVa() const /*final*/ { return settings_.partitioner.peScramblerDispatcherVa; }
563  virtual void peScramblerDispatcherVa(rose_addr_t va) { settings_.partitioner.peScramblerDispatcherVa = va; }
573  size_t findingIntraFunctionCode() const /*final*/ { return settings_.partitioner.findingIntraFunctionCode; }
574  virtual void findingIntraFunctionCode(size_t n) { settings_.partitioner.findingIntraFunctionCode = n; }
583  bool findingIntraFunctionData() const /*final*/ { return settings_.partitioner.findingIntraFunctionData; }
584  virtual void findingIntraFunctionData(bool b) { settings_.partitioner.findingIntraFunctionData = b; }
593  const AddressInterval& interruptVector() const /*final*/ { return settings_.partitioner.interruptVector; }
594  virtual void interruptVector(const AddressInterval &i) { settings_.partitioner.interruptVector = i; }
603  bool doingPostAnalysis() const /*final*/ { return settings_.partitioner.doingPostAnalysis; }
604  virtual void doingPostAnalysis(bool b) { settings_.partitioner.doingPostAnalysis = b; }
612  bool doingPostFunctionMayReturn() const /*final*/ { return settings_.partitioner.doingPostFunctionMayReturn; }
613  virtual void doingPostFunctionMayReturn(bool b) { settings_.partitioner.doingPostFunctionMayReturn = b; }
621  bool doingPostFunctionStackDelta() const /*final*/ { return settings_.partitioner.doingPostFunctionStackDelta; }
630  bool doingPostCallingConvention() const /*final*/ { return settings_.partitioner.doingPostCallingConvention; }
631  virtual void doingPostCallingConvention(bool b) { settings_.partitioner.doingPostCallingConvention = b; }
640  bool doingPostFunctionNoop() const /*final*/ { return settings_.partitioner.doingPostFunctionNoop; }
641  virtual void doingPostFunctionNoop(bool b) { settings_.partitioner.doingPostFunctionNoop = b; }
666  size_t functionReturnAnalysisMaxSorts() const /*final*/ { return settings_.partitioner.functionReturnAnalysisMaxSorts; }
676  bool findingInterFunctionCalls() const /*final*/ { return settings_.partitioner.findingInterFunctionCalls; }
677  virtual void findingInterFunctionCalls(bool b) { settings_.partitioner.findingInterFunctionCalls = b; }
686  bool findingFunctionCallFunctions() const /*final*/ { return settings_.partitioner.findingFunctionCallFunctions; }
695  bool findingEntryFunctions() const /*final*/ { return settings_.partitioner.findingEntryFunctions; }
696  virtual void findingEntryFunctions(bool b) { settings_.partitioner.findingEntryFunctions = b; }
705  bool findingErrorFunctions() const /*final*/ { return settings_.partitioner.findingErrorFunctions; }
706  virtual void findingErrorFunctions(bool b) { settings_.partitioner.findingErrorFunctions = b; }
715  bool findingImportFunctions() const /*final*/ { return settings_.partitioner.findingImportFunctions; }
716  virtual void findingImportFunctions(bool b) { settings_.partitioner.findingImportFunctions = b; }
725  bool findingExportFunctions() const /*final*/ { return settings_.partitioner.findingExportFunctions; }
726  virtual void findingExportFunctions(bool b) { settings_.partitioner.findingExportFunctions = b; }
735  bool findingSymbolFunctions() const /*final*/ { return settings_.partitioner.findingSymbolFunctions; }
736  virtual void findingSymbolFunctions(bool b) { settings_.partitioner.findingSymbolFunctions = b; }
745  bool findingDataFunctionPointers() const /*final*/ { return settings_.partitioner.findingDataFunctionPointers; }
755  bool findingCodeFunctionPointers() const /*final*/ { return settings_.partitioner.findingCodeFunctionPointers; }
764  bool checkingCallBranch() const /*final*/ { return settings_.partitioner.base.checkingCallBranch; }
765  virtual void checkingCallBranch(bool b) { settings_.partitioner.base.checkingCallBranch = b; }
779  bool basicBlockSemanticsAutoDrop() const /*final*/ { return settings_.partitioner.base.basicBlockSemanticsAutoDrop; }
788  const std::vector<std::string>& configurationNames() /*final*/ const { return settings_.engine.configurationNames; }
789  std::vector<std::string>& configurationNames() /*final*/ { return settings_.engine.configurationNames; }
797  bool namingConstants() const /*final*/ { return settings_.partitioner.namingConstants; }
798  virtual void namingConstants(bool b) { settings_.partitioner.namingConstants = b; }
808  const AddressInterval& namingStrings() const /*final*/ { return settings_.partitioner.namingStrings; }
809  void namingStrings(const AddressInterval &where) { settings_.partitioner.namingStrings = where; }
818  bool namingSystemCalls() const /*final*/ { return settings_.partitioner.namingSyscalls; }
819  virtual void namingSystemCalls(bool b) { settings_.partitioner.namingSyscalls = b; }
829  const boost::filesystem::path& systemCallHeader() const /*final*/ { return settings_.partitioner.syscallHeader; }
830  virtual void systemCallHeader(const boost::filesystem::path &filename) { settings_.partitioner.syscallHeader = filename; }
839  bool demangleNames() const /*final*/ { return settings_.partitioner.demangleNames; }
840  virtual void demangleNames(bool b) { settings_.partitioner.demangleNames = b; }
849  bool astAllowEmptyGlobalBlock() const /*final*/ { return settings_.astConstruction.allowEmptyGlobalBlock; }
850  virtual void astAllowEmptyGlobalBlock(bool b) { settings_.astConstruction.allowEmptyGlobalBlock = b; }
859  bool astAllowFunctionWithNoBasicBlocks() const /*final*/ {
861  }
862  virtual void astAllowFunctionWithNoBasicBlocks(bool b) {
864  }
873  bool astAllowEmptyBasicBlock() const /*final*/ { return settings_.astConstruction.allowEmptyBasicBlocks; }
874  virtual void astAllowEmptyBasicBlock(bool b) { settings_.astConstruction.allowEmptyBasicBlocks = b; }
886  bool astCopyAllInstructions() const /*final*/ { return settings_.astConstruction.copyAllInstructions; }
887  virtual void astCopyAllInstructions(bool b) { settings_.astConstruction.copyAllInstructions = b; }
890  // Python API support functions
893 #ifdef ROSE_ENABLE_PYTHON_API
894 
895  // Similar to frontend, but returns a partitioner rather than an AST since the Python API doesn't yet support ASTs.
896  Partitioner pythonParseVector(boost::python::list &pyArgs, const std::string &purpose, const std::string &description);
897  Partitioner pythonParseSingle(const std::string &specimen, const std::string &purpose, const std::string &description);
898 
899 #endif
900 
902  // Internal stuff
904 private:
905  void init();
906 
907  // Similar to ::frontend but a lot less complicated.
908  SgProject* roseFrontendReplacement(const std::vector<boost::filesystem::path> &fileNames);
909 };
910 
912 // JVM Module
914 
916 namespace ModulesJvm {
917 
922 bool isJavaClassFile(const boost::filesystem::path&);
923 
924 } // namespace
925 
926 } // namespace
927 } // namespace
928 } // namespace
929 
930 #endif
931 #endif
bool findingInterFunctionCalls
Look for function calls between functions.
virtual void namingSystemCalls(bool b)
Property: Give names to system calls.
Definition: EngineJvm.h:819
bool doDisassemble() const
Property: Perform disassembly.
Definition: EngineJvm.h:455
virtual void findingImportFunctions(bool b)
Property: Whether to make functions at import addresses.
Definition: EngineJvm.h:716
virtual void semanticMemoryParadigm(SemanticMemoryParadigm p)
Property: Type of container for semantic memory.
Definition: EngineJvm.h:518
DisassemblerSettings disassembler
Settings for creating the disassembler.
Definition: EngineJvm.h:97
bool findingDataFunctionPointers
Look for function pointers in static data.
virtual void astAllowFunctionWithNoBasicBlocks(bool b)
Property: Whether to allow empty functions in the AST.
Definition: EngineJvm.h:862
Instruction basic block.
virtual void findingIntraFunctionData(bool b)
Property: Whether to find intra-function data.
Definition: EngineJvm.h:584
std::string isaName
Name of the instruction set architecture.
bool doingPostFunctionStackDelta
Run function-stack-delta analysis if doingPostAnalysis is set?
virtual void astAllowEmptyBasicBlock(bool b)
Property: Whether to allow empty basic blocks in the AST.
Definition: EngineJvm.h:874
virtual void astAllowEmptyGlobalBlock(bool b)
Property: Whether to allow empty global block in the AST.
Definition: EngineJvm.h:850
bool astAllowEmptyBasicBlock() const
Property: Whether to allow empty basic blocks in the AST.
Definition: EngineJvm.h:873
rose_addr_t peScramblerDispatcherVa
Run the PeDescrambler module if non-zero.
virtual void checkingCallBranch(bool b)
Property: Whether to look for function calls used as branches.
Definition: EngineJvm.h:765
bool findingIntraFunctionData() const
Property: Whether to find intra-function data.
Definition: EngineJvm.h:583
bool findingExportFunctions() const
Property: Whether to make functions at export addresses.
Definition: EngineJvm.h:725
AddressInterval namingStrings
Addresses that might be string literals for commenting integers.
bool copyAllInstructions
Whether to allow shared instructions in the AST.
AddressInterval namingConstants
Give possible names to constants if they're in this range.
virtual void ignoringUnknownInsns(bool b)
Property: Whether unknown instructions are ignored.
Definition: EngineJvm.h:508
const boost::filesystem::path & systemCallHeader() const
Property: Header file in which system calls are defined.
Definition: EngineJvm.h:829
The result from parsing a command line.
bool findingSymbolFunctions() const
Property: Whether to make functions according to symbol tables.
Definition: EngineJvm.h:735
virtual void functionReturnAnalysis(FunctionReturnAnalysis x)
Property: Whether to run the function may-return analysis.
Definition: EngineJvm.h:651
bool astCopyAllInstructions() const
Property: Whether to copy instructions when building the AST.
Definition: EngineJvm.h:886
virtual void peScramblerDispatcherVa(rose_addr_t va)
Property: PE-Scrambler dispatcher address.
Definition: EngineJvm.h:563
bool doingPostFunctionNoop() const
Property: Whether to run no-op function analysis.
Definition: EngineJvm.h:640
STL namespace.
A collection of related switch declarations.
bool doingPostFunctionNoop
Find and name functions that are effectively no-ops.
bool basicBlockSemanticsAutoDrop() const
Property: Automatically drop semantics for attached basic blocks.
Definition: EngineJvm.h:779
bool namingSyscalls
Give names (comments) to system calls if possible.
Main namespace for the ROSE library.
bool doingPostCallingConvention
Run calling-convention analysis if doingPostAnalysis is set?
virtual void astCopyAllInstructions(bool b)
Property: Whether to copy instructions when building the AST.
Definition: EngineJvm.h:887
bool ignoringUnknownInsns() const
Property: Whether unknown instructions are ignored.
Definition: EngineJvm.h:507
std::vector< rose_addr_t > functionStartingVas
Addresses at which to start recursive disassembly.
bool namingSystemCalls() const
Property: Give names to system calls.
Definition: EngineJvm.h:818
bool demangleNames() const
Property: Demangle names.
Definition: EngineJvm.h:839
const std::vector< rose_addr_t > & functionStartingVas() const
Property: Starting addresses for disassembly.
Definition: EngineJvm.h:485
SemanticMemoryParadigm semanticMemoryParadigm() const
Property: Type of container for semantic memory.
Definition: EngineJvm.h:517
virtual void ipRewrites(const std::vector< rose_addr_t > &v)
Property: CFG edge rewrite pairs.
Definition: EngineJvm.h:541
virtual void findingErrorFunctions(bool b)
Property: Whether to make error handling functions.
Definition: EngineJvm.h:706
virtual void isaName(const std::string &s)
Property: Instruction set architecture name.
Definition: EngineJvm.h:476
virtual void progress(const Progress::Ptr &progress)
Property: progress reporting.
Definition: EngineJvm.h:447
rose_addr_t peScramblerDispatcherVa() const
Property: PE-Scrambler dispatcher address.
Definition: EngineJvm.h:562
bool doingPostFunctionStackDelta() const
Property: Whether to run the function stack delta analysis.
Definition: EngineJvm.h:621
size_t functionReturnAnalysisMaxSorts
Number of times functions are sorted before using unsorted lists.
size_t findingIntraFunctionCode() const
Property: Whether to find intra-function code.
Definition: EngineJvm.h:573
FunctionReturnAnalysis functionReturnAnalysis
How to run the function may-return analysis.
std::vector< std::string > configurationNames
List of configuration files and/or directories.
virtual void findingExportFunctions(bool b)
Property: Whether to make functions at export addresses.
Definition: EngineJvm.h:726
virtual void findingDeadCode(bool b)
Property: Whether to find dead code.
Definition: EngineJvm.h:553
const std::vector< rose_addr_t > & ipRewrites() const
Property: CFG edge rewrite pairs.
Definition: EngineJvm.h:540
std::vector< rose_addr_t > ipRewrites
Pairs of addresses for rewriting CFG edges.
bool findingEntryFunctions() const
Property: Whether to make functions at program entry points.
Definition: EngineJvm.h:695
virtual void findingCodeFunctionPointers(bool b)
Property: Whether to search existing instructions for function pointers.
Definition: EngineJvm.h:756
const AddressInterval & namingStrings() const
Property: Addresses where strings might start.
Definition: EngineJvm.h:808
bool doingPostFunctionMayReturn
Run function-may-return analysis if doingPostAnalysis is set?
The parser for a program command line.
bool ignoringUnknownInsns
Whether to ignore unkonwn insns when extending basic blocks.
virtual void interruptVector(const AddressInterval &i)
Property: Location of machine interrupt vector.
Definition: EngineJvm.h:594
bool findingErrorFunctions
Create functions from error handling and exception information.
bool doingPostCallingConvention() const
Property: Whether to run calling-convention analysis.
Definition: EngineJvm.h:630
Progress::Ptr progress() const
Property: progress reporting.
Definition: EngineJvm.h:446
void basicBlockSemanticsAutoDrop(bool b)
Property: Automatically drop semantics for attached basic blocks.
Definition: EngineJvm.h:780
bool findingCodeFunctionPointers() const
Property: Whether to search existing instructions for function pointers.
Definition: EngineJvm.h:755
const AddressInterval & interruptVector() const
Property: Location of machine interrupt vector.
Definition: EngineJvm.h:593
bool namingConstants() const
Property: Give names to constants.
Definition: EngineJvm.h:797
size_t findingIntraFunctionCode
Suck up unused addresses as intra-function code (number of passes).
virtual void findingEntryFunctions(bool b)
Property: Whether to make functions at program entry points.
Definition: EngineJvm.h:696
virtual void doingPostCallingConvention(bool b)
Property: Whether to run calling-convention analysis.
Definition: EngineJvm.h:631
virtual void findingIntraFunctionCode(size_t n)
Property: Whether to find intra-function code.
Definition: EngineJvm.h:574
bool findingDataFunctionPointers() const
Property: Whether to search static data for function pointers.
Definition: EngineJvm.h:745
PartitionerSettings partitioner
Settings for creating a partitioner.
Definition: EngineJvm.h:98
virtual void doingPostFunctionMayReturn(bool b)
Property: Whether to run the function may-return analysis.
Definition: EngineJvm.h:613
bool checkingCallBranch() const
Property: Whether to look for function calls used as branches.
Definition: EngineJvm.h:764
virtual void usingSemantics(bool b)
Property: Whether to use instruction semantics.
Definition: EngineJvm.h:496
FunctionReturnAnalysis
Controls whether the function may-return analysis runs.
bool findingEntryFunctions
Create functions at the program entry point(s).
virtual void findingFunctionCallFunctions(bool b)
Property: Whether to turn function call targets into functions.
Definition: EngineJvm.h:687
const std::vector< std::string > & configurationNames() const
Property: Configuration files.
Definition: EngineJvm.h:788
virtual void systemCallHeader(const boost::filesystem::path &filename)
Property: Header file in which system calls are defined.
Definition: EngineJvm.h:830
virtual void namingConstants(bool b)
Property: Give names to constants.
Definition: EngineJvm.h:798
SemanticMemoryParadigm semanticMemoryParadigm
Container used for semantic memory states.
size_t maxBasicBlockSize() const
Property: Maximum size for basic blocks.
Definition: EngineJvm.h:528
EngineSettings engine
Settings that control engine behavior.
Definition: EngineJvm.h:99
virtual void doDisassemble(bool b)
Property: Perform disassembly.
Definition: EngineJvm.h:456
const Settings & settings() const
Property: All settings.
Definition: EngineJvm.h:425
virtual void doingPostAnalysis(bool b)
Property: Whether to perform post-partitioning analysis steps.
Definition: EngineJvm.h:604
virtual void demangleNames(bool b)
Property: Demangle names.
Definition: EngineJvm.h:840
bool doingPostFunctionMayReturn() const
Property: Whether to run the function may-return analysis.
Definition: EngineJvm.h:612
virtual void findingSymbolFunctions(bool b)
Property: Whether to make functions according to symbol tables.
Definition: EngineJvm.h:736
bool checkingCallBranch
Check for situations where CALL is used as a branch.
bool findingSymbolFunctions
Create functions according to symbol tables.
bool exitOnError
If true, emit error message and exit non-zero, else throw.
bool basicBlockSemanticsAutoDrop
Conserve memory by dropping semantics for attached basic blocks.
std::vector< std::string > & configurationNames()
Property: Configuration files.
Definition: EngineJvm.h:789
virtual void findingDataFunctionPointers(bool b)
Property: Whether to search static data for function pointers.
Definition: EngineJvm.h:746
bool findingFunctionCallFunctions() const
Property: Whether to turn function call targets into functions.
Definition: EngineJvm.h:686
bool astAllowFunctionWithNoBasicBlocks() const
Property: Whether to allow empty functions in the AST.
Definition: EngineJvm.h:859
This class represents a source project, with a list of SgFile objects and global information about th...
bool findingCodeFunctionPointers
Look for function pointers in instructions.
virtual void exitOnError(bool b)
Property: Error handling.
Definition: EngineJvm.h:438
virtual void functionReturnAnalysisMaxSorts(size_t n)
Property: Maximum number of function may-return sorting operations.
Definition: EngineJvm.h:667
virtual void doingPostFunctionNoop(bool b)
Property: Whether to run no-op function analysis.
Definition: EngineJvm.h:641
virtual void findingInterFunctionCalls(bool b)
Property: Whether to search for function calls between exiting functions.
Definition: EngineJvm.h:677
bool findingIntraFunctionData
Suck up unused addresses as intra-function data.
virtual void maxBasicBlockSize(size_t n)
Property: Maximum size for basic blocks.
Definition: EngineJvm.h:529
Partitions instructions into basic blocks and functions.
Definition: Partitioner.h:294
Base class for all ROSE exceptions.
Definition: Rose/Exception.h:9
bool allowFunctionWithNoBasicBlocks
Whether to allow functions with no basic blocks.
bool isJavaClassFile(const boost::filesystem::path &)
True if named file is a Java class file.
AddressInterval interruptVector
Table of interrupt handling functions.
std::vector< rose_addr_t > & functionStartingVas()
Property: Starting addresses for disassembly.
Definition: EngineJvm.h:486
FunctionReturnAnalysis functionReturnAnalysis() const
Property: Whether to run the function may-return analysis.
Definition: EngineJvm.h:650
bool findingDeadCode() const
Property: Whether to find dead code.
Definition: EngineJvm.h:552
virtual void doingPostFunctionStackDelta(bool b)
Property: Whether to run the function stack delta analysis.
Definition: EngineJvm.h:622
Represents an interpretation of a binary container.
Class for the JVM engine driving the partitioner.
Definition: EngineJvm.h:91
AstConstructionSettings astConstruction
Settings for constructing the AST.
Definition: EngineJvm.h:100
bool usingSemantics() const
Property: Whether to use instruction semantics.
Definition: EngineJvm.h:495
bool doingPostAnalysis() const
Property: Whether to perform post-partitioning analysis steps.
Definition: EngineJvm.h:603
Settings & settings()
Property: All settings.
Definition: EngineJvm.h:426
size_t functionReturnAnalysisMaxSorts() const
Property: Maximum number of function may-return sorting operations.
Definition: EngineJvm.h:666
boost::filesystem::path syscallHeader
Name of header file containing system call numbers.
bool astAllowEmptyGlobalBlock() const
Property: Whether to allow empty global block in the AST.
Definition: EngineJvm.h:849
bool findingInterFunctionCalls() const
Property: Whether to search for function calls between exiting functions.
Definition: EngineJvm.h:676
void namingStrings(const AddressInterval &where)
Property: Addresses where strings might start.
Definition: EngineJvm.h:809
bool findingErrorFunctions() const
Property: Whether to make error handling functions.
Definition: EngineJvm.h:705
bool exitOnError() const
Property: Error handling.
Definition: EngineJvm.h:437
bool findingImportFunctions() const
Property: Whether to make functions at import addresses.
Definition: EngineJvm.h:715