[Lldb-commits] [PATCH] D133534: Complete support of loading a darwin kernel over a live gdb-remote connection given the address of a mach-o fileset

Jason Molenda via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 9 00:34:09 PDT 2022


jasonmolenda updated this revision to Diff 458970.
jasonmolenda added a comment.

Update the patch to address Jim's comments/suggestions.  Biggest change was to clean up how DynamicLoaderDarwinKernel filters out any kernels in the Target that don't match the UUID of the actually running kernel.  There was a vague attempt at this before, checking the target's ExecutableModule, but that assumes there was only one module loaded and it was the wrong kernel.  Easier to step through everything loaded in the target and eliminate these, and clearer what's being done.  I had the same sequence for detecting if a module is a kernel in a bunch of places so I added `module_is_a_kernel()` as a static function there.

I also renamed the method in Platform and PlatformList to `LoadSpecialBinaryAndSetDynamicLoader()`, to help make it clear that this is an uncommon use case, so someone doesn't try to use it for loading general binaries.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133534/new/

https://reviews.llvm.org/D133534

Files:
  lldb/include/lldb/Target/Platform.h
  lldb/include/lldb/Target/Process.h
  lldb/source/Core/DynamicLoader.cpp
  lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h
  lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
  lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
  lldb/source/Target/Platform.cpp
  lldb/source/Target/Process.cpp
  lldb/unittests/Core/CMakeLists.txt
  lldb/unittests/Interpreter/CMakeLists.txt
  lldb/unittests/Platform/CMakeLists.txt
  lldb/unittests/Process/CMakeLists.txt
  lldb/unittests/SymbolFile/DWARF/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133534.458970.patch
Type: text/x-patch
Size: 25830 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220909/8971c7e3/attachment-0001.bin>


More information about the lldb-commits mailing list