llvm-capstone/lldb
Jason Molenda 430e145fc3
Clean up PlatformDarwinKernel::GetSharedModule, document (#78652)
PlatformDarwinKernel::GetSharedModule, which can find a kernel or kext
from a local filesystem scan, needed a little cleanup. The method which
finds kernels was (1) not looking for the SymbolFileSpec when creating a
Module, and (2) adding that newly created Module to a Target, which
GetSharedModule should not be doing - after auditing many other subclass
implementations of this method, I haven't found any others doing it.
Platform::GetSharedModule didn't have a headerdoc so it took a little
work to piece together the intended behaviors.

This is addressing a bug where
PlatformDarwinKernel::GetSharedModuleKernel would find the ObjectFile
for a kernel, create a Module, and add it to the Target. Then up in
DynamicLoaderDarwinKernel, it would check if the Module had a SymbolFile
FileSpec, and because it did not, it would do its own search for a
binary & dSYM, find them, and then add that to the Target. Now we have
two copies of the Module in the Target, one with a dSYM and the other
without, and only one of them has its load addresses set.

GetSharedModule should not be adding binaries to the Target, and it
should set the SymbolFile FileSpec when it is creating the Module.

rdar://120895951
2024-01-18 23:26:15 -08:00
..
bindings [lldb] Use StringRef::starts_with (NFC) 2023-12-17 15:51:48 -08:00
cmake [lldb] Silence warning with latest MSVC 2024-01-18 13:06:12 -05:00
docs Remove hardware index from watchpoints and breakpoints (#72012) 2023-11-15 13:32:42 -08:00
examples [lldb] Pass important options to dsymForUUID (#72669) 2023-11-17 08:00:07 -08:00
include Clean up PlatformDarwinKernel::GetSharedModule, document (#78652) 2024-01-18 23:26:15 -08:00
packages/Python/lldbsuite [lldb-dap] Implement command directives (#74808) 2023-12-14 15:04:35 -05:00
resources [lldb][NFC] Remove copy of debugserver entitlements plist 2023-01-31 12:58:37 -08:00
scripts [lldb] Replace the usage of module imp with module importlib (#70443) 2023-10-31 17:08:55 -03:00
source Clean up PlatformDarwinKernel::GetSharedModule, document (#78652) 2024-01-18 23:26:15 -08:00
test Revert "[BOLT] Fix unconditional output of boltedcollection in merge-fdata (#78653)" 2024-01-18 19:59:09 -08:00
third_party/Python/module [lldb] Remove use of __future__ in python 2023-08-14 14:14:48 -07:00
tools [lldb] Upstream xros support in lldb (#78389) 2024-01-17 09:47:08 -08:00
unittests Revert "[lldb] Silence narrowing conversion warning with MSVC" 2024-01-18 14:13:07 -05:00
utils [llvm][tblgen] Add Source Filename for emitSourceFileHeader (#65744) 2023-09-26 13:40:56 +08:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [LLDB] Define _BSD_SOURCE globally, to get optreset available in mingw's getopt.h (#76137) 2023-12-22 00:40:12 +02:00
CodeOwners.rst [lldb] Remove more references to lldb-vscode (#69696) 2023-10-20 15:08:37 +01:00
LICENSE.TXT
use_lldb_suite_root.py [lldb] Format more Python files with black (#65979) 2023-09-12 08:46:34 +01:00