This revision was automatically updated to reflect the committed changes.
Closed by commit rG8b092714c304: Using global variable in xnu kernel, set # of
addressable bits (authored by jasonmolenda).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147462
jasonmolenda added a comment.
Yeah, I agree that messing with the global setting of addressable bits here is
not ideal, but at this point in time the fact that we probably have an
un-set/invalid value means it won't make things worse.
Comment at:
lldb/source/Plugins/DynamicL
JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.
LGTM. I would still prefer to not change the global state, but after speaking
to Jason offline, that might be better tackled when we unify the current
Process/Target bifurcation.
jasonmolenda updated this revision to Diff 510586.
jasonmolenda added a comment.
Update patch to address some of Jonas' comments. I was adding a check that the
ptrsize of the architecture was 64-bit, but we don't work on 32-bit xnu kernels
for a few years now; we can assume 64-bit safely. I am
jasonmolenda added inline comments.
Comment at:
lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp:1093
+ // don't mark those as addressable.
+ m_process->SetVirtualAddressableBits((wordsize * 8) - 9);
+ addr_t sym_addr = sym
JDevlieghere added inline comments.
Comment at:
lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp:1087
+ if (symbol && wordsize == 8) {
+if (symbol->GetByteSizeIsValid()) {
+ // Mark all bits as addressable so we don't strip any
jasonmolenda created this revision.
jasonmolenda added a reviewer: JDevlieghere.
jasonmolenda added a project: LLDB.
Herald added a project: All.
jasonmolenda requested review of this revision.
Herald added a subscriber: lldb-commits.
The Darwin xnu kernel has a global variable which has the numbe