[all-commits] [llvm/llvm-project] 9409c0: [lldb][Darwin] Read Mach-O binaries out of memory ...
Jason Molenda via All-commits
all-commits at lists.llvm.org
Wed May 27 15:47:07 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9409c07de6378507397ecdb6f05f628f58110112
https://github.com/llvm/llvm-project/commit/9409c07de6378507397ecdb6f05f628f58110112
Author: Jason Molenda <jmolenda at apple.com>
Date: 2026-05-27 (Wed, 27 May 2026)
Changed paths:
M lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
M lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h
Log Message:
-----------
[lldb][Darwin] Read Mach-O binaries out of memory more efficiently (#200072)
When lldb needs to read a Mach-O binary out of memory, it first reads
512 bytes to get the mach header, which includes the size of the load
commands, and then does a second read to get the mach header and load
commands.
I am changing the initial read to get 3192 bytes, which will include the
full load commands for most binaries.
In April I changed debugserver to return the correct size of the mach
header and load commands in a `sizeof_mh_and_loadcmds` key. If this
number is provided, refine the amount we read to this size.
This reduces the number of memory read packets we issue from 2 to 1 for
a memory module, outside of packets that may be needed to get the symbol
table.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list