X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FExecutionEngine%2FRuntimeDyldChecker.h;h=31ce151c56a3cae5ee71caa96d9822bcef56f3ee;hb=b9b04eeb85b2bc4f54003a9436f792e13f4d37ad;hp=b02640619c8eea0ec01dadea9ddc48c04f5d961c;hpb=00e08fcaa02286dd7da9cf9a8d158545532ab832;p=oota-llvm.git diff --git a/include/llvm/ExecutionEngine/RuntimeDyldChecker.h b/include/llvm/ExecutionEngine/RuntimeDyldChecker.h index b02640619c8..31ce151c56a 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 'LocalAddress' is true, this returns the address of the section + /// within the linker's memory. If 'LocalAddress' is false it returns the + /// address within the target process (i.e. the load address). + std::pair getSectionAddr(StringRef FileName, + StringRef SectionName, + bool LocalAddress); + private: std::unique_ptr Impl; };