aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp b/llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp
index fe62138..9265780 100644
--- a/llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp
@@ -129,8 +129,8 @@ public:
Section *Sec = nullptr;
StringRef SegName;
StringRef SecName;
- JITTargetAddress Alignment = 0;
- JITTargetAddress StartAddr = 0;
+ uint64_t Alignment = 0;
+ orc::ExecutorAddr StartAddr;
uint64_t Size = 0;
};
@@ -153,7 +153,8 @@ public:
return Error::success();
}
DebugSecInfos.push_back({&Sec, Sec.getName().substr(0, SepPos),
- Sec.getName().substr(SepPos + 1), 0, 0});
+ Sec.getName().substr(SepPos + 1), 0,
+ orc::ExecutorAddr(), 0});
} else {
NonDebugSections.push_back(&Sec);
@@ -182,11 +183,11 @@ public:
size_t ContainerBlockSize =
sizeof(typename MachOTraits::Header) + SegmentLCSize;
auto ContainerBlockContent = G.allocateBuffer(ContainerBlockSize);
- MachOContainerBlock =
- &G.createMutableContentBlock(SDOSec, ContainerBlockContent, 0, 8, 0);
+ MachOContainerBlock = &G.createMutableContentBlock(
+ SDOSec, ContainerBlockContent, orc::ExecutorAddr(), 8, 0);
// Copy debug section blocks and symbols.
- JITTargetAddress NextBlockAddr = MachOContainerBlock->getSize();
+ orc::ExecutorAddr NextBlockAddr(MachOContainerBlock->getSize());
for (auto &SI : DebugSecInfos) {
assert(!llvm::empty(SI.Sec->blocks()) && "Empty debug info section?");
@@ -219,7 +220,8 @@ public:
G.mergeSections(SDOSec, *SI.Sec);
SI.Sec = nullptr;
}
- size_t DebugSectionsSize = NextBlockAddr - MachOContainerBlock->getSize();
+ size_t DebugSectionsSize =
+ NextBlockAddr - orc::ExecutorAddr(MachOContainerBlock->getSize());
// Write MachO header and debug section load commands.
MachOStructWriter Writer(MachOContainerBlock->getAlreadyMutableContent());
@@ -266,9 +268,9 @@ public:
memset(&Sec, 0, sizeof(Sec));
memcpy(Sec.sectname, SI.SecName.data(), SI.SecName.size());
memcpy(Sec.segname, SI.SegName.data(), SI.SegName.size());
- Sec.addr = SI.StartAddr;
+ Sec.addr = SI.StartAddr.getValue();
Sec.size = SI.Size;
- Sec.offset = SI.StartAddr;
+ Sec.offset = SI.StartAddr.getValue();
Sec.align = SI.Alignment;
Sec.reloff = 0;
Sec.nreloc = 0;
@@ -336,7 +338,7 @@ public:
memset(&SecCmd, 0, sizeof(SecCmd));
memcpy(SecCmd.sectname, SecName.data(), SecName.size());
memcpy(SecCmd.segname, SegName.data(), SegName.size());
- SecCmd.addr = R.getStart();
+ SecCmd.addr = R.getStart().getValue();
SecCmd.size = R.getSize();
SecCmd.offset = 0;
SecCmd.align = R.getFirstBlock()->getAlignment();
@@ -348,7 +350,7 @@ public:
SectionRange R(MachOContainerBlock->getSection());
G.allocActions().push_back(
- {{RegisterActionAddr.getValue(), R.getStart(), R.getSize()}, {}});
+ {{RegisterActionAddr, R.getStart(), R.getSize()}, {}});
return Error::success();
}