aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorJason Molenda <jason@molenda.com>2022-06-07 13:27:16 -0700
committerJason Molenda <jason@molenda.com>2022-06-07 13:34:30 -0700
commit8d5a6007f9681ded3e6442bafdea87e733d771ea (patch)
tree527934d67f629739b412e2429fea0c8f6ce3478f /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parentf3966eaf869b7bdd9113ab9d5b78469eb0f5f028 (diff)
downloadllvm-8d5a6007f9681ded3e6442bafdea87e733d771ea.zip
llvm-8d5a6007f9681ded3e6442bafdea87e733d771ea.tar.gz
llvm-8d5a6007f9681ded3e6442bafdea87e733d771ea.tar.bz2
Track transition from launch dyld to shared-cache dyld
On macOS, a process will be launched with /usr/lib/dyld (the dynamic linker) and the main binary by the kernel. The first thing the standalone dyld will do is call into the dyld in the shared cache image. This patch tracks the transition between the dyld's at the very beginning of process startup. In DynamicLoaderMacOS::NotifyBreakpointHit() there are two new cases handled: `dyld_image_dyld_moved` which is the launch /usr/lib/dyld indicating that it is about call into the shared cache dyld ane evict itself. lldb will remove the notification breakpoint it set, clear the binary image list entirely, get the notification function pointer value out of the dyld_all_image_infos struct (which is the notification fptr in the to-be-run shared-cache dyld) and put an address breakpoint there. `dyld_notify_adding` is then called by shared-cache dyld, and we detect this case by noticing that we have an empty binary image list, normally impossibe, and treating this as if we'd just started a process attach/launch. Differential Revision: https://reviews.llvm.org/D127247 rdar://84222158
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions