jasonmolenda added a comment.
In D100338#2686410 <https://reviews.llvm.org/D100338#2686410>, @augusto2112
wrote:
> Thanks for the input @jasonmolenda. FWIW I also think it's worth implementing
> this correctly.
>
> Could you help me figure out which callers I should change to
> `force_live_memory` though?
> Maybe force live memory only for the functions in
> `DynamicLoaderDarwinKernel.cpp` and `DynamicLoaderDarwin.cpp`?
Taking a quick look at the dynamic loader plugins, DynamicLoaderDarwin is
calling ReadMemory in DynamicLoaderDarwin::GetThreadLocalData and I'm pretty
sure the thread load storage address it is reading will be in a writable
section, so our reimagined Target::ReadMemory will read from memory anyway.
DynamicLoaderDarwinKernel is calling Target::ReadMemory in
ReadKextSummaryHeader and ReadKextSummaries -- it needs to read live memory, but
(lldb) ima loo -vs gLoadedKextSummaries
1 symbols match 'gLoadedKextSummaries' in /tmp/dl/mach.development.t8002:
Address: mach.development.t8002[0x808c66b8]
(mach.development.t8002.__DATA.__common + 394936)
(lldb) tar mod dump sect
0x00000011 zero-fill [0x0000000080866000-0x00000000808c8294) rw-
0x00000000 0x00000000 0x00000001 mach.development.t8002.__DATA.__common
they're reading from a writable Section so we would do the right thing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100338/new/
https://reviews.llvm.org/D100338
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits