mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
[JITLink] Display host -> target address mapping in debugging output.
This can be helpful for sanity checking JITLink memory manager behavior.
This commit is contained in:
@@ -267,11 +267,12 @@ Error JITLinkerBase::allocateSegments(const SegmentLayoutMap &Layout) {
|
||||
return AllocOrErr.takeError();
|
||||
|
||||
LLVM_DEBUG({
|
||||
dbgs() << "JIT linker got working memory:\n";
|
||||
dbgs() << "JIT linker got memory (working -> target):\n";
|
||||
for (auto &KV : Layout) {
|
||||
auto Prot = static_cast<sys::Memory::ProtectionFlags>(KV.first);
|
||||
dbgs() << " " << Prot << ": "
|
||||
<< (const void *)Alloc->getWorkingMemory(Prot).data() << "\n";
|
||||
<< (const void *)Alloc->getWorkingMemory(Prot).data() << " -> "
|
||||
<< formatv("{0:x16}", Alloc->getTargetMemory(Prot)) << "\n";
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user