//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_RUNTIMEDYLDCHECKER_H
-#define LLVM_RUNTIMEDYLDCHECKER_H
+#ifndef LLVM_EXECUTIONENGINE_RUNTIMEDYLDCHECKER_H
+#define LLVM_EXECUTIONENGINE_RUNTIMEDYLDCHECKER_H
#include "llvm/ADT/StringRef.h"
///
/// ident_expr = 'decode_operand' '(' symbol ',' operand-index ')'
/// | 'next_pc' '(' symbol ')'
+/// | 'stub_addr' '(' file-name ',' section-name ',' symbol ')'
/// | symbol
///
/// binary_expr = expr '+' expr
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;
/// 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<uint64_t, std::string> getSectionAddr(StringRef FileName,
+ StringRef SectionName,
+ bool LinkerAddress);
+
private:
std::unique_ptr<RuntimeDyldCheckerImpl> Impl;
};
} // end namespace llvm
-#endif // LLVM_RUNTIMEDYLDCHECKER_H
+#endif