"");
uint64_t SymbolAddr = PCtx.IsInsideLoad
- ? Checker.getSymbolLinkerAddr(Symbol)
+ ? Checker.getSymbolLocalAddr(Symbol)
: Checker.getSymbolRemoteAddr(Symbol);
uint64_t NextPC = SymbolAddr + InstSize;
// The value for the symbol depends on the context we're evaluating in:
// Inside a load this is the address in the linker's memory, outside a
// load it's the address in the target processes memory.
- uint64_t Value = PCtx.IsInsideLoad ? Checker.getSymbolLinkerAddr(Symbol)
+ uint64_t Value = PCtx.IsInsideLoad ? Checker.getSymbolLocalAddr(Symbol)
: Checker.getSymbolRemoteAddr(Symbol);
// Looks like a plain symbol reference.
}
bool RuntimeDyldCheckerImpl::isSymbolValid(StringRef Symbol) const {
- return getRTDyld().getSymbolAddress(Symbol) != nullptr;
+ return getRTDyld().getSymbolLocalAddress(Symbol) != nullptr;
}
-uint64_t RuntimeDyldCheckerImpl::getSymbolLinkerAddr(StringRef Symbol) const {
+uint64_t RuntimeDyldCheckerImpl::getSymbolLocalAddr(StringRef Symbol) const {
return static_cast<uint64_t>(
- reinterpret_cast<uintptr_t>(getRTDyld().getSymbolAddress(Symbol)));
+ reinterpret_cast<uintptr_t>(getRTDyld().getSymbolLocalAddress(Symbol)));
}
uint64_t RuntimeDyldCheckerImpl::getSymbolRemoteAddr(StringRef Symbol) const {
- if (uint64_t InternalSymbolAddr = getRTDyld().getSymbolLoadAddress(Symbol))
- return InternalSymbolAddr;
+ if (auto InternalSymbol = getRTDyld().getSymbol(Symbol))
+ return InternalSymbol.getAddress();
return getRTDyld().MemMgr->getSymbolAddress(Symbol);
}
std::pair<uint64_t, std::string>
RuntimeDyldChecker::getSectionAddr(StringRef FileName, StringRef SectionName,
- bool LinkerAddress) {
- return Impl->getSectionAddr(FileName, SectionName, LinkerAddress);
+ bool LocalAddress) {
+ return Impl->getSectionAddr(FileName, SectionName, LocalAddress);
}