X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=include%2Fllvm%2FExecutionEngine%2FRuntimeDyldChecker.h;h=23936a6209bfd74ae8cfed98aaaca6c0730620d8;hp=b02640619c8eea0ec01dadea9ddc48c04f5d961c;hb=e9e901360aa5e662ec6d13a8dddd1247dad0ab49;hpb=00e08fcaa02286dd7da9cf9a8d158545532ab832 diff --git a/include/llvm/ExecutionEngine/RuntimeDyldChecker.h b/include/llvm/ExecutionEngine/RuntimeDyldChecker.h index b02640619c8..23936a6209b 100644 --- a/include/llvm/ExecutionEngine/RuntimeDyldChecker.h +++ b/include/llvm/ExecutionEngine/RuntimeDyldChecker.h @@ -52,6 +52,7 @@ class raw_ostream; /// /// ident_expr = 'decode_operand' '(' symbol ',' operand-index ')' /// | 'next_pc' '(' symbol ')' +/// | 'stub_addr' '(' file-name ',' section-name ',' symbol ')' /// | symbol /// /// binary_expr = expr '+' expr @@ -67,6 +68,12 @@ public: MCInstPrinter *InstPrinter, raw_ostream &ErrStream); ~RuntimeDyldChecker(); + // \brief Get the associated RTDyld instance. + RuntimeDyld& getRTDyld(); + + // \brief Get the associated RTDyld instance. + const RuntimeDyld& getRTDyld() const; + /// \brief Check a single expression against the attached RuntimeDyld /// instance. bool check(StringRef CheckExpr) const; @@ -76,6 +83,16 @@ public: /// method to be evaluated as an expression. bool checkAllRulesInBuffer(StringRef RulePrefix, MemoryBuffer *MemBuf) const; + /// \brief Returns the address of the requested section (or an error message + /// in the second element of the pair if the address cannot be found). + /// + /// if 'LinkerAddress' is true, this returns the address of the section + /// within the linker's memory. If 'LinkerAddress' is false it returns the + /// address within the target process (i.e. the load address). + std::pair getSectionAddr(StringRef FileName, + StringRef SectionName, + bool LinkerAddress); + private: std::unique_ptr Impl; };