ROSE  0.10.7.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 
839  virtual std::vector<Function::Ptr> makeNextPrologueFunction(Partitioner&, rose_addr_t startVa);
840 
859  virtual std::vector<Function::Ptr>
860  makeFunctionFromInterFunctionCalls(Partitioner &partitioner, rose_addr_t &startVa /*in,out*/);
861 
868  virtual void discoverFunctions(Partitioner&);
869 
884  virtual std::set<rose_addr_t> attachDeadCodeToFunction(Partitioner&, const Function::Ptr&, size_t maxIterations=size_t(-1));
885 
893  virtual DataBlock::Ptr attachPaddingToFunction(Partitioner&, const Function::Ptr&);
894 
899  virtual std::vector<DataBlock::Ptr> attachPaddingToFunctions(Partitioner&);
900 
911  virtual size_t attachAllSurroundedCodeToFunctions(Partitioner&);
912 
920  virtual size_t attachSurroundedCodeToFunctions(Partitioner&);
921 
926  virtual void attachBlocksToFunctions(Partitioner&);
927 
934  virtual std::set<rose_addr_t> attachDeadCodeToFunctions(Partitioner&, size_t maxIterations=size_t(-1));
935 
945  virtual std::vector<DataBlock::Ptr> attachSurroundedDataToFunctions(Partitioner&);
946 
952  virtual void updateAnalysisResults(Partitioner&);
953 
954 
956  // Partitioner low-level functions
957  //
958  // These are functions that a subclass seldom overrides, and maybe even shouldn't override because of their complexity or
959  // the way the interact with one another.
961 public:
972  virtual bool makeNextCallReturnEdge(Partitioner&, boost::logic::tribool assumeCallReturns);
973 
979  virtual BasicBlock::Ptr makeNextBasicBlockFromPlaceholder(Partitioner&);
980 
995  virtual BasicBlock::Ptr makeNextBasicBlock(Partitioner&);
996 
997 
999  // Build AST
1001 public:
1002  // Used internally by ROSE's ::frontend disassemble instructions to build the AST that goes under each SgAsmInterpretation.
1003  static void disassembleForRoseFrontend(SgAsmInterpretation*);
1004 
1005 
1007  // Settings and properties
1009 public:
1016  const Settings& settings() const /*final*/ { return settings_; }
1017  Settings& settings() /*final*/ { return settings_; }
1028  bool exitOnError() const /*final*/ { return settings_.engine.exitOnError; }
1029  virtual void exitOnError(bool b) { settings_.engine.exitOnError = b; }
1037  Progress::Ptr progress() const /*final*/ { return progress_; }
1038  virtual void progress(const Progress::Ptr &progress) { progress_ = progress; }
1048  SgAsmInterpretation* interpretation() const /*final*/ { return interp_; }
1049  virtual void interpretation(SgAsmInterpretation *interp) { interp_ = interp; }
1058  BinaryLoader::Ptr binaryLoader() const /*final*/ { return binaryLoader_; }
1059  virtual void binaryLoader(const BinaryLoader::Ptr &loader) { binaryLoader_ = loader; }
1072  size_t deExecuteZerosThreshold() const /*final*/ { return settings_.loader.deExecuteZerosThreshold; }
1073  virtual void deExecuteZerosThreshold(size_t n) { settings_.loader.deExecuteZerosThreshold = n; }
1074  size_t deExecuteZerosLeaveAtFront() const /*final*/ { return settings_.loader.deExecuteZerosLeaveAtFront; }
1075  virtual void deExecuteZerosLeaveAtFront(size_t n) { settings_.loader.deExecuteZerosLeaveAtFront = n; }
1076  size_t deExecuteZerosLeaveAtBack() const /*final*/ { return settings_.loader.deExecuteZerosLeaveAtBack; }
1077  virtual void deExecuteZerosLeaveAtBack(size_t n) { settings_.loader.deExecuteZerosLeaveAtBack = n; }
1092  MemoryDataAdjustment memoryDataAdjustment() const /*final*/ { return settings_.loader.memoryDataAdjustment; }
1093  virtual void memoryDataAdjustment(MemoryDataAdjustment x) { settings_.loader.memoryDataAdjustment = x; }
1103  bool memoryIsExecutable() const /*final*/ { return settings_.loader.memoryIsExecutable; }
1104  virtual void memoryIsExecutable(bool b) { settings_.loader.memoryIsExecutable = b; }
1116  bool linkObjectFiles() const /*final*/ { return settings_.loader.linkObjectFiles; }
1117  virtual void linkObjectFiles(bool b) { settings_.loader.linkObjectFiles = b; }
1129  bool linkStaticArchives() const /*final*/ { return settings_.loader.linkStaticArchives; }
1130  virtual void linkStaticArchives(bool b) { settings_.loader.linkStaticArchives = b; }
1141  const std::string& linkerCommand() const /*final*/ { return settings_.loader.linker; }
1142  virtual void linkerCommand(const std::string &cmd) { settings_.loader.linker = cmd; }
1150  const std::vector<std::string> environmentEraseNames() const /*final*/ { return settings_.loader.envEraseNames; }
1151  virtual void environmentEraseNames(const std::vector<std::string> &names) { settings_.loader.envEraseNames = names; }
1160  const std::vector<boost::regex> environmentErasePatterns() const /*final*/ { return settings_.loader.envErasePatterns; }
1161  virtual void environmentErasePatterns(const std::vector<boost::regex> &res) { settings_.loader.envErasePatterns = res; }
1171  const std::vector<std::string> environmentInsertions() const /*final*/ { return settings_.loader.envInsert; }
1172  virtual void environmentInsertions(const std::vector<std::string> &vars) { settings_.loader.envInsert = vars; }
1181  Disassembler *disassembler() const /*final*/ { return disassembler_; }
1182  virtual void disassembler(Disassembler *d) { disassembler_ = d; }
1191  const std::string& isaName() const /*final*/ { return settings_.disassembler.isaName; }
1192  virtual void isaName(const std::string &s) { settings_.disassembler.isaName = s; }
1195  // This is a list of addresses where functions will be created in addition to those functions discovered by examining the
1196  // binary container. Use functionStartingVas instead.
1197  // DEPRECATED on 5/27/20
1198  const std::vector<rose_addr_t>& startingVas() const ROSE_DEPRECATED("use functionStartingVas") /*final*/ { return settings_.partitioner.functionStartingVas; }
1199  std::vector<rose_addr_t>& startingVas() ROSE_DEPRECATED("use functionStartingVas") /*final*/ { return settings_.partitioner.functionStartingVas; }
1200 
1207  const std::vector<rose_addr_t>& functionStartingVas() const /*final*/ { return settings_.partitioner.functionStartingVas; }
1208  std::vector<rose_addr_t>& functionStartingVas() /*final*/ { return settings_.partitioner.functionStartingVas; }
1217  bool usingSemantics() const /*final*/ { return settings_.partitioner.base.usingSemantics; }
1218  virtual void usingSemantics(bool b) { settings_.partitioner.base.usingSemantics = b; }
1229  bool ignoringUnknownInsns() const /*final*/ { return settings_.partitioner.base.ignoringUnknownInsns; }
1230  virtual void ignoringUnknownInsns(bool b) { settings_.partitioner.base.ignoringUnknownInsns = b; }
1239  SemanticMemoryParadigm semanticMemoryParadigm() const /*final*/ { return settings_.partitioner.semanticMemoryParadigm; }
1240  virtual void semanticMemoryParadigm(SemanticMemoryParadigm p) { settings_.partitioner.semanticMemoryParadigm = p; }
1269  bool followingGhostEdges() const /*final*/ { return settings_.partitioner.followingGhostEdges; }
1270  virtual void followingGhostEdges(bool b) { settings_.partitioner.followingGhostEdges = b; }
1280  bool discontiguousBlocks() const /*final*/ { return settings_.partitioner.discontiguousBlocks; }
1281  virtual void discontiguousBlocks(bool b) { settings_.partitioner.discontiguousBlocks = b; }
1291  size_t maxBasicBlockSize() const /*final*/ { return settings_.partitioner.maxBasicBlockSize; }
1292  virtual void maxBasicBlockSize(size_t n) { settings_.partitioner.maxBasicBlockSize = n; }
1303  const std::vector<rose_addr_t>& ipRewrites() const /*final*/ { return settings_.partitioner.ipRewrites; }
1304  virtual void ipRewrites(const std::vector<rose_addr_t> &v) { settings_.partitioner.ipRewrites = v; }
1313  bool findingFunctionPadding() const /*final*/ { return settings_.partitioner.findingFunctionPadding; }
1314  virtual void findingFunctionPadding(bool b) { settings_.partitioner.findingFunctionPadding = b; }
1323  bool findingThunks() const /*final*/ { return settings_.partitioner.findingThunks; }
1324  virtual void findingThunks(bool b) { settings_.partitioner.findingThunks = b; }
1335  ThunkPredicates::Ptr functionMatcherThunks() const /*final*/ { return functionMatcherThunks_; }
1336  virtual void functionMatcherThunks(const ThunkPredicates::Ptr &p) { functionMatcherThunks_ = p; }
1345  bool splittingThunks() const /*final*/ { return settings_.partitioner.splittingThunks; }
1346  virtual void splittingThunks(bool b) { settings_.partitioner.splittingThunks = b; }
1357  ThunkPredicates::Ptr functionSplittingThunks() const /*final*/ { return functionSplittingThunks_; }
1358  virtual void functionSplittingThunks(const ThunkPredicates::Ptr &p) { functionSplittingThunks_ = p; }
1369  bool findingDeadCode() const /*final*/ { return settings_.partitioner.findingDeadCode; }
1370  virtual void findingDeadCode(bool b) { settings_.partitioner.findingDeadCode = b; }
1379  rose_addr_t peScramblerDispatcherVa() const /*final*/ { return settings_.partitioner.peScramblerDispatcherVa; }
1380  virtual void peScramblerDispatcherVa(rose_addr_t va) { settings_.partitioner.peScramblerDispatcherVa = va; }
1390  size_t findingIntraFunctionCode() const /*final*/ { return settings_.partitioner.findingIntraFunctionCode; }
1391  virtual void findingIntraFunctionCode(size_t n) { settings_.partitioner.findingIntraFunctionCode = n; }
1400  bool findingIntraFunctionData() const /*final*/ { return settings_.partitioner.findingIntraFunctionData; }
1401  virtual void findingIntraFunctionData(bool b) { settings_.partitioner.findingIntraFunctionData = b; }
1410  const AddressInterval& interruptVector() const /*final*/ { return settings_.partitioner.interruptVector; }
1411  virtual void interruptVector(const AddressInterval &i) { settings_.partitioner.interruptVector = i; }
1420  bool doingPostAnalysis() const /*final*/ { return settings_.partitioner.doingPostAnalysis; }
1421  virtual void doingPostAnalysis(bool b) { settings_.partitioner.doingPostAnalysis = b; }
1429  bool doingPostFunctionMayReturn() const /*final*/ { return settings_.partitioner.doingPostFunctionMayReturn; }
1430  virtual void doingPostFunctionMayReturn(bool b) { settings_.partitioner.doingPostFunctionMayReturn = b; }
1438  bool doingPostFunctionStackDelta() const /*final*/ { return settings_.partitioner.doingPostFunctionStackDelta; }
1439  virtual void doingPostFunctionStackDelta(bool b) { settings_.partitioner.doingPostFunctionStackDelta = b; }
1447  bool doingPostCallingConvention() const /*final*/ { return settings_.partitioner.doingPostCallingConvention; }
1448  virtual void doingPostCallingConvention(bool b) { settings_.partitioner.doingPostCallingConvention = b; }
1457  bool doingPostFunctionNoop() const /*final*/ { return settings_.partitioner.doingPostFunctionNoop; }
1458  virtual void doingPostFunctionNoop(bool b) { settings_.partitioner.doingPostFunctionNoop = b; }
1467  FunctionReturnAnalysis functionReturnAnalysis() const /*final*/ { return settings_.partitioner.functionReturnAnalysis; }
1468  virtual void functionReturnAnalysis(FunctionReturnAnalysis x) { settings_.partitioner.functionReturnAnalysis = x; }
1483  size_t functionReturnAnalysisMaxSorts() const /*final*/ { return settings_.partitioner.functionReturnAnalysisMaxSorts; }
1484  virtual void functionReturnAnalysisMaxSorts(size_t n) { settings_.partitioner.functionReturnAnalysisMaxSorts = n; }
1493  bool findingInterFunctionCalls() const /*final*/ { return settings_.partitioner.findingInterFunctionCalls; }
1494  virtual void findingInterFunctionCalls(bool b) { settings_.partitioner.findingInterFunctionCalls = b; }
1503  bool findingFunctionCallFunctions() const /*final*/ { return settings_.partitioner.findingFunctionCallFunctions; }
1504  virtual void findingFunctionCallFunctions(bool b) { settings_.partitioner.findingFunctionCallFunctions = b; }
1512  bool findingEntryFunctions() const /*final*/ { return settings_.partitioner.findingEntryFunctions; }
1513  virtual void findingEntryFunctions(bool b) { settings_.partitioner.findingEntryFunctions = b; }
1522  bool findingErrorFunctions() const /*final*/ { return settings_.partitioner.findingErrorFunctions; }
1523  virtual void findingErrorFunctions(bool b) { settings_.partitioner.findingErrorFunctions = b; }
1532  bool findingImportFunctions() const /*final*/ { return settings_.partitioner.findingImportFunctions; }
1533  virtual void findingImportFunctions(bool b) { settings_.partitioner.findingImportFunctions = b; }
1542  bool findingExportFunctions() const /*final*/ { return settings_.partitioner.findingExportFunctions; }
1543  virtual void findingExportFunctions(bool b) { settings_.partitioner.findingExportFunctions = b; }
1552  bool findingSymbolFunctions() const /*final*/ { return settings_.partitioner.findingSymbolFunctions; }
1553  virtual void findingSymbolFunctions(bool b) { settings_.partitioner.findingSymbolFunctions = b; }
1562  bool findingDataFunctionPointers() const /*final*/ { return settings_.partitioner.findingDataFunctionPointers; }
1563  virtual void findingDataFunctionPointers(bool b) { settings_.partitioner.findingDataFunctionPointers = b; }
1572  bool findingCodeFunctionPointers() const /*final*/ { return settings_.partitioner.findingCodeFunctionPointers; }
1573  virtual void findingCodeFunctionPointers(bool b) { settings_.partitioner.findingCodeFunctionPointers = b; }
1581  bool checkingCallBranch() const /*final*/ { return settings_.partitioner.base.checkingCallBranch; }
1582  virtual void checkingCallBranch(bool b) { settings_.partitioner.base.checkingCallBranch = b; }
1596  bool basicBlockSemanticsAutoDrop() const /*final*/ { return settings_.partitioner.base.basicBlockSemanticsAutoDrop; }
1597  void basicBlockSemanticsAutoDrop(bool b) { settings_.partitioner.base.basicBlockSemanticsAutoDrop = b; }
1605  const std::vector<std::string>& configurationNames() /*final*/ const { return settings_.engine.configurationNames; }
1606  std::vector<std::string>& configurationNames() /*final*/ { return settings_.engine.configurationNames; }
1614  bool namingConstants() const /*final*/ { return settings_.partitioner.namingConstants; }
1615  virtual void namingConstants(bool b) { settings_.partitioner.namingConstants = b; }
1623  bool namingStrings() const /*final*/ { return settings_.partitioner.namingStrings; }
1624  virtual void namingStrings(bool b) { settings_.partitioner.namingStrings = b; }
1633  bool namingSystemCalls() const /*final*/ { return settings_.partitioner.namingSyscalls; }
1634  virtual void namingSystemCalls(bool b) { settings_.partitioner.namingSyscalls = b; }
1644  const boost::filesystem::path& systemCallHeader() const /*final*/ { return settings_.partitioner.syscallHeader; }
1645  virtual void systemCallHeader(const boost::filesystem::path &filename) { settings_.partitioner.syscallHeader = filename; }
1654  bool demangleNames() const /*final*/ { return settings_.partitioner.demangleNames; }
1655  virtual void demangleNames(bool b) { settings_.partitioner.demangleNames = b; }
1664  bool astAllowEmptyGlobalBlock() const /*final*/ { return settings_.astConstruction.allowEmptyGlobalBlock; }
1665  virtual void astAllowEmptyGlobalBlock(bool b) { settings_.astConstruction.allowEmptyGlobalBlock = b; }
1674  bool astAllowFunctionWithNoBasicBlocks() const /*final*/ {
1675  return settings_.astConstruction.allowFunctionWithNoBasicBlocks;
1676  }
1677  virtual void astAllowFunctionWithNoBasicBlocks(bool b) {
1678  settings_.astConstruction.allowFunctionWithNoBasicBlocks = b;
1679  }
1688  bool astAllowEmptyBasicBlock() const /*final*/ { return settings_.astConstruction.allowEmptyBasicBlocks; }
1689  virtual void astAllowEmptyBasicBlock(bool b) { settings_.astConstruction.allowEmptyBasicBlocks = b; }
1701  bool astCopyAllInstructions() const /*final*/ { return settings_.astConstruction.copyAllInstructions; }
1702  virtual void astCopyAllInstructions(bool b) { settings_.astConstruction.copyAllInstructions = b; }
1705  // Python API support functions
1708 #ifdef ROSE_ENABLE_PYTHON_API
1709 
1710  // Similar to frontend, but returns a partitioner rather than an AST since the Python API doesn't yet support ASTs.
1711  Partitioner pythonParseVector(boost::python::list &pyArgs, const std::string &purpose, const std::string &description);
1712  Partitioner pythonParseSingle(const std::string &specimen, const std::string &purpose, const std::string &description);
1713 
1714 #endif
1715 
1717  // Internal stuff
1719 private:
1720  void init();
1721 
1722  // Similar to ::frontend but a lot less complicated.
1723  SgProject* roseFrontendReplacement(const std::vector<boost::filesystem::path> &fileNames);
1724 };
1725 
1726 } // namespace
1727 } // namespace
1728 } // namespace
1729 
1730 #endif
1731 #endif
size_t maxBasicBlockSize() const
Property: Maximum size for basic blocks.
Definition: Engine.h:1291
const Settings & settings() const
Property: All settings.
Definition: Engine.h:1016
bool doingPostFunctionStackDelta() const
Property: Whether to run the function stack delta analysis.
Definition: Engine.h:1438
virtual void linkObjectFiles(bool b)
Property: Link object files.
Definition: Engine.h:1117
virtual void memoryIsExecutable(bool b)
Property: Global adjustment to executability.
Definition: Engine.h:1104
virtual void systemCallHeader(const boost::filesystem::path &filename)
Property: Header file in which system calls are defined.
Definition: Engine.h:1645
size_t findingIntraFunctionCode() const
Property: Whether to find intra-function code.
Definition: Engine.h:1390
virtual void disassembler(Disassembler *d)
Property: Disassembler.
Definition: Engine.h:1182
bool checkingCallBranch() const
Property: Whether to look for function calls used as branches.
Definition: Engine.h:1581
virtual void maxBasicBlockSize(size_t n)
Property: Maximum size for basic blocks.
Definition: Engine.h:1292
Settings for controling the engine behavior.
Definition: BasicTypes.h:473
virtual void ignoringUnknownInsns(bool b)
Property: Whether unknown instructions are ignored.
Definition: Engine.h:1230
virtual void namingStrings(bool b)
Property: Give names to string literal addresses.
Definition: Engine.h:1624
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:1493
Instruction basic block.
const std::vector< rose_addr_t > & functionStartingVas() const
Property: Starting addresses for disassembly.
Definition: Engine.h:1207
virtual void findingExportFunctions(bool b)
Property: Whether to make functions at export addresses.
Definition: Engine.h:1543
Progress::Ptr progress() const
Property: progress reporting.
Definition: Engine.h:1037
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:1504
virtual void followingGhostEdges(bool b)
Property: Whether to follow ghost edges.
Definition: Engine.h:1270
virtual void interruptVector(const AddressInterval &i)
Property: Location of machine interrupt vector.
Definition: Engine.h:1411
virtual void astCopyAllInstructions(bool b)
Property: Whether to copy instructions when building the AST.
Definition: Engine.h:1702
virtual void findingSymbolFunctions(bool b)
Property: Whether to make functions according to symbol tables.
Definition: Engine.h:1553
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:1623
bool findingDeadCode() const
Property: Whether to find dead code.
Definition: Engine.h:1369
virtual void findingCodeFunctionPointers(bool b)
Property: Whether to search existing instructions for function pointers.
Definition: Engine.h:1573
size_t functionReturnAnalysisMaxSorts() const
Property: Maximum number of function may-return sorting operations.
Definition: Engine.h:1483
virtual void functionSplittingThunks(const ThunkPredicates::Ptr &p)
Property: Predicate for finding thunks at the start of functions.
Definition: Engine.h:1358
const std::vector< std::string > & configurationNames() const
Property: Configuration files.
Definition: Engine.h:1605
virtual void doingPostFunctionNoop(bool b)
Property: Whether to run no-op function analysis.
Definition: Engine.h:1458
std::vector< rose_addr_t > & functionStartingVas()
Property: Starting addresses for disassembly.
Definition: Engine.h:1208
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:1614
Disassembler * disassembler() const
Property: Disassembler.
Definition: Engine.h:1181
virtual void exitOnError(bool b)
Property: Error handling.
Definition: Engine.h:1029
const std::vector< std::string > environmentInsertions() const
Property: Environment variables to insert.
Definition: Engine.h:1171
virtual void peScramblerDispatcherVa(rose_addr_t va)
Property: PE-Scrambler dispatcher address.
Definition: Engine.h:1380
SemanticMemoryParadigm semanticMemoryParadigm() const
Property: Type of container for semantic memory.
Definition: Engine.h:1239
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:1467
ThunkPredicates::Ptr functionSplittingThunks() const
Property: Predicate for finding thunks at the start of functions.
Definition: Engine.h:1357
size_t deExecuteZerosLeaveAtBack() const
Property: when to remove execute permission from zero bytes.
Definition: Engine.h:1076
const std::string & isaName() const
Property: Instruction set architecture name.
Definition: Engine.h:1191
virtual void findingIntraFunctionData(bool b)
Property: Whether to find intra-function data.
Definition: Engine.h:1401
Settings & settings()
Property: All settings.
Definition: Engine.h:1017
A collection of related switch declarations.
MemoryDataAdjustment memoryDataAdjustment() const
Property: Global adjustments to memory map data access bits.
Definition: Engine.h:1092
bool linkObjectFiles() const
Property: Link object files.
Definition: Engine.h:1116
virtual void findingDataFunctionPointers(bool b)
Property: Whether to search static data for function pointers.
Definition: Engine.h:1563
virtual void isaName(const std::string &s)
Property: Instruction set architecture name.
Definition: Engine.h:1192
virtual void findingErrorFunctions(bool b)
Property: Whether to make error handling functions.
Definition: Engine.h:1523
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:1522
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:1058
virtual void findingEntryFunctions(bool b)
Property: Whether to make functions at program entry points.
Definition: Engine.h:1513
bool followingGhostEdges() const
Property: Whether to follow ghost edges.
Definition: Engine.h:1269
bool demangleNames() const
Property: Demangle names.
Definition: Engine.h:1654
bool astAllowEmptyGlobalBlock() const
Property: Whether to allow empty global block in the AST.
Definition: Engine.h:1664
bool findingFunctionPadding() const
Property: Whether to find function padding.
Definition: Engine.h:1313
bool doingPostCallingConvention() const
Property: Whether to run calling-convention analysis.
Definition: Engine.h:1447
bool discontiguousBlocks() const
Property: Whether to allow discontiguous basic blocks.
Definition: Engine.h:1280
virtual void namingConstants(bool b)
Property: Give names to constants.
Definition: Engine.h:1615
bool findingIntraFunctionData() const
Property: Whether to find intra-function data.
Definition: Engine.h:1400
virtual void findingIntraFunctionCode(size_t n)
Property: Whether to find intra-function code.
Definition: Engine.h:1391
ThunkPredicates::Ptr functionMatcherThunks() const
Property: Predicate for finding functions that are thunks.
Definition: Engine.h:1335
virtual void astAllowEmptyGlobalBlock(bool b)
Property: Whether to allow empty global block in the AST.
Definition: Engine.h:1665
bool memoryIsExecutable() const
Property: Global adjustment to executability.
Definition: Engine.h:1103
bool doingPostFunctionMayReturn() const
Property: Whether to run the function may-return analysis.
Definition: Engine.h:1429
virtual void doingPostFunctionStackDelta(bool b)
Property: Whether to run the function stack delta analysis.
Definition: Engine.h:1439
virtual void findingThunks(bool b)
Property: Whether to find thunk patterns.
Definition: Engine.h:1324
virtual void usingSemantics(bool b)
Property: Whether to use instruction semantics.
Definition: Engine.h:1218
virtual void findingFunctionPadding(bool b)
Property: Whether to find function padding.
Definition: Engine.h:1314
size_t deExecuteZerosLeaveAtFront() const
Property: when to remove execute permission from zero bytes.
Definition: Engine.h:1074
bool astAllowFunctionWithNoBasicBlocks() const
Property: Whether to allow empty functions in the AST.
Definition: Engine.h:1674
const std::vector< boost::regex > environmentErasePatterns() const
Property: Environment variable erasure patterns.
Definition: Engine.h:1160
bool namingSystemCalls() const
Property: Give names to system calls.
Definition: Engine.h:1633
virtual void astAllowEmptyBasicBlock(bool b)
Property: Whether to allow empty basic blocks in the AST.
Definition: Engine.h:1689
The parser for a program command line.
virtual void semanticMemoryParadigm(SemanticMemoryParadigm p)
Property: Type of container for semantic memory.
Definition: Engine.h:1240
virtual void interpretation(SgAsmInterpretation *interp)
Property: interpretation.
Definition: Engine.h:1049
const AddressInterval & interruptVector() const
Property: Location of machine interrupt vector.
Definition: Engine.h:1410
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:1077
std::vector< std::string > & configurationNames()
Property: Configuration files.
Definition: Engine.h:1606
bool findingSymbolFunctions() const
Property: Whether to make functions according to symbol tables.
Definition: Engine.h:1552
virtual void environmentInsertions(const std::vector< std::string > &vars)
Property: Environment variables to insert.
Definition: Engine.h:1172
bool findingDataFunctionPointers() const
Property: Whether to search static data for function pointers.
Definition: Engine.h:1562
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:1304
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:1533
virtual void findingDeadCode(bool b)
Property: Whether to find dead code.
Definition: Engine.h:1370
bool findingCodeFunctionPointers() const
Property: Whether to search existing instructions for function pointers.
Definition: Engine.h:1572
virtual void deExecuteZerosThreshold(size_t n)
Property: when to remove execute permission from zero bytes.
Definition: Engine.h:1073
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:1512
SgAsmInterpretation * interpretation() const
Property: interpretation.
Definition: Engine.h:1048
virtual void checkingCallBranch(bool b)
Property: Whether to look for function calls used as branches.
Definition: Engine.h:1582
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:1701
size_t deExecuteZerosThreshold() const
Property: when to remove execute permission from zero bytes.
Definition: Engine.h:1072
virtual void demangleNames(bool b)
Property: Demangle names.
Definition: Engine.h:1655
bool doingPostAnalysis() const
Property: Whether to perform post-partitioning analysis steps.
Definition: Engine.h:1420
bool usingSemantics() const
Property: Whether to use instruction semantics.
Definition: Engine.h:1217
virtual void environmentEraseNames(const std::vector< std::string > &names)
Property: Environment variable erasure names.
Definition: Engine.h:1151
void basicBlockSemanticsAutoDrop(bool b)
Property: Automatically drop semantics for attached basic blocks.
Definition: Engine.h:1597
MemoryMap::Ptr memoryMap() const
Property: memory map.
Definition: Engine.h:599
bool exitOnError() const
Property: Error handling.
Definition: Engine.h:1028
bool doingPostFunctionNoop() const
Property: Whether to run no-op function analysis.
Definition: Engine.h:1457
const boost::filesystem::path & systemCallHeader() const
Property: Header file in which system calls are defined.
Definition: Engine.h:1644
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:1542
virtual void splittingThunks(bool b)
Property: Whether to split thunk instructions into mini functions.
Definition: Engine.h:1346
virtual void astAllowFunctionWithNoBasicBlocks(bool b)
Property: Whether to allow empty functions in the AST.
Definition: Engine.h:1677
bool linkStaticArchives() const
Property: Link library archives.
Definition: Engine.h:1129
bool astAllowEmptyBasicBlock() const
Property: Whether to allow empty basic blocks in the AST.
Definition: Engine.h:1688
virtual void functionMatcherThunks(const ThunkPredicates::Ptr &p)
Property: Predicate for finding functions that are thunks.
Definition: Engine.h:1336
virtual void deExecuteZerosLeaveAtFront(size_t n)
Property: when to remove execute permission from zero bytes.
Definition: Engine.h:1075
rose_addr_t peScramblerDispatcherVa() const
Property: PE-Scrambler dispatcher address.
Definition: Engine.h:1379
virtual void environmentErasePatterns(const std::vector< boost::regex > &res)
Property: Environment variable erasure patterns.
Definition: Engine.h:1161
bool findingImportFunctions() const
Property: Whether to make functions at import addresses.
Definition: Engine.h:1532
virtual void linkerCommand(const std::string &cmd)
Property: Linker command.
Definition: Engine.h:1142
Format
Format of the state file.
virtual void findingInterFunctionCalls(bool b)
Property: Whether to search for function calls between exiting functions.
Definition: Engine.h:1494
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:1503
LoaderSettings loader
Settings used during specimen loading.
Definition: Engine.h:121
virtual void binaryLoader(const BinaryLoader::Ptr &loader)
Property: binary loader.
Definition: Engine.h:1059
virtual void doingPostCallingConvention(bool b)
Property: Whether to run calling-convention analysis.
Definition: Engine.h:1448
virtual void namingSystemCalls(bool b)
Property: Give names to system calls.
Definition: Engine.h:1634
virtual void discontiguousBlocks(bool b)
Property: Whether to allow discontiguous basic blocks.
Definition: Engine.h:1281
bool findingThunks() const
Property: Whether to find thunk patterns.
Definition: Engine.h:1323
Partitions instructions into basic blocks and functions.
Definition: Partitioner.h:321
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:1150
virtual void doingPostFunctionMayReturn(bool b)
Property: Whether to run the function may-return analysis.
Definition: Engine.h:1430
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:1468
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:1596
virtual void linkStaticArchives(bool b)
Property: Link library archives.
Definition: Engine.h:1130
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:1484
virtual void doingPostAnalysis(bool b)
Property: Whether to perform post-partitioning analysis steps.
Definition: Engine.h:1421
virtual void progress(const Progress::Ptr &progress)
Property: progress reporting.
Definition: Engine.h:1038
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:1229
virtual void memoryDataAdjustment(MemoryDataAdjustment x)
Property: Global adjustments to memory map data access bits.
Definition: Engine.h:1093
Holds configuration information.
Definition: Config.h:282
const std::string & linkerCommand() const
Property: Linker command.
Definition: Engine.h:1141
bool splittingThunks() const
Property: Whether to split thunk instructions into mini functions.
Definition: Engine.h:1345
const std::vector< rose_addr_t > & ipRewrites() const
Property: CFG edge rewrite pairs.
Definition: Engine.h:1303