[Lldb-commits] [PATCH] D147462: Use kernel's global variable indicating how many bits are used in addressing when loading Darwin xnu kernel
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 3 13:40:53 PDT 2023
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.
================
Comment at: lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp:1094-1097
+ const size_t sym_bytesize = 8; // size of gT1Sz value
+ uint64_t sym_value =
+ m_process->GetTarget().ReadUnsignedIntegerFromMemory(
+ symbol->GetAddress(), sym_bytesize, 0, error);
----------------
Why not use `symbol->GetByteSize()` too? Maybe add an `assert(symbol->GetByteSize() == 8)`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147462/new/
https://reviews.llvm.org/D147462
More information about the lldb-commits
mailing list