Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lldb/dyld-posix] Avoid reading the module list in inconsistent states
New glibc versions (since 2.34 or including this <bminor/glibc@ed3ce71> patch) trigger the rendezvous breakpoint after they have already added some modules to the list. This did not play well with our dynamic loader plugin which was doing a diff of the the reported modules in the before (RT_ADD) and after (RT_CONSISTENT) states. Specifically, it caused us to miss some of the modules. While I think the old behavior makes more sense, I don't think that lldb is doing the right thing either, as the documentation states that we should not be expecting a consistent view in the RT_ADD (and RT_DELETE) states. Therefore, this patch changes the lldb algorithm to compare the module list against the previous consistent snapshot. This fixes the previous issue, and I believe it is more correct in general. It also reduces the number of times we are fetching the module info, which should speed up the debugging of processes with many shared libraries. The change in RefreshModules ensures we don't broadcast the loaded notification for the dynamic loader (ld.so) module more than once. Differential Revision: https://reviews.llvm.org/D128264
- Loading branch information
Showing
2 changed files
with
28 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters