9#ifndef LLVM_EXECUTIONENGINE_RUNTIMEDYLDCHECKER_H
10#define LLVM_EXECUTIONENGINE_RUNTIMEDYLDCHECKER_H
29class RuntimeDyldCheckerImpl;
83 TargetAddress(TargetAddress) {}
87 : Size(Size), TargetAddress(TargetAddress) {}
91 assert(Size &&
"setContent/setZeroFill must be called first");
97 assert(!ContentPtr && !Size &&
"Content/zero-fill already set");
104 assert(!ContentPtr && !this->Size &&
"Content/zero-fill already set");
111 return {ContentPtr,
static_cast<size_t>(Size)};
122 assert(!this->TargetAddress &&
"TargetAddress already set");
123 this->TargetAddress = TargetAddress;
130 const char *ContentPtr =
nullptr;
137 std::function<Expected<MemoryRegionInfo>(
StringRef SymbolName)>;
179 std::unique_ptr<RuntimeDyldCheckerImpl> Impl;
This file defines the DenseMap class.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Superclass for all disassemblers.
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
This interface provides simple read-only access to a block of memory, and provides simple methods for...
void setContent(ArrayRef< char > Content)
Set the content for this memory region.
void setZeroFill(uint64_t Size)
Set a zero-fill length for this memory region.
JITTargetAddress getTargetAddress() const
Return the target address for this region.
MemoryRegionInfo()=default
void setTargetAddress(JITTargetAddress TargetAddress)
Set the target address for this region.
ArrayRef< char > getContent() const
Returns the content for this section if there is any.
uint64_t getZeroFillLength() const
Returns the zero-fill length for this section.
MemoryRegionInfo(uint64_t Size, JITTargetAddress TargetAddress)
Constructor for zero-fill symbols/sections.
MemoryRegionInfo(ArrayRef< char > Content, JITTargetAddress TargetAddress)
Constructor for symbols/sections with content.
bool isZeroFill() const
Returns true if this is a zero-fill symbol/section.
RuntimeDyld invariant checker for verifying that RuntimeDyld has correctly applied relocations.
std::pair< uint64_t, std::string > getSectionAddr(StringRef FileName, StringRef SectionName, bool LocalAddress)
Returns the address of the requested section (or an error message in the second element of the pair i...
bool checkAllRulesInBuffer(StringRef RulePrefix, MemoryBuffer *MemBuf) const
Scan the given memory buffer for lines beginning with the string in RulePrefix.
std::function< Expected< MemoryRegionInfo >(StringRef StubContainer, StringRef TargetName)> GetStubInfoFunction
std::function< bool(StringRef Symbol)> IsSymbolValidFunction
std::optional< uint64_t > getSectionLoadAddress(void *LocalAddress) const
If there is a section at the given local address, return its load address, otherwise return std::null...
std::function< Expected< MemoryRegionInfo >(StringRef FileName, StringRef SectionName)> GetSectionInfoFunction
std::function< Expected< MemoryRegionInfo >(StringRef GOTContainer, StringRef TargetName)> GetGOTInfoFunction
std::function< Expected< MemoryRegionInfo >(StringRef SymbolName)> GetSymbolInfoFunction
StringRef - Represent a constant reference to a string, i.e.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)
Get the size of a range.