ROSE  0.11.98.0
JvmEngine.h
1 #ifndef ROSE_BinaryAnalysis_Partitioner2_JvmEngine_H
2 #define ROSE_BinaryAnalysis_Partitioner2_JvmEngine_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
5 
6 #include <Rose/BinaryAnalysis/Disassembler/BasicTypes.h>
7 #include <Rose/BinaryAnalysis/Partitioner2/Partitioner.h>
8 #include <Rose/Progress.h>
9 #include <Rose/Exception.h>
10 #include <stdexcept>
11 
12 namespace Rose {
13 namespace BinaryAnalysis {
14 namespace Partitioner2 {
15 
95 class ROSE_DLL_API JvmEngine: private boost::noncopyable {
96 public:
100  struct Settings {
105  };
106 
108  class Exception: public Rose::Exception {
109  public:
110  Exception(const std::string &mesg)
111  : Rose::Exception(mesg) {}
112  ~Exception() throw () {}
113  };
114 
116  // Internal data structures
118 private:
119 
121  // Data members
123 private:
124  Settings settings_; // Settings for the partitioner.
125  Disassembler::BasePtr disassembler_; // not ref-counted yet, but don't destroy it since user owns it
126  Progress::Ptr progress_; // optional progress reporting
127 
129  // Constructors
131 public:
133  JvmEngine();
134 
136  explicit JvmEngine(const Settings &settings);
137 
138  virtual ~JvmEngine();
139 
141  // The very top-level use case
143 public:
168  SgAsmBlock* frontend(int argc, char *argv[],
169  const std::string &purpose, const std::string &description);
170  virtual SgAsmBlock* frontend(const std::vector<std::string> &args,
171  const std::string &purpose, const std::string &description);
174  // Basic top-level steps
177 public:
183  void reset();
184 
211  Sawyer::CommandLine::ParserResult parseCommandLine(int argc, char *argv[],
212  const std::string &purpose, const std::string &description) /*final*/;
213  virtual Sawyer::CommandLine::ParserResult parseCommandLine(const std::vector<std::string> &args,
214  const std::string &purpose, const std::string &description);
235  SgAsmInterpretation* parseContainers(const std::string &fileName) /*final*/;
257  virtual Partitioner partition(const std::vector<std::string> &fileNames = std::vector<std::string>());
258  Partitioner partition(const std::string &fileName) /*final*/;
275  SgAsmBlock* buildAst(const std::vector<std::string> &fileNames = std::vector<std::string>()) /*final*/;
276  SgAsmBlock* buildAst(const std::string &fileName) /*final*/;
279  // Command-line parsing
281  //
282  // top-level: parseCommandLine
284 public:
288  virtual Sawyer::CommandLine::SwitchGroup disassemblerSwitches();
289  static Sawyer::CommandLine::SwitchGroup disassemblerSwitches(DisassemblerSettings&);
295  virtual Sawyer::CommandLine::SwitchGroup partitionerSwitches();
296  static Sawyer::CommandLine::SwitchGroup partitionerSwitches(PartitionerSettings&);
302  virtual Sawyer::CommandLine::SwitchGroup engineSwitches();
303  static Sawyer::CommandLine::SwitchGroup engineSwitches(EngineSettings&);
309  virtual Sawyer::CommandLine::SwitchGroup astConstructionSwitches();
310  static Sawyer::CommandLine::SwitchGroup astConstructionSwitches(AstConstructionSettings&);
314  static std::string specimenNameDocumentation();
315 
327  virtual Sawyer::CommandLine::Parser commandLineParser(const std::string &purpose, const std::string &description);
328 
335  virtual void checkSettings();
336 
338  // Disassembler
340 public:
359  virtual Disassembler::BasePtr obtainDisassembler(const Disassembler::BasePtr &hint = Disassembler::BasePtr());
363  // Partitioner high-level functions
365  //
366  // top-level: partition
368 public:
372  virtual Partitioner createPartitioner();
373 
379  virtual void runPartitioner(Partitioner&);
380 
381 
383  // Partitioner mid-level functions
384  //
385  // These are the functions called by the partitioner high-level stuff. These are sometimes overridden in subclasses,
386  // although it is more likely that the high-level stuff is overridden.
388 public:
393  virtual void labelAddresses(Partitioner&, const Configuration&);
394 
401  virtual void discoverBasicBlocks(Partitioner&);
402 
404  // Partitioner low-level functions
405  //
406  // These are functions that a subclass seldom overrides, and maybe even shouldn't override because of their complexity or
407  // the way the interact with one another.
409 public:
410 
412  // Build AST
414 public:
415  // Used internally by ROSE's ::frontend disassemble instructions to build the AST that goes under each SgAsmInterpretation.
416  static void disassembleForRoseFrontend(SgAsmInterpretation*);
417 
418 
420  // Settings and properties
422 public:
429  const Settings& settings() const /*final*/ { return settings_; }
430  Settings& settings() /*final*/ { return settings_; }
441  bool exitOnError() const /*final*/ { return settings_.engine.exitOnError; }
442  virtual void exitOnError(bool b) { settings_.engine.exitOnError = b; }
450  Progress::Ptr progress() const /*final*/ { return progress_; }
451  virtual void progress(const Progress::Ptr &progress) { progress_ = progress; }
459  bool doDisassemble() const /*final*/ { return settings_.disassembler.doDisassemble; }
460  virtual void doDisassemble(bool b) { settings_.disassembler.doDisassemble = b; }
469  Disassembler::BasePtr disassembler() const /*final*/;
470  virtual void disassembler(const Disassembler::BasePtr&);
479  const std::string& isaName() const /*final*/ { return settings_.disassembler.isaName; }
480  virtual void isaName(const std::string &s) { settings_.disassembler.isaName = s; }
489  const std::vector<rose_addr_t>& functionStartingVas() const /*final*/ { return settings_.partitioner.functionStartingVas; }
490  std::vector<rose_addr_t>& functionStartingVas() /*final*/ { return settings_.partitioner.functionStartingVas; }
499  bool usingSemantics() const /*final*/ { return settings_.partitioner.base.usingSemantics; }
500  virtual void usingSemantics(bool b) { settings_.partitioner.base.usingSemantics = b; }
511  bool ignoringUnknownInsns() const /*final*/ { return settings_.partitioner.base.ignoringUnknownInsns; }
512  virtual void ignoringUnknownInsns(bool b) { settings_.partitioner.base.ignoringUnknownInsns = b; }
532  size_t maxBasicBlockSize() const /*final*/ { return settings_.partitioner.maxBasicBlockSize; }
533  virtual void maxBasicBlockSize(size_t n) { settings_.partitioner.maxBasicBlockSize = n; }
544  const std::vector<rose_addr_t>& ipRewrites() const /*final*/ { return settings_.partitioner.ipRewrites; }
545  virtual void ipRewrites(const std::vector<rose_addr_t> &v) { settings_.partitioner.ipRewrites = v; }
556  bool findingDeadCode() const /*final*/ { return settings_.partitioner.findingDeadCode; }
557  virtual void findingDeadCode(bool b) { settings_.partitioner.findingDeadCode = b; }
566  rose_addr_t peScramblerDispatcherVa() const /*final*/ { return settings_.partitioner.peScramblerDispatcherVa; }
567  virtual void peScramblerDispatcherVa(rose_addr_t va) { settings_.partitioner.peScramblerDispatcherVa = va; }
577  size_t findingIntraFunctionCode() const /*final*/ { return settings_.partitioner.findingIntraFunctionCode; }
578  virtual void findingIntraFunctionCode(size_t n) { settings_.partitioner.findingIntraFunctionCode = n; }
587  bool findingIntraFunctionData() const /*final*/ { return settings_.partitioner.findingIntraFunctionData; }
588  virtual void findingIntraFunctionData(bool b) { settings_.partitioner.findingIntraFunctionData = b; }
597  const AddressInterval& interruptVector() const /*final*/ { return settings_.partitioner.interruptVector; }
598  virtual void interruptVector(const AddressInterval &i) { settings_.partitioner.interruptVector = i; }
607  bool doingPostAnalysis() const /*final*/ { return settings_.partitioner.doingPostAnalysis; }
608  virtual void doingPostAnalysis(bool b) { settings_.partitioner.doingPostAnalysis = b; }
616  bool doingPostFunctionMayReturn() const /*final*/ { return settings_.partitioner.doingPostFunctionMayReturn; }
617  virtual void doingPostFunctionMayReturn(bool b) { settings_.partitioner.doingPostFunctionMayReturn = b; }
625  bool doingPostFunctionStackDelta() const /*final*/ { return settings_.partitioner.doingPostFunctionStackDelta; }
634  bool doingPostCallingConvention() const /*final*/ { return settings_.partitioner.doingPostCallingConvention; }
635  virtual void doingPostCallingConvention(bool b) { settings_.partitioner.doingPostCallingConvention = b; }
644  bool doingPostFunctionNoop() const /*final*/ { return settings_.partitioner.doingPostFunctionNoop; }
645  virtual void doingPostFunctionNoop(bool b) { settings_.partitioner.doingPostFunctionNoop = b; }
670  size_t functionReturnAnalysisMaxSorts() const /*final*/ { return settings_.partitioner.functionReturnAnalysisMaxSorts; }
680  bool findingInterFunctionCalls() const /*final*/ { return settings_.partitioner.findingInterFunctionCalls; }
681  virtual void findingInterFunctionCalls(bool b) { settings_.partitioner.findingInterFunctionCalls = b; }
690  bool findingFunctionCallFunctions() const /*final*/ { return settings_.partitioner.findingFunctionCallFunctions; }
699  bool findingEntryFunctions() const /*final*/ { return settings_.partitioner.findingEntryFunctions; }
700  virtual void findingEntryFunctions(bool b) { settings_.partitioner.findingEntryFunctions = b; }
709  bool findingErrorFunctions() const /*final*/ { return settings_.partitioner.findingErrorFunctions; }
710  virtual void findingErrorFunctions(bool b) { settings_.partitioner.findingErrorFunctions = b; }
719  bool findingImportFunctions() const /*final*/ { return settings_.partitioner.findingImportFunctions; }
720  virtual void findingImportFunctions(bool b) { settings_.partitioner.findingImportFunctions = b; }
729  bool findingExportFunctions() const /*final*/ { return settings_.partitioner.findingExportFunctions; }
730  virtual void findingExportFunctions(bool b) { settings_.partitioner.findingExportFunctions = b; }
739  bool findingSymbolFunctions() const /*final*/ { return settings_.partitioner.findingSymbolFunctions; }
740  virtual void findingSymbolFunctions(bool b) { settings_.partitioner.findingSymbolFunctions = b; }
749  bool findingDataFunctionPointers() const /*final*/ { return settings_.partitioner.findingDataFunctionPointers; }
759  bool findingCodeFunctionPointers() const /*final*/ { return settings_.partitioner.findingCodeFunctionPointers; }
768  bool checkingCallBranch() const /*final*/ { return settings_.partitioner.base.checkingCallBranch; }
769  virtual void checkingCallBranch(bool b) { settings_.partitioner.base.checkingCallBranch = b; }
783  bool basicBlockSemanticsAutoDrop() const /*final*/ { return settings_.partitioner.base.basicBlockSemanticsAutoDrop; }
792  const std::vector<std::string>& configurationNames() /*final*/ const { return settings_.engine.configurationNames; }
793  std::vector<std::string>& configurationNames() /*final*/ { return settings_.engine.configurationNames; }
801  bool namingConstants() const /*final*/ { return settings_.partitioner.namingConstants; }
802  virtual void namingConstants(bool b) { settings_.partitioner.namingConstants = b; }
812  const AddressInterval& namingStrings() const /*final*/ { return settings_.partitioner.namingStrings; }
813  void namingStrings(const AddressInterval &where) { settings_.partitioner.namingStrings = where; }
822  bool namingSystemCalls() const /*final*/ { return settings_.partitioner.namingSyscalls; }
823  virtual void namingSystemCalls(bool b) { settings_.partitioner.namingSyscalls = b; }
833  const boost::filesystem::path& systemCallHeader() const /*final*/ { return settings_.partitioner.syscallHeader; }
834  virtual void systemCallHeader(const boost::filesystem::path &filename) { settings_.partitioner.syscallHeader = filename; }
843  bool demangleNames() const /*final*/ { return settings_.partitioner.demangleNames; }
844  virtual void demangleNames(bool b) { settings_.partitioner.demangleNames = b; }
853  bool astAllowEmptyGlobalBlock() const /*final*/ { return settings_.astConstruction.allowEmptyGlobalBlock; }
854  virtual void astAllowEmptyGlobalBlock(bool b) { settings_.astConstruction.allowEmptyGlobalBlock = b; }
863  bool astAllowFunctionWithNoBasicBlocks() const /*final*/ {
865  }
866  virtual void astAllowFunctionWithNoBasicBlocks(bool b) {
868  }
877  bool astAllowEmptyBasicBlock() const /*final*/ { return settings_.astConstruction.allowEmptyBasicBlocks; }
878  virtual void astAllowEmptyBasicBlock(bool b) { settings_.astConstruction.allowEmptyBasicBlocks = b; }
890  bool astCopyAllInstructions() const /*final*/ { return settings_.astConstruction.copyAllInstructions; }
891  virtual void astCopyAllInstructions(bool b) { settings_.astConstruction.copyAllInstructions = b; }
894  // Python API support functions
897 #ifdef ROSE_ENABLE_PYTHON_API
898 
899  // Similar to frontend, but returns a partitioner rather than an AST since the Python API doesn't yet support ASTs.
900  Partitioner pythonParseVector(boost::python::list &pyArgs, const std::string &purpose, const std::string &description);
901  Partitioner pythonParseSingle(const std::string &specimen, const std::string &purpose, const std::string &description);
902 
903 #endif
904 
906  // Internal stuff
908 private:
909  void init();
910 
911  // Similar to ::frontend but a lot less complicated.
912  SgProject* roseFrontendReplacement(const std::vector<boost::filesystem::path> &fileNames);
913 };
914 
916 // JVM Module
918 
920 namespace ModulesJvm {
921 
926 bool isJavaClassFile(const boost::filesystem::path&);
927 
928 } // namespace
929 
930 } // namespace
931 } // namespace
932 } // namespace
933 
934 #endif
935 #endif
bool findingInterFunctionCalls
Look for function calls between functions.
const AddressInterval & namingStrings() const
Property: Addresses where strings might start.
Definition: JvmEngine.h:812
Settings & settings()
Property: All settings.
Definition: JvmEngine.h:430
bool doingPostFunctionNoop() const
Property: Whether to run no-op function analysis.
Definition: JvmEngine.h:644
const boost::filesystem::path & systemCallHeader() const
Property: Header file in which system calls are defined.
Definition: JvmEngine.h:833
bool usingSemantics() const
Property: Whether to use instruction semantics.
Definition: JvmEngine.h:499
Class for the JVM engine driving the partitioner.
Definition: JvmEngine.h:95
virtual void doingPostCallingConvention(bool b)
Property: Whether to run calling-convention analysis.
Definition: JvmEngine.h:635
void basicBlockSemanticsAutoDrop(bool b)
Property: Automatically drop semantics for attached basic blocks.
Definition: JvmEngine.h:784
const AddressInterval & interruptVector() const
Property: Location of machine interrupt vector.
Definition: JvmEngine.h:597
bool findingCodeFunctionPointers() const
Property: Whether to search existing instructions for function pointers.
Definition: JvmEngine.h:759
size_t maxBasicBlockSize() const
Property: Maximum size for basic blocks.
Definition: JvmEngine.h:532
bool findingDataFunctionPointers
Look for function pointers in static data.
bool findingFunctionCallFunctions() const
Property: Whether to turn function call targets into functions.
Definition: JvmEngine.h:690
Instruction basic block.
virtual void maxBasicBlockSize(size_t n)
Property: Maximum size for basic blocks.
Definition: JvmEngine.h:533
bool findingSymbolFunctions() const
Property: Whether to make functions according to symbol tables.
Definition: JvmEngine.h:739
rose_addr_t peScramblerDispatcherVa() const
Property: PE-Scrambler dispatcher address.
Definition: JvmEngine.h:566
std::string isaName
Name of the instruction set architecture.
bool doingPostFunctionStackDelta
Run function-stack-delta analysis if doingPostAnalysis is set?
bool findingImportFunctions() const
Property: Whether to make functions at import addresses.
Definition: JvmEngine.h:719
virtual void doDisassemble(bool b)
Property: Perform disassembly.
Definition: JvmEngine.h:460
virtual void interruptVector(const AddressInterval &i)
Property: Location of machine interrupt vector.
Definition: JvmEngine.h:598
rose_addr_t peScramblerDispatcherVa
Run the PeDescrambler module if non-zero.
virtual void namingSystemCalls(bool b)
Property: Give names to system calls.
Definition: JvmEngine.h:823
bool doingPostFunctionMayReturn() const
Property: Whether to run the function may-return analysis.
Definition: JvmEngine.h:616
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.
bool findingDeadCode() const
Property: Whether to find dead code.
Definition: JvmEngine.h:556
The result from parsing a command line.
virtual void astCopyAllInstructions(bool b)
Property: Whether to copy instructions when building the AST.
Definition: JvmEngine.h:891
FunctionReturnAnalysis functionReturnAnalysis() const
Property: Whether to run the function may-return analysis.
Definition: JvmEngine.h:654
const std::vector< rose_addr_t > & ipRewrites() const
Property: CFG edge rewrite pairs.
Definition: JvmEngine.h:544
bool findingExportFunctions() const
Property: Whether to make functions at export addresses.
Definition: JvmEngine.h:729
virtual void exitOnError(bool b)
Property: Error handling.
Definition: JvmEngine.h:442
bool findingDataFunctionPointers() const
Property: Whether to search static data for function pointers.
Definition: JvmEngine.h:749
bool doDisassemble() const
Property: Perform disassembly.
Definition: JvmEngine.h:459
STL namespace.
bool demangleNames() const
Property: Demangle names.
Definition: JvmEngine.h:843
virtual void functionReturnAnalysis(FunctionReturnAnalysis x)
Property: Whether to run the function may-return analysis.
Definition: JvmEngine.h:655
A collection of related switch declarations.
bool doingPostFunctionNoop
Find and name functions that are effectively no-ops.
bool checkingCallBranch() const
Property: Whether to look for function calls used as branches.
Definition: JvmEngine.h:768
size_t findingIntraFunctionCode() const
Property: Whether to find intra-function code.
Definition: JvmEngine.h:577
virtual void findingInterFunctionCalls(bool b)
Property: Whether to search for function calls between exiting functions.
Definition: JvmEngine.h:681
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 doingPostFunctionNoop(bool b)
Property: Whether to run no-op function analysis.
Definition: JvmEngine.h:645
std::vector< rose_addr_t > functionStartingVas
Addresses at which to start recursive disassembly.
virtual void astAllowFunctionWithNoBasicBlocks(bool b)
Property: Whether to allow empty functions in the AST.
Definition: JvmEngine.h:866
bool exitOnError() const
Property: Error handling.
Definition: JvmEngine.h:441
std::vector< rose_addr_t > & functionStartingVas()
Property: Starting addresses for disassembly.
Definition: JvmEngine.h:490
bool doingPostCallingConvention() const
Property: Whether to run calling-convention analysis.
Definition: JvmEngine.h:634
virtual void ipRewrites(const std::vector< rose_addr_t > &v)
Property: CFG edge rewrite pairs.
Definition: JvmEngine.h:545
size_t functionReturnAnalysisMaxSorts() const
Property: Maximum number of function may-return sorting operations.
Definition: JvmEngine.h:670
virtual void findingExportFunctions(bool b)
Property: Whether to make functions at export addresses.
Definition: JvmEngine.h:730
AstConstructionSettings astConstruction
Settings for constructing the AST.
Definition: JvmEngine.h:104
virtual void doingPostFunctionMayReturn(bool b)
Property: Whether to run the function may-return analysis.
Definition: JvmEngine.h:617
virtual void usingSemantics(bool b)
Property: Whether to use instruction semantics.
Definition: JvmEngine.h:500
std::vector< std::string > & configurationNames()
Property: Configuration files.
Definition: JvmEngine.h:793
size_t functionReturnAnalysisMaxSorts
Number of times functions are sorted before using unsorted lists.
bool basicBlockSemanticsAutoDrop() const
Property: Automatically drop semantics for attached basic blocks.
Definition: JvmEngine.h:783
FunctionReturnAnalysis functionReturnAnalysis
How to run the function may-return analysis.
Progress::Ptr progress() const
Property: progress reporting.
Definition: JvmEngine.h:450
std::vector< std::string > configurationNames
List of configuration files and/or directories.
std::vector< rose_addr_t > ipRewrites
Pairs of addresses for rewriting CFG edges.
virtual void findingImportFunctions(bool b)
Property: Whether to make functions at import addresses.
Definition: JvmEngine.h:720
virtual void findingSymbolFunctions(bool b)
Property: Whether to make functions according to symbol tables.
Definition: JvmEngine.h:740
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.
const std::vector< std::string > & configurationNames() const
Property: Configuration files.
Definition: JvmEngine.h:792
bool findingErrorFunctions
Create functions from error handling and exception information.
virtual void doingPostFunctionStackDelta(bool b)
Property: Whether to run the function stack delta analysis.
Definition: JvmEngine.h:626
bool astCopyAllInstructions() const
Property: Whether to copy instructions when building the AST.
Definition: JvmEngine.h:890
SemanticMemoryParadigm semanticMemoryParadigm() const
Property: Type of container for semantic memory.
Definition: JvmEngine.h:521
size_t findingIntraFunctionCode
Suck up unused addresses as intra-function code (number of passes).
PartitionerSettings partitioner
Settings for creating a partitioner.
Definition: JvmEngine.h:102
virtual void systemCallHeader(const boost::filesystem::path &filename)
Property: Header file in which system calls are defined.
Definition: JvmEngine.h:834
virtual void doingPostAnalysis(bool b)
Property: Whether to perform post-partitioning analysis steps.
Definition: JvmEngine.h:608
bool astAllowEmptyBasicBlock() const
Property: Whether to allow empty basic blocks in the AST.
Definition: JvmEngine.h:877
virtual void peScramblerDispatcherVa(rose_addr_t va)
Property: PE-Scrambler dispatcher address.
Definition: JvmEngine.h:567
EngineSettings engine
Settings that control engine behavior.
Definition: JvmEngine.h:103
bool astAllowEmptyGlobalBlock() const
Property: Whether to allow empty global block in the AST.
Definition: JvmEngine.h:853
virtual void functionReturnAnalysisMaxSorts(size_t n)
Property: Maximum number of function may-return sorting operations.
Definition: JvmEngine.h:671
const std::vector< rose_addr_t > & functionStartingVas() const
Property: Starting addresses for disassembly.
Definition: JvmEngine.h:489
virtual void namingConstants(bool b)
Property: Give names to constants.
Definition: JvmEngine.h:802
bool findingInterFunctionCalls() const
Property: Whether to search for function calls between exiting functions.
Definition: JvmEngine.h:680
virtual void semanticMemoryParadigm(SemanticMemoryParadigm p)
Property: Type of container for semantic memory.
Definition: JvmEngine.h:522
FunctionReturnAnalysis
Controls whether the function may-return analysis runs.
bool namingSystemCalls() const
Property: Give names to system calls.
Definition: JvmEngine.h:822
virtual void isaName(const std::string &s)
Property: Instruction set architecture name.
Definition: JvmEngine.h:480
bool findingIntraFunctionData() const
Property: Whether to find intra-function data.
Definition: JvmEngine.h:587
bool findingEntryFunctions
Create functions at the program entry point(s).
virtual void findingIntraFunctionData(bool b)
Property: Whether to find intra-function data.
Definition: JvmEngine.h:588
Binary analysis.
SemanticMemoryParadigm semanticMemoryParadigm
Container used for semantic memory states.
virtual void findingCodeFunctionPointers(bool b)
Property: Whether to search existing instructions for function pointers.
Definition: JvmEngine.h:760
virtual void findingFunctionCallFunctions(bool b)
Property: Whether to turn function call targets into functions.
Definition: JvmEngine.h:691
bool doingPostAnalysis() const
Property: Whether to perform post-partitioning analysis steps.
Definition: JvmEngine.h:607
DisassemblerSettings disassembler
Settings for creating the disassembler.
Definition: JvmEngine.h:101
bool checkingCallBranch
Check for situations where CALL is used as a branch.
virtual void ignoringUnknownInsns(bool b)
Property: Whether unknown instructions are ignored.
Definition: JvmEngine.h:512
virtual void progress(const Progress::Ptr &progress)
Property: progress reporting.
Definition: JvmEngine.h:451
virtual void checkingCallBranch(bool b)
Property: Whether to look for function calls used as branches.
Definition: JvmEngine.h:769
bool findingSymbolFunctions
Create functions according to symbol tables.
bool exitOnError
If true, emit error message and exit non-zero, else throw.
bool namingConstants() const
Property: Give names to constants.
Definition: JvmEngine.h:801
bool basicBlockSemanticsAutoDrop
Conserve memory by dropping semantics for attached basic blocks.
virtual void astAllowEmptyGlobalBlock(bool b)
Property: Whether to allow empty global block in the AST.
Definition: JvmEngine.h:854
virtual void findingIntraFunctionCode(size_t n)
Property: Whether to find intra-function code.
Definition: JvmEngine.h:578
virtual void findingDataFunctionPointers(bool b)
Property: Whether to search static data for function pointers.
Definition: JvmEngine.h:750
virtual void findingErrorFunctions(bool b)
Property: Whether to make error handling functions.
Definition: JvmEngine.h:710
void namingStrings(const AddressInterval &where)
Property: Addresses where strings might start.
Definition: JvmEngine.h:813
virtual void demangleNames(bool b)
Property: Demangle names.
Definition: JvmEngine.h:844
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.
bool findingIntraFunctionData
Suck up unused addresses as intra-function data.
virtual void astAllowEmptyBasicBlock(bool b)
Property: Whether to allow empty basic blocks in the AST.
Definition: JvmEngine.h:878
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.
virtual void findingDeadCode(bool b)
Property: Whether to find dead code.
Definition: JvmEngine.h:557
Represents an interpretation of a binary container.
bool findingErrorFunctions() const
Property: Whether to make error handling functions.
Definition: JvmEngine.h:709
bool doingPostFunctionStackDelta() const
Property: Whether to run the function stack delta analysis.
Definition: JvmEngine.h:625
boost::filesystem::path syscallHeader
Name of header file containing system call numbers.
virtual void findingEntryFunctions(bool b)
Property: Whether to make functions at program entry points.
Definition: JvmEngine.h:700
bool findingEntryFunctions() const
Property: Whether to make functions at program entry points.
Definition: JvmEngine.h:699
const Settings & settings() const
Property: All settings.
Definition: JvmEngine.h:429
Holds configuration information.
Definition: Config.h:281
bool astAllowFunctionWithNoBasicBlocks() const
Property: Whether to allow empty functions in the AST.
Definition: JvmEngine.h:863
bool ignoringUnknownInsns() const
Property: Whether unknown instructions are ignored.
Definition: JvmEngine.h:511