#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDisassembler.h"
#include "llvm/MC/MCInst.h"
-#include "llvm/Support/StringRefMemoryObject.h"
#include "llvm/Support/Path.h"
#include "RuntimeDyldCheckerImpl.h"
#include "RuntimeDyldImpl.h"
bool decodeInst(StringRef Symbol, MCInst &Inst, uint64_t &Size) const {
MCDisassembler *Dis = Checker.Disassembler;
StringRef SectionMem = Checker.getSubsectionStartingAt(Symbol);
- ArrayRef<uint8_t> SectionBytes((uint8_t *)SectionMem.begin(),
- SectionMem.size());
+ ArrayRef<uint8_t> SectionBytes(
+ reinterpret_cast<const uint8_t *>(SectionMem.data()),
+ SectionMem.size());
MCDisassembler::DecodeStatus S =
Dis->getInstruction(Inst, Size, SectionBytes, 0, nulls(), nulls());
}
uint64_t RuntimeDyldCheckerImpl::getSymbolRemoteAddr(StringRef Symbol) const {
- return getRTDyld().getAnySymbolRemoteAddress(Symbol);
+ if (uint64_t InternalSymbolAddr = getRTDyld().getSymbolLoadAddress(Symbol))
+ return InternalSymbolAddr;
+ return getRTDyld().MemMgr->getSymbolAddress(Symbol);
}
uint64_t RuntimeDyldCheckerImpl::readMemoryAtAddr(uint64_t SrcAddr,