ROSE  0.11.2.0
Engine.h
1 #ifndef ROSE_Partitioner2_Engine_H
2 #define ROSE_Partitioner2_Engine_H
3 
4 #include <rosePublicConfig.h>
5 #ifdef ROSE_BUILD_BINARY_ANALYSIS_SUPPORT
6 
7 #include <BinaryLoader.h>
8 #include <BinarySerialIo.h>
9 #include <boost/noncopyable.hpp>
10 #include <boost/regex.hpp>
11 #include <Disassembler.h>
12 #include <FileSystem.h>
13 #include <Partitioner2/Function.h>
14 #include <Partitioner2/ModulesLinux.h>
15 #include <Partitioner2/Partitioner.h>
16 #include <Partitioner2/Thunk.h>
17 #include <Partitioner2/Utility.h>
18 #include <Progress.h>
19 #include <RoseException.h>
20 #include <Sawyer/DistinctList.h>
21 #include <stdexcept>
22 
23 #ifdef ROSE_ENABLE_PYTHON_API
24 #undef slots // stupid Qt pollution
25 #include <boost/python.hpp>
26 #endif
27 
28 namespace Rose {
29 namespace BinaryAnalysis {
30 namespace Partitioner2 {
31 
115 class ROSE_DLL_API Engine: private boost::noncopyable {
116 public:
120  struct Settings {
127  private:
128  friend class boost::serialization::access;
129 
130  template<class S>
131  void serialize(S &s, unsigned version) {
132  s & loader & disassembler & partitioner & engine & astConstruction;
133  }
134  };
135 
137  class Exception: public Rose::Exception {
138  public:
139  Exception(const std::string &mesg)
140  : Rose::Exception(mesg) {}
141  ~Exception() throw () {}
142  };
143 
145  // Internal data structures
147 private:
148  // Engine callback for handling instructions added to basic blocks. This is called when a basic block is discovered,
149  // before it's attached to a partitioner, so it shouldn't really be modifying any state in the engine, but rather only
150  // preparing the basic block to be processed.
151  class BasicBlockFinalizer: public BasicBlockCallback {
152  typedef Sawyer::Container::Map<rose_addr_t /*target*/, std::vector<rose_addr_t> /*sources*/> WorkList;
153  public:
154  static Ptr instance() { return Ptr(new BasicBlockFinalizer); }
155  virtual bool operator()(bool chain, const Args &args) ROSE_OVERRIDE;
156  private:
157  void fixFunctionReturnEdge(const Args&);
158  void fixFunctionCallEdges(const Args&);
159  void addPossibleIndeterminateEdge(const Args&);
160  };
161 
162  // Basic blocks that need to be worked on next. These lists are adjusted whenever a new basic block (or placeholder) is
163  // inserted or erased from the CFG.
164  class BasicBlockWorkList: public CfgAdjustmentCallback {
165  // The following lists are used for adding outgoing E_CALL_RETURN edges to basic blocks based on whether the basic
166  // block is a call to a function that might return. When a new basic block is inserted into the CFG (or a previous
167  // block is removed, modified, and re-inserted), the operator() is called and conditionally inserts the block into the
168  // "pendingCallReturn" list (if the block is a function call that lacks an E_CALL_RETURN edge and the function is known
169  // to return or the analysis was incomplete).
170  //
171  // When we run out of other ways to create basic blocks, we process the pendingCallReturn list from back to front. If
172  // the back block (which gets popped) has a positive may-return result then an E_CALL_RETURN edge is added to the CFG
173  // and the normal recursive BB discovery is resumed. Otherwise if the analysis is incomplete the basic block is moved
174  // to the processedCallReturn list. The entire pendingCallReturn list is processed before proceeding.
175  //
176  // If there is no more pendingCallReturn work to be done, then the processedCallReturn blocks are moved to the
177  // finalCallReturn list and finalCallReturn is sorted by approximate CFG height (i.e., leafs first). The contents
178  // of the finalCallReturn list is then analyzed and the result (or the default may-return value for failed analyses)
179  // is used to decide whether a new CFG edge should be created, possibly adding new basic block addresses to the
180  // list of undiscovered blocks.
181  //
182  Sawyer::Container::DistinctList<rose_addr_t> pendingCallReturn_; // blocks that might need an E_CALL_RETURN edge
183  Sawyer::Container::DistinctList<rose_addr_t> processedCallReturn_; // call sites whose may-return was indeterminate
184  Sawyer::Container::DistinctList<rose_addr_t> finalCallReturn_; // indeterminate call sites awaiting final analysis
185 
186  Sawyer::Container::DistinctList<rose_addr_t> undiscovered_; // undiscovered basic block list (last-in-first-out)
187  Engine *engine_; // engine to which this callback belongs
188  size_t maxSorts_; // max sorts before using unsorted lists
189  protected:
190  BasicBlockWorkList(Engine *engine, size_t maxSorts): engine_(engine), maxSorts_(maxSorts) {}
191  public:
193  static Ptr instance(Engine *engine, size_t maxSorts) { return Ptr(new BasicBlockWorkList(engine, maxSorts)); }
194  virtual bool operator()(bool chain, const AttachedBasicBlock &args) ROSE_OVERRIDE;
195  virtual bool operator()(bool chain, const DetachedBasicBlock &args) ROSE_OVERRIDE;
196  Sawyer::Container::DistinctList<rose_addr_t>& pendingCallReturn() { return pendingCallReturn_; }
197  Sawyer::Container::DistinctList<rose_addr_t>& processedCallReturn() { return processedCallReturn_; }
198  Sawyer::Container::DistinctList<rose_addr_t>& finalCallReturn() { return finalCallReturn_; }
199  Sawyer::Container::DistinctList<rose_addr_t>& undiscovered() { return undiscovered_; }
200  void moveAndSortCallReturn(const Partitioner&);
201  };
202 
203  // A work list providing constants from instructions that are part of the CFG.
204  class CodeConstants: public CfgAdjustmentCallback {
205  public:
207 
208  private:
209  std::set<rose_addr_t> toBeExamined_; // instructions waiting to be examined
210  std::set<rose_addr_t> wasExamined_; // instructions we've already examined
211  rose_addr_t inProgress_; // instruction that is currently in progress
212  std::vector<rose_addr_t> constants_; // constants for the instruction in progress
213 
214  protected:
215  CodeConstants(): inProgress_(0) {}
216 
217  public:
218  static Ptr instance() { return Ptr(new CodeConstants); }
219 
220  // Possibly insert more instructions into the work list when a basic block is added to the CFG
221  virtual bool operator()(bool chain, const AttachedBasicBlock &attached) ROSE_OVERRIDE;
222 
223  // Possibly remove instructions from the worklist when a basic block is removed from the CFG
224  virtual bool operator()(bool chain, const DetachedBasicBlock &detached) ROSE_OVERRIDE;
225 
226  // Return the next available constant if any.
227  Sawyer::Optional<rose_addr_t> nextConstant(const Partitioner &partitioner);
228 
229  // Address of instruction being examined.
230  rose_addr_t inProgress() const { return inProgress_; }
231  };
232 
234  // Data members
236 private:
237  Settings settings_; // Settings for the partitioner.
238  SgAsmInterpretation *interp_; // interpretation set by loadSpecimen
239  BinaryLoader::Ptr binaryLoader_; // how to remap, link, and fixup
240  Disassembler *disassembler_; // not ref-counted yet, but don't destroy it since user owns it
241  MemoryMap::Ptr map_; // memory map initialized by load()
242  BasicBlockWorkList::Ptr basicBlockWorkList_; // what blocks to work on next
243  CodeConstants::Ptr codeFunctionPointers_; // generates constants that are found in instruction ASTs
244  Progress::Ptr progress_; // optional progress reporting
245  ModulesLinux::LibcStartMain::Ptr libcStartMain_; // looking for "main" by analyzing libc_start_main?
246  ThunkPredicates::Ptr functionMatcherThunks_; // predicates to find thunks when looking for functions
247  ThunkPredicates::Ptr functionSplittingThunks_; // predicates for splitting thunks from front of functions
248 
250  // Constructors
252 public:
255  : interp_(NULL), disassembler_(NULL),
256  basicBlockWorkList_(BasicBlockWorkList::instance(this, settings_.partitioner.functionReturnAnalysisMaxSorts)),
257  progress_(Progress::instance()) {
258  init();
259  }
260 
262  explicit Engine(const Settings &settings)
263  : settings_(settings), interp_(NULL), disassembler_(NULL),
264  basicBlockWorkList_(BasicBlockWorkList::instance(this, settings_.partitioner.functionReturnAnalysisMaxSorts)),
265  progress_(Progress::instance()) {
266  init();
267  }
268 
269  virtual ~Engine() {}
270 
272  // The very top-level use case
274 public:
299  SgAsmBlock* frontend(int argc, char *argv[],
300  const std::string &purpose, const std::string &description);
301  virtual SgAsmBlock* frontend(const std::vector<std::string> &args,
302  const std::string &purpose, const std::string &description);
305  // Basic top-level steps
308 public:
314  void reset();
315 
342  Sawyer::CommandLine::ParserResult parseCommandLine(int argc, char *argv[],
343  const std::string &purpose, const std::string &description) /*final*/;
344  virtual Sawyer::CommandLine::ParserResult parseCommandLine(const std::vector<std::string> &args,
345  const std::string &purpose, const std::string &description);
367  virtual SgAsmInterpretation* parseContainers(const std::vector<std::string> &fileNames);
368  SgAsmInterpretation* parseContainers(const std::string &fileName) /*final*/;
391  virtual MemoryMap::Ptr loadSpecimens(const std::vector<std::string> &fileNames = std::vector<std::string>());
392  MemoryMap::Ptr loadSpecimens(const std::string &fileName) /*final*/;
414  virtual Partitioner partition(const std::vector<std::string> &fileNames = std::vector<std::string>());
415  Partitioner partition(const std::string &fileName) /*final*/;
432  SgAsmBlock* buildAst(const std::vector<std::string> &fileNames = std::vector<std::string>()) /*final*/;
433  SgAsmBlock* buildAst(const std::string &fileName) /*final*/;
441  virtual void savePartitioner(const Partitioner&, const boost::filesystem::path&, SerialIo::Format fmt = SerialIo::BINARY);
442 
447  virtual Partitioner loadPartitioner(const boost::filesystem::path&, SerialIo::Format fmt = SerialIo::BINARY);
448 
450  // Command-line parsing
451  //
452  // top-level: parseCommandLine
454 public:
458  virtual Sawyer::CommandLine::SwitchGroup loaderSwitches();
459  static Sawyer::CommandLine::SwitchGroup loaderSwitches(LoaderSettings&);
465  virtual Sawyer::CommandLine::SwitchGroup disassemblerSwitches();
466  static Sawyer::CommandLine::SwitchGroup disassemblerSwitches(DisassemblerSettings&);
472  virtual Sawyer::CommandLine::SwitchGroup partitionerSwitches();
473  static Sawyer::CommandLine::SwitchGroup partitionerSwitches(PartitionerSettings&);
479  virtual Sawyer::CommandLine::SwitchGroup engineSwitches();
480  static Sawyer::CommandLine::SwitchGroup engineSwitches(EngineSettings&);
486  virtual Sawyer::CommandLine::SwitchGroup astConstructionSwitches();
487  static Sawyer::CommandLine::SwitchGroup astConstructionSwitches(AstConstructionSettings&);
491  static std::string specimenNameDocumentation();
492 
504  virtual Sawyer::CommandLine::Parser commandLineParser(const std::string &purpose, const std::string &description);
505 
512  virtual void checkSettings();
513 
515  // Container parsing
516  //
517  // top-level: parseContainers
519 public:
524  virtual bool isRbaFile(const std::string&);
525 
530  virtual bool isNonContainer(const std::string&);
531 
537  virtual bool areContainersParsed() const;
538 
543  virtual void loadVxCore(const std::string &spec);
544 
546  // Load specimens
547  //
548  // top-level: loadSpecimens
550 public:
554  virtual bool areSpecimensLoaded() const;
555 
571  virtual BinaryLoader::Ptr obtainLoader(const BinaryLoader::Ptr &hint = BinaryLoader::Ptr());
572 
578  virtual void loadContainers(const std::vector<std::string> &fileNames);
579 
584  virtual void loadNonContainers(const std::vector<std::string> &names);
585 
589  virtual void adjustMemoryMap();
590 
599  MemoryMap::Ptr memoryMap() const /*final*/ { return map_; }
600  virtual void memoryMap(const MemoryMap::Ptr &m) { map_ = m; }
604  // Disassembler
607 public:
624  virtual Disassembler* obtainDisassembler(Disassembler *hint=NULL);
628  // Partitioner high-level functions
630  //
631  // top-level: partition
633 public:
635  virtual void checkCreatePartitionerPrerequisites() const;
636 
643  virtual Partitioner createBarePartitioner();
644 
650  virtual Partitioner createGenericPartitioner();
651 
656  virtual Partitioner createTunedPartitioner();
657 
662  virtual Partitioner createPartitionerFromAst(SgAsmInterpretation*);
663 
668  virtual Partitioner createPartitioner();
669 
673  virtual void runPartitionerInit(Partitioner&);
674 
678  virtual void runPartitionerRecursive(Partitioner&);
679 
684  virtual void runPartitionerFinal(Partitioner&);
685 
691  virtual void runPartitioner(Partitioner&);
692 
693 
695  // Partitioner mid-level functions
696  //
697  // These are the functions called by the partitioner high-level stuff. These are sometimes overridden in subclasses,
698  // although it is more likely that the high-level stuff is overridden.
700 public:
705  virtual void labelAddresses(Partitioner&, const Configuration&);
706 
710  virtual std::vector<DataBlock::Ptr> makeConfiguredDataBlocks(Partitioner&, const Configuration&);
711 
715  virtual std::vector<Function::Ptr> makeConfiguredFunctions(Partitioner&, const Configuration&);
716 
723  virtual std::vector<Function::Ptr> makeEntryFunctions(Partitioner&, SgAsmInterpretation*);
724 
731  virtual std::vector<Function::Ptr> makeErrorHandlingFunctions(Partitioner&, SgAsmInterpretation*);
732 
742  virtual std::vector<Function::Ptr> makeImportFunctions(Partitioner&, SgAsmInterpretation*);
743 
750  virtual std::vector<Function::Ptr> makeExportFunctions(Partitioner&, SgAsmInterpretation*);
751 
758  virtual std::vector<Function::Ptr> makeSymbolFunctions(Partitioner&, SgAsmInterpretation*);
759 
767  virtual std::vector<Function::Ptr> makeContainerFunctions(Partitioner&, SgAsmInterpretation*);
768 
775  virtual std::vector<Function::Ptr> makeInterruptVectorFunctions(Partitioner&, const AddressInterval &vector);
776 
781  virtual std::vector<Function::Ptr> makeUserFunctions(Partitioner&, const std::vector<rose_addr_t>&);
782 
789  virtual void discoverBasicBlocks(Partitioner&);
790 
802  virtual Function::Ptr makeNextDataReferencedFunction(const Partitioner&, rose_addr_t &startVa /*in,out*/);
803 
817  virtual Function::Ptr makeNextCodeReferencedFunction(const Partitioner&);
818 
825  virtual std::vector<Function::Ptr> makeCalledFunctions(Partitioner&);
826 
842  virtual std::vector<Function::Ptr> makeNextPrologueFunction(Partitioner&, rose_addr_t startVa);
843  virtual std::vector<Function::Ptr> makeNextPrologueFunction(Partitioner&, rose_addr_t startVa, rose_addr_t &lastSearchedVa);
864  virtual std::vector<Function::Ptr>
865  makeFunctionFromInterFunctionCalls(Partitioner &partitioner, rose_addr_t &startVa /*in,out*/);
866 
873  virtual void discoverFunctions(Partitioner&);
874 
889  virtual std::set<rose_addr_t> attachDeadCodeToFunction(Partitioner&, const Function::Ptr&, size_t maxIterations=size_t(-1));
890 
898  virtual DataBlock::Ptr attachPaddingToFunction(Partitioner&, const Function::Ptr&);
899 
904  virtual std::vector<DataBlock::Ptr> attachPaddingToFunctions(Partitioner&);
905 
916  virtual size_t attachAllSurroundedCodeToFunctions(Partitioner&);
917 
925  virtual size_t attachSurroundedCodeToFunctions(Partitioner&);
926 
931  virtual void attachBlocksToFunctions(Partitioner&);
932 
939  virtual std::set<rose_addr_t> attachDeadCodeToFunctions(Partitioner&, size_t maxIterations=size_t(-1));
940 
950  virtual std::vector<DataBlock::Ptr> attachSurroundedDataToFunctions(Partitioner&);
951 
957  virtual void updateAnalysisResults(Partitioner&);
958 
959 
961  // Partitioner low-level functions
962  //
963  // These are functions that a subclass seldom overrides, and maybe even shouldn't override because of their complexity or
964  // the way the interact with one another.
966 public:
977  virtual bool makeNextCallReturnEdge(Partitioner&, boost::logic::tribool assumeCallReturns);
978 
984  virtual BasicBlock::Ptr makeNextBasicBlockFromPlaceholder(Partitioner&);
985 
1000  virtual BasicBlock::Ptr makeNextBasicBlock(Partitioner&);
1001 
1002 
1004  // Build AST
1006 public:
1007  // Used internally by ROSE's ::frontend disassemble instructions to build the AST that goes under each SgAsmInterpretation.
1008  static void disassembleForRoseFrontend(SgAsmInterpretation*);
1009 
1010 
1012  // Settings and properties
1014 public:
1021  const Settings& settings() const /*final*/ { return settings_; }
1022  Settings& settings() /*final*/ { return settings_; }
1033  bool exitOnError() const /*final*/ { return settings_.engine.exitOnError; }
1034  virtual void exitOnError(bool b) { settings_.engine.exitOnError = b; }
1042  Progress::Ptr progress() const /*final*/ { return progress_; }
1043  virtual void progress(const Progress::Ptr &progress) { progress_ = progress; }
1053  SgAsmInterpretation* interpretation() const /*final*/ { return interp_; }
1054  virtual void interpretation(SgAsmInterpretation *interp) { interp_ = interp; }
1063  BinaryLoader::Ptr binaryLoader() const /*final*/ { return binaryLoader_; }
1064  virtual void binaryLoader(const BinaryLoader::Ptr &loader) { binaryLoader_ = loader; }
1077  size_t deExecuteZerosThreshold() const /*final*/ { return settings_.loader.deExecuteZerosThreshold; }
1078  virtual void deExecuteZerosThreshold(size_t n) { settings_.loader.deExecuteZerosThreshold = n; }
1079  size_t deExecuteZerosLeaveAtFront() const /*final*/ { return settings_.loader.deExecuteZerosLeaveAtFront; }
1080  virtual void deExecuteZerosLeaveAtFront(size_t n) { settings_.loader.deExecuteZerosLeaveAtFront = n; }
1081  size_t deExecuteZerosLeaveAtBack() const /*final*/ { return settings_.loader.deExecuteZerosLeaveAtBack; }
1082  virtual void deExecuteZerosLeaveAtBack(size_t n) { settings_.loader.deExecuteZerosLeaveAtBack = n; }
1097  MemoryDataAdjustment memoryDataAdjustment() const /*final*/ { return settings_.loader.memoryDataAdjustment; }
1098  virtual void memoryDataAdjustment(MemoryDataAdjustment x) { settings_.loader.memoryDataAdjustment = x; }
1108  bool memoryIsExecutable() const /*final*/ { return settings_.loader.memoryIsExecutable; }
1109  virtual void memoryIsExecutable(bool b) { settings_.loader.memoryIsExecutable = b; }
1121  bool linkObjectFiles() const /*final*/ { return settings_.loader.linkObjectFiles; }
1122  virtual void linkObjectFiles(bool b) { settings_.loader.linkObjectFiles = b; }
1134  bool linkStaticArchives() const /*final*/ { return settings_.loader.linkStaticArchives; }
1135  virtual void linkStaticArchives(bool b) { settings_.loader.linkStaticArchives = b; }
1146  const std::string& linkerCommand() const /*final*/ { return settings_.loader.linker; }
1147  virtual void linkerCommand(const std::string &cmd) { settings_.loader.linker = cmd; }
1155  const std::vector<std::string> environmentEraseNames() const /*final*/ { return settings_.loader.envEraseNames; }
1156  virtual void environmentEraseNames(const std::vector<std::string> &names) { settings_.loader.envEraseNames = names; }
1165  const std::vector<boost::regex> environmentErasePatterns() const /*final*/ { return settings_.loader.envErasePatterns; }
1166  virtual void environmentErasePatterns(const std::vector<boost::regex> &res) { settings_.loader.envErasePatterns = res; }
1176  const std::vector<std::string> environmentInsertions() const /*final*/ { return settings_.loader.envInsert; }
1177  virtual void environmentInsertions(const std::vector<std::string> &vars) { settings_.loader.envInsert = vars; }
1186  Disassembler *disassembler() const /*final*/ { return disassembler_; }
1187  virtual void disassembler(Disassembler *d) { disassembler_ = d; }
1196  const std::string& isaName() const /*final*/ { return settings_.disassembler.isaName; }
1197  virtual void isaName(const std::string &s) { settings_.disassembler.isaName = s; }
1200  // This is a list of addresses where functions will be created in addition to those functions discovered by examining the
1201  // binary container. Use functionStartingVas instead.
1202  // DEPRECATED on 5/27/20
1203  const std::vector<rose_addr_t>& startingVas() const ROSE_DEPRECATED("use functionStartingVas") /*final*/ { return settings_.partitioner.functionStartingVas; }
1204  std::vector<rose_addr_t>& startingVas() ROSE_DEPRECATED("use functionStartingVas") /*final*/ { return settings_.partitioner.functionStartingVas; }
1205 
1212  const std::vector<rose_addr_t>& functionStartingVas() const /*final*/ { return settings_.partitioner.functionStartingVas; }
1213  std::vector<rose_addr_t>& functionStartingVas() /*final*/ { return settings_.partitioner.functionStartingVas; }
1222  bool usingSemantics() const /*final*/ { return settings_.partitioner.base.usingSemantics; }
1223  virtual void usingSemantics(bool b) { settings_.partitioner.base.usingSemantics = b; }
1234  bool ignoringUnknownInsns() const /*final*/ { return settings_.partitioner.base.ignoringUnknownInsns; }
1235  virtual void ignoringUnknownInsns(bool b) { settings_.partitioner.base.ignoringUnknownInsns = b; }
1244  SemanticMemoryParadigm semanticMemoryParadigm() const /*final*/ { return settings_.partitioner.semanticMemoryParadigm; }
1245  virtual void semanticMemoryParadigm(SemanticMemoryParadigm p) { settings_.partitioner.semanticMemoryParadigm = p; }
1274  bool followingGhostEdges() const /*final*/ { return settings_.partitioner.followingGhostEdges; }
1275  virtual void followingGhostEdges(bool b) { settings_.partitioner.followingGhostEdges = b; }
1285  bool discontiguousBlocks() const /*final*/ { return settings_.partitioner.discontiguousBlocks; }
1286  virtual void discontiguousBlocks(bool b) { settings_.partitioner.discontiguousBlocks = b; }
1296  size_t maxBasicBlockSize() const /*final*/ { return settings_.partitioner.maxBasicBlockSize; }
1297  virtual void maxBasicBlockSize(size_t n) { settings_.partitioner.maxBasicBlockSize = n; }
1308  const std::vector<rose_addr_t>& ipRewrites() const /*final*/ { return settings_.partitioner.ipRewrites; }
1309  virtual void ipRewrites(const std::vector<rose_addr_t> &v) { settings_.partitioner.ipRewrites = v; }
1318  bool findingFunctionPadding() const /*final*/ { return settings_.partitioner.findingFunctionPadding; }
1319  virtual void findingFunctionPadding(bool b) { settings_.partitioner.findingFunctionPadding = b; }
1328  bool findingThunks() const /*final*/ { return settings_.partitioner.findingThunks; }
1329  virtual void findingThunks(bool b) { settings_.partitioner.findingThunks = b; }
1340  ThunkPredicates::Ptr functionMatcherThunks() const /*final*/ { return functionMatcherThunks_; }
1341  virtual void functionMatcherThunks(const ThunkPredicates::Ptr &p) { functionMatcherThunks_ = p; }
1350  bool splittingThunks() const /*final*/ { return settings_.partitioner.splittingThunks; }
1351  virtual void splittingThunks(bool b) { settings_.partitioner.splittingThunks = b; }
1362  ThunkPredicates::Ptr functionSplittingThunks() const /*final*/ { return functionSplittingThunks_; }
1363  virtual void functionSplittingThunks(const ThunkPredicates::Ptr &p) { functionSplittingThunks_ = p; }
1374  bool findingDeadCode() const /*final*/ { return settings_.partitioner.findingDeadCode; }
1375  virtual void findingDeadCode(bool b) { settings_.partitioner.findingDeadCode = b; }
1384  rose_addr_t peScramblerDispatcherVa() const /*final*/ { return settings_.partitioner.peScramblerDispatcherVa; }
1385  virtual void peScramblerDispatcherVa(rose_addr_t va) { settings_.partitioner.peScramblerDispatcherVa = va; }
1395  size_t findingIntraFunctionCode() const /*final*/ { return settings_.partitioner.findingIntraFunctionCode; }
1396  virtual void findingIntraFunctionCode(size_t n) { settings_.partitioner.findingIntraFunctionCode = n; }
1405  bool findingIntraFunctionData() const /*final*/ { return settings_.partitioner.findingIntraFunctionData; }
1406  virtual void findingIntraFunctionData(bool b) { settings_.partitioner.findingIntraFunctionData = b; }
1415  const AddressInterval& interruptVector() const /*final*/ { return settings_.partitioner.interruptVector; }
1416  virtual void interruptVector(const AddressInterval &i) { settings_.partitioner.interruptVector = i; }
1425  bool doingPostAnalysis() const /*final*/ { return settings_.partitioner.doingPostAnalysis; }
1426  virtual void doingPostAnalysis(bool b) { settings_.partitioner.doingPostAnalysis = b; }
1434  bool doingPostFunctionMayReturn() const /*final*/ { return settings_.partitioner.doingPostFunctionMayReturn; }
1435  virtual void doingPostFunctionMayReturn(bool b) { settings_.partitioner.doingPostFunctionMayReturn = b; }
1443  bool doingPostFunctionStackDelta() const /*final*/ { return settings_.partitioner.doingPostFunctionStackDelta; }
1444  virtual void doingPostFunctionStackDelta(bool b) { settings_.partitioner.doingPostFunctionStackDelta = b; }
1452  bool doingPostCallingConvention() const /*final*/ { return settings_.partitioner.doingPostCallingConvention; }
1453  virtual void doingPostCallingConvention(bool b) { settings_.partitioner.doingPostCallingConvention = b; }
1462  bool doingPostFunctionNoop() const /*final*/ { return settings_.partitioner.doingPostFunctionNoop; }
1463  virtual void doingPostFunctionNoop(bool b) { settings_.partitioner.doingPostFunctionNoop = b; }
1472  FunctionReturnAnalysis functionReturnAnalysis() const /*final*/ { return settings_.partitioner.functionReturnAnalysis; }
1473  virtual void functionReturnAnalysis(FunctionReturnAnalysis x) { settings_.partitioner.functionReturnAnalysis = x; }
1488  size_t functionReturnAnalysisMaxSorts() const /*final*/ { return settings_.partitioner.functionReturnAnalysisMaxSorts; }
1489  virtual void functionReturnAnalysisMaxSorts(size_t n) { settings_.partitioner.functionReturnAnalysisMaxSorts = n; }
1498  bool findingInterFunctionCalls() const /*final*/ { return settings_.partitioner.findingInterFunctionCalls; }
1499  virtual void findingInterFunctionCalls(bool b) { settings_.partitioner.findingInterFunctionCalls = b; }
1508  bool findingFunctionCallFunctions() const /*final*/ { return settings_.partitioner.findingFunctionCallFunctions; }
1509  virtual void findingFunctionCallFunctions(bool b) { settings_.partitioner.findingFunctionCallFunctions = b; }
1517  bool findingEntryFunctions() const /*final*/ { return settings_.partitioner.findingEntryFunctions; }
1518  virtual void findingEntryFunctions(bool b) { settings_.partitioner.findingEntryFunctions = b; }
1527  bool findingErrorFunctions() const /*final*/ { return settings_.partitioner.findingErrorFunctions; }
1528  virtual void findingErrorFunctions(bool b) { settings_.partitioner.findingErrorFunctions = b; }
1537  bool findingImportFunctions() const /*final*/ { return settings_.partitioner.findingImportFunctions; }
1538  virtual void findingImportFunctions(bool b) { settings_.partitioner.findingImportFunctions = b; }
1547  bool findingExportFunctions() const /*final*/ { return settings_.partitioner.findingExportFunctions; }
1548  virtual void findingExportFunctions(bool b) { settings_.partitioner.findingExportFunctions = b; }
1557  bool findingSymbolFunctions() const /*final*/ { return settings_.partitioner.findingSymbolFunctions; }
1558  virtual void findingSymbolFunctions(bool b) { settings_.partitioner.findingSymbolFunctions = b; }
1567  bool findingDataFunctionPointers() const /*final*/ { return settings_.partitioner.findingDataFunctionPointers; }
1568  virtual void findingDataFunctionPointers(bool b) { settings_.partitioner.findingDataFunctionPointers = b; }
1577  bool findingCodeFunctionPointers() const /*final*/ { return settings_.partitioner.findingCodeFunctionPointers; }
1578  virtual void findingCodeFunctionPointers(bool b) { settings_.partitioner.findingCodeFunctionPointers = b; }
1586  bool checkingCallBranch() const /*final*/ { return settings_.partitioner.base.checkingCallBranch; }
1587  virtual void checkingCallBranch(bool b) { settings_.partitioner.base.checkingCallBranch = b; }
1601  bool basicBlockSemanticsAutoDrop() const /*final*/ { return settings_.partitioner.base.basicBlockSemanticsAutoDrop; }
1602  void basicBlockSemanticsAutoDrop(bool b) { settings_.partitioner.base.basicBlockSemanticsAutoDrop = b; }
1610  const std::vector<std::string>& configurationNames() /*final*/ const { return settings_.engine.configurationNames; }
1611  std::vector<std::string>& configurationNames() /*final*/ { return settings_.engine.configurationNames; }
1619  bool namingConstants() const /*final*/ { return settings_.partitioner.namingConstants; }
1620  virtual void namingConstants(bool b) { settings_.partitioner.namingConstants = b; }
1628  bool namingStrings() const /*final*/ { return settings_.partitioner.namingStrings; }
1629  virtual void namingStrings(bool b) { settings_.partitioner.namingStrings = b; }
1638  bool namingSystemCalls() const /*final*/ { return settings_.partitioner.namingSyscalls; }
1639  virtual void namingSystemCalls(bool b) { settings_.partitioner.namingSyscalls = b; }
1649  const boost::filesystem::path& systemCallHeader() const /*final*/ { return settings_.partitioner.syscallHeader; }
1650  virtual void systemCallHeader(const boost::filesystem::path &filename) { settings_.partitioner.syscallHeader = filename; }
1659  bool demangleNames() const /*final*/ { return settings_.partitioner.demangleNames; }
1660  virtual void demangleNames(bool b) { settings_.partitioner.demangleNames = b; }
1669  bool astAllowEmptyGlobalBlock() const /*final*/ { return settings_.astConstruction.allowEmptyGlobalBlock; }
1670  virtual void astAllowEmptyGlobalBlock(bool b) { settings_.astConstruction.allowEmptyGlobalBlock = b; }
1679  bool astAllowFunctionWithNoBasicBlocks() const /*final*/ {
1680  return settings_.astConstruction.allowFunctionWithNoBasicBlocks;
1681  }
1682  virtual void astAllowFunctionWithNoBasicBlocks(bool b) {
1683  settings_.astConstruction.allowFunctionWithNoBasicBlocks = b;
1684  }
1693  bool astAllowEmptyBasicBlock() const /*final*/ { return settings_.astConstruction.allowEmptyBasicBlocks; }
1694  virtual void astAllowEmptyBasicBlock(bool b) { settings_.astConstruction.allowEmptyBasicBlocks = b; }
1706  bool astCopyAllInstructions() const /*final*/ { return settings_.astConstruction.copyAllInstructions; }
1707  virtual void astCopyAllInstructions(bool b) { settings_.astConstruction.copyAllInstructions = b; }
1710  // Python API support functions
1713 #ifdef ROSE_ENABLE_PYTHON_API
1714 
1715  // Similar to frontend, but returns a partitioner rather than an AST since the Python API doesn't yet support ASTs.
1716  Partitioner pythonParseVector(boost::python::list &pyArgs, const std::string &purpose, const std::string &description);
1717  Partitioner pythonParseSingle(const std::string &specimen, const std::string &purpose, const std::string &description);
1718 
1719 #endif
1720 
1722  // Internal stuff
1724 private:
1725  void init();
1726 
1727  // Similar to ::frontend but a lot less complicated.
1728  SgProject* roseFrontendReplacement(const std::vector<boost::filesystem::path> &fileNames);
1729 };
1730 
1731 } // namespace
1732 } // namespace
1733 } // namespace
1734 
1735 #endif
1736 #endif
size_t maxBasicBlockSize() const
Property: Maximum size for basic blocks.
Definition: Engine.h:1296
const Settings & settings() const
Property: All settings.
Definition: Engine.h:1021
bool doingPostFunctionStackDelta() const
Property: Whether to run the function stack delta analysis.
Definition: Engine.h:1443
virtual void linkObjectFiles(bool b)
Property: Link object files.
Definition: Engine.h:1122
virtual void memoryIsExecutable(bool b)
Property: Global adjustment to executability.
Definition: Engine.h:1109
virtual void systemCallHeader(const boost::filesystem::path &filename)
Property: Header file in which system calls are defined.
Definition: Engine.h:1650
size_t findingIntraFunctionCode() const
Property: Whether to find intra-function code.
Definition: Engine.h:1395
virtual void disassembler(Disassembler *d)
Property: Disassembler.
Definition: Engine.h:1187
bool checkingCallBranch() const
Property: Whether to look for function calls used as branches.
Definition: Engine.h:1586
virtual void maxBasicBlockSize(size_t n)
Property: Maximum size for basic blocks.
Definition: Engine.h:1297
Settings for controling the engine behavior.
Definition: BasicTypes.h:473
virtual void ignoringUnknownInsns(bool b)
Property: Whether unknown instructions are ignored.
Definition: Engine.h:1235
virtual void namingStrings(bool b)
Property: Give names to string literal addresses.
Definition: Engine.h:1629
MemoryDataAdjustment
How the partitioner should globally treat memory.
Definition: BasicTypes.h:183
bool findingInterFunctionCalls() const
Property: Whether to search for function calls between exiting functions.
Definition: Engine.h:1498
Instruction basic block.
const std::vector< rose_addr_t > & functionStartingVas() const
Property: Starting addresses for disassembly.
Definition: Engine.h:1212
virtual void findingExportFunctions(bool b)
Property: Whether to make functions at export addresses.
Definition: Engine.h:1548
Progress::Ptr progress() const
Property: progress reporting.
Definition: Engine.h:1042
Base class for adjusting basic blocks during discovery.
Definition: Modules.h:43
virtual void findingFunctionCallFunctions(bool b)
Property: Whether to turn function call targets into functions.
Definition: Engine.h:1509
virtual void followingGhostEdges(bool b)
Property: Whether to follow ghost edges.
Definition: Engine.h:1275
virtual void interruptVector(const AddressInterval &i)
Property: Location of machine interrupt vector.
Definition: Engine.h:1416
virtual void astCopyAllInstructions(bool b)
Property: Whether to copy instructions when building the AST.
Definition: Engine.h:1707
virtual void findingSymbolFunctions(bool b)
Property: Whether to make functions according to symbol tables.
Definition: Engine.h:1558
Sawyer::SharedPointer< BinaryLoader > Ptr
Referenc counting pointer to BinaryLoader.
Definition: BinaryLoader.h:63
bool namingStrings() const
Property: Give names to string literal addresses.
Definition: Engine.h:1628
bool findingDeadCode() const
Property: Whether to find dead code.
Definition: Engine.h:1374
virtual void findingCodeFunctionPointers(bool b)
Property: Whether to search existing instructions for function pointers.
Definition: Engine.h:1578
size_t functionReturnAnalysisMaxSorts() const
Property: Maximum number of function may-return sorting operations.
Definition: Engine.h:1488
virtual void functionSplittingThunks(const ThunkPredicates::Ptr &p)
Property: Predicate for finding thunks at the start of functions.
Definition: Engine.h:1363
const std::vector< std::string > & configurationNames() const
Property: Configuration files.
Definition: Engine.h:1610
virtual void doingPostFunctionNoop(bool b)
Property: Whether to run no-op function analysis.
Definition: Engine.h:1463
std::vector< rose_addr_t > & functionStartingVas()
Property: Starting addresses for disassembly.
Definition: Engine.h:1213
Settings that control the disassembler.
Definition: BasicTypes.h:276
Base class for engines driving the partitioner.
Definition: Engine.h:115
Engine(const Settings &settings)
Construct engine with settings.
Definition: Engine.h:262
The result from parsing a command line.
bool namingConstants() const
Property: Give names to constants.
Definition: Engine.h:1619
Disassembler * disassembler() const
Property: Disassembler.
Definition: Engine.h:1186
virtual void exitOnError(bool b)
Property: Error handling.
Definition: Engine.h:1034
const std::vector< std::string > environmentInsertions() const
Property: Environment variables to insert.
Definition: Engine.h:1176
virtual void peScramblerDispatcherVa(rose_addr_t va)
Property: PE-Scrambler dispatcher address.
Definition: Engine.h:1385
SemanticMemoryParadigm semanticMemoryParadigm() const
Property: Type of container for semantic memory.
Definition: Engine.h:1244
List of things to work on.
Definition: WorkLists.h:60
FunctionReturnAnalysis functionReturnAnalysis() const
Property: Whether to run the function may-return analysis.
Definition: Engine.h:1472
ThunkPredicates::Ptr functionSplittingThunks() const
Property: Predicate for finding thunks at the start of functions.
Definition: Engine.h:1362
size_t deExecuteZerosLeaveAtBack() const
Property: when to remove execute permission from zero bytes.
Definition: Engine.h:1081
const std::string & isaName() const
Property: Instruction set architecture name.
Definition: Engine.h:1196
virtual void findingIntraFunctionData(bool b)
Property: Whether to find intra-function data.
Definition: Engine.h:1406
Settings & settings()
Property: All settings.
Definition: Engine.h:1022
A collection of related switch declarations.
MemoryDataAdjustment memoryDataAdjustment() const
Property: Global adjustments to memory map data access bits.
Definition: Engine.h:1097
bool linkObjectFiles() const
Property: Link object files.
Definition: Engine.h:1121
virtual void findingDataFunctionPointers(bool b)
Property: Whether to search static data for function pointers.
Definition: Engine.h:1568
virtual void isaName(const std::string &s)
Property: Instruction set architecture name.
Definition: Engine.h:1197
virtual void findingErrorFunctions(bool b)
Property: Whether to make error handling functions.
Definition: Engine.h:1528
virtual void memoryMap(const MemoryMap::Ptr &m)
Property: memory map.
Definition: Engine.h:600
bool findingErrorFunctions() const
Property: Whether to make error handling functions.
Definition: Engine.h:1527
Main namespace for the ROSE library.
Settings for loading specimens.
Definition: BasicTypes.h:198
Settings that control building the AST.
Definition: BasicTypes.h:94
BinaryLoader::Ptr binaryLoader() const
Property: binary loader.
Definition: Engine.h:1063
virtual void findingEntryFunctions(bool b)
Property: Whether to make functions at program entry points.
Definition: Engine.h:1518
bool followingGhostEdges() const
Property: Whether to follow ghost edges.
Definition: Engine.h:1274
bool demangleNames() const
Property: Demangle names.
Definition: Engine.h:1659
bool astAllowEmptyGlobalBlock() const
Property: Whether to allow empty global block in the AST.
Definition: Engine.h:1669
bool findingFunctionPadding() const
Property: Whether to find function padding.
Definition: Engine.h:1318
bool doingPostCallingConvention() const
Property: Whether to run calling-convention analysis.
Definition: Engine.h:1452
bool discontiguousBlocks() const
Property: Whether to allow discontiguous basic blocks.
Definition: Engine.h:1285
virtual void namingConstants(bool b)
Property: Give names to constants.
Definition: Engine.h:1620
bool findingIntraFunctionData() const
Property: Whether to find intra-function data.
Definition: Engine.h:1405
virtual void findingIntraFunctionCode(size_t n)
Property: Whether to find intra-function code.
Definition: Engine.h:1396
ThunkPredicates::Ptr functionMatcherThunks() const
Property: Predicate for finding functions that are thunks.
Definition: Engine.h:1340
virtual void astAllowEmptyGlobalBlock(bool b)
Property: Whether to allow empty global block in the AST.
Definition: Engine.h:1670
bool memoryIsExecutable() const
Property: Global adjustment to executability.
Definition: Engine.h:1108
bool doingPostFunctionMayReturn() const
Property: Whether to run the function may-return analysis.
Definition: Engine.h:1434
virtual void doingPostFunctionStackDelta(bool b)
Property: Whether to run the function stack delta analysis.
Definition: Engine.h:1444
virtual void findingThunks(bool b)
Property: Whether to find thunk patterns.
Definition: Engine.h:1329
virtual void usingSemantics(bool b)
Property: Whether to use instruction semantics.
Definition: Engine.h:1223
virtual void findingFunctionPadding(bool b)
Property: Whether to find function padding.
Definition: Engine.h:1319
size_t deExecuteZerosLeaveAtFront() const
Property: when to remove execute permission from zero bytes.
Definition: Engine.h:1079
bool astAllowFunctionWithNoBasicBlocks() const
Property: Whether to allow empty functions in the AST.
Definition: Engine.h:1679
const std::vector< boost::regex > environmentErasePatterns() const
Property: Environment variable erasure patterns.
Definition: Engine.h:1165
bool namingSystemCalls() const
Property: Give names to system calls.
Definition: Engine.h:1638
virtual void astAllowEmptyBasicBlock(bool b)
Property: Whether to allow empty basic blocks in the AST.
Definition: Engine.h:1694
The parser for a program command line.
virtual void semanticMemoryParadigm(SemanticMemoryParadigm p)
Property: Type of container for semantic memory.
Definition: Engine.h:1245
virtual void interpretation(SgAsmInterpretation *interp)
Property: interpretation.
Definition: Engine.h:1054
const AddressInterval & interruptVector() const
Property: Location of machine interrupt vector.
Definition: Engine.h:1415
Settings that control the engine partitioning.
Definition: BasicTypes.h:338
virtual void deExecuteZerosLeaveAtBack(size_t n)
Property: when to remove execute permission from zero bytes.
Definition: Engine.h:1082
std::vector< std::string > & configurationNames()
Property: Configuration files.
Definition: Engine.h:1611
bool findingSymbolFunctions() const
Property: Whether to make functions according to symbol tables.
Definition: Engine.h:1557
virtual void environmentInsertions(const std::vector< std::string > &vars)
Property: Environment variables to insert.
Definition: Engine.h:1177
bool findingDataFunctionPointers() const
Property: Whether to search static data for function pointers.
Definition: Engine.h:1567
DisassemblerSettings disassembler
Settings for creating the disassembler.
Definition: Engine.h:122
virtual void ipRewrites(const std::vector< rose_addr_t > &v)
Property: CFG edge rewrite pairs.
Definition: Engine.h:1309
SemanticMemoryParadigm
Organization of semantic memory.
Definition: BasicTypes.h:85
virtual void findingImportFunctions(bool b)
Property: Whether to make functions at import addresses.
Definition: Engine.h:1538
virtual void findingDeadCode(bool b)
Property: Whether to find dead code.
Definition: Engine.h:1375
bool findingCodeFunctionPointers() const
Property: Whether to search existing instructions for function pointers.
Definition: Engine.h:1577
virtual void deExecuteZerosThreshold(size_t n)
Property: when to remove execute permission from zero bytes.
Definition: Engine.h:1078
FunctionReturnAnalysis
Controls whether the function may-return analysis runs.
Definition: BasicTypes.h:291
bool findingEntryFunctions() const
Property: Whether to make functions at program entry points.
Definition: Engine.h:1517
SgAsmInterpretation * interpretation() const
Property: interpretation.
Definition: Engine.h:1053
virtual void checkingCallBranch(bool b)
Property: Whether to look for function calls used as branches.
Definition: Engine.h:1587
AstConstructionSettings astConstruction
Settings for constructing the AST.
Definition: Engine.h:125
bool astCopyAllInstructions() const
Property: Whether to copy instructions when building the AST.
Definition: Engine.h:1706
size_t deExecuteZerosThreshold() const
Property: when to remove execute permission from zero bytes.
Definition: Engine.h:1077
virtual void demangleNames(bool b)
Property: Demangle names.
Definition: Engine.h:1660
bool doingPostAnalysis() const
Property: Whether to perform post-partitioning analysis steps.
Definition: Engine.h:1425
bool usingSemantics() const
Property: Whether to use instruction semantics.
Definition: Engine.h:1222
virtual void environmentEraseNames(const std::vector< std::string > &names)
Property: Environment variable erasure names.
Definition: Engine.h:1156
void basicBlockSemanticsAutoDrop(bool b)
Property: Automatically drop semantics for attached basic blocks.
Definition: Engine.h:1602
MemoryMap::Ptr memoryMap() const
Property: memory map.
Definition: Engine.h:599
bool exitOnError() const
Property: Error handling.
Definition: Engine.h:1033
bool doingPostFunctionNoop() const
Property: Whether to run no-op function analysis.
Definition: Engine.h:1462
const boost::filesystem::path & systemCallHeader() const
Property: Header file in which system calls are defined.
Definition: Engine.h:1649
A general, thread-safe way to report progress made on some task.
Definition: Progress.h:165
bool findingExportFunctions() const
Property: Whether to make functions at export addresses.
Definition: Engine.h:1547
virtual void splittingThunks(bool b)
Property: Whether to split thunk instructions into mini functions.
Definition: Engine.h:1351
virtual void astAllowFunctionWithNoBasicBlocks(bool b)
Property: Whether to allow empty functions in the AST.
Definition: Engine.h:1682
bool linkStaticArchives() const
Property: Link library archives.
Definition: Engine.h:1134
bool astAllowEmptyBasicBlock() const
Property: Whether to allow empty basic blocks in the AST.
Definition: Engine.h:1693
virtual void functionMatcherThunks(const ThunkPredicates::Ptr &p)
Property: Predicate for finding functions that are thunks.
Definition: Engine.h:1341
virtual void deExecuteZerosLeaveAtFront(size_t n)
Property: when to remove execute permission from zero bytes.
Definition: Engine.h:1080
rose_addr_t peScramblerDispatcherVa() const
Property: PE-Scrambler dispatcher address.
Definition: Engine.h:1384
virtual void environmentErasePatterns(const std::vector< boost::regex > &res)
Property: Environment variable erasure patterns.
Definition: Engine.h:1166
bool findingImportFunctions() const
Property: Whether to make functions at import addresses.
Definition: Engine.h:1537
virtual void linkerCommand(const std::string &cmd)
Property: Linker command.
Definition: Engine.h:1147
Format
Format of the state file.
virtual void findingInterFunctionCalls(bool b)
Property: Whether to search for function calls between exiting functions.
Definition: Engine.h:1499
This class represents a source project, with a list of SgFile objects and global information about th...
PartitionerSettings partitioner
Settings for creating a partitioner.
Definition: Engine.h:123
bool findingFunctionCallFunctions() const
Property: Whether to turn function call targets into functions.
Definition: Engine.h:1508
LoaderSettings loader
Settings used during specimen loading.
Definition: Engine.h:121
virtual void binaryLoader(const BinaryLoader::Ptr &loader)
Property: binary loader.
Definition: Engine.h:1064
virtual void doingPostCallingConvention(bool b)
Property: Whether to run calling-convention analysis.
Definition: Engine.h:1453
virtual void namingSystemCalls(bool b)
Property: Give names to system calls.
Definition: Engine.h:1639
virtual void discontiguousBlocks(bool b)
Property: Whether to allow discontiguous basic blocks.
Definition: Engine.h:1286
bool findingThunks() const
Property: Whether to find thunk patterns.
Definition: Engine.h:1328
Partitions instructions into basic blocks and functions.
Definition: Partitioner.h:322
Base class for all ROSE exceptions.
Definition: RoseException.h:9
const std::vector< std::string > environmentEraseNames() const
Property: Environment variable erasure names.
Definition: Engine.h:1155
virtual void doingPostFunctionMayReturn(bool b)
Property: Whether to run the function may-return analysis.
Definition: Engine.h:1435
Binary state files are smaller and faster than the other formats, but are not portable across archite...
Virtual base class for instruction disassemblers.
Definition: Disassembler.h:50
Represents an interpretation of a binary container.
virtual void functionReturnAnalysis(FunctionReturnAnalysis x)
Property: Whether to run the function may-return analysis.
Definition: Engine.h:1473
EngineSettings engine
Settings that control engine behavior.
Definition: Engine.h:124
bool basicBlockSemanticsAutoDrop() const
Property: Automatically drop semantics for attached basic blocks.
Definition: Engine.h:1601
virtual void linkStaticArchives(bool b)
Property: Link library archives.
Definition: Engine.h:1135
Container associating values with keys.
Definition: Sawyer/Map.h:66
virtual void functionReturnAnalysisMaxSorts(size_t n)
Property: Maximum number of function may-return sorting operations.
Definition: Engine.h:1489
virtual void doingPostAnalysis(bool b)
Property: Whether to perform post-partitioning analysis steps.
Definition: Engine.h:1426
virtual void progress(const Progress::Ptr &progress)
Property: progress reporting.
Definition: Engine.h:1043
Sawyer::SharedPointer< Progress > Ptr
Progress objects are reference counted.
Definition: Progress.h:168
bool ignoringUnknownInsns() const
Property: Whether unknown instructions are ignored.
Definition: Engine.h:1234
virtual void memoryDataAdjustment(MemoryDataAdjustment x)
Property: Global adjustments to memory map data access bits.
Definition: Engine.h:1098
Holds configuration information.
Definition: Config.h:282
const std::string & linkerCommand() const
Property: Linker command.
Definition: Engine.h:1146
bool splittingThunks() const
Property: Whether to split thunk instructions into mini functions.
Definition: Engine.h:1350
const std::vector< rose_addr_t > & ipRewrites() const
Property: CFG edge rewrite pairs.
Definition: Engine.h:1308