llvm-project/lldb/source/Plugins/DynamicLoader
Pavel Labath 553558292e [lldb/dyld-posix] Avoid reading the module list in inconsistent states
New glibc versions (since 2.34 or including this
<ed3ce71f5c>
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
2022-07-01 08:08:22 +02:00
..
Darwin-Kernel [lldb] Show the DBGError if dsymForUUID can't find a dSYM 2022-04-14 16:54:00 -07:00
Hexagon-DYLD [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
MacOSX-DYLD [lldb] Replace Host::SystemLog with Debugger::Report{Error,Warning} 2022-06-24 09:46:26 -07:00
POSIX-DYLD [lldb/dyld-posix] Avoid reading the module list in inconsistent states 2022-07-01 08:08:22 +02:00
Static Remove ConstString from DynamicLoader, JITLoader and Instruction plugin names 2021-10-25 10:32:35 +02:00
Windows-DYLD [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
wasm-DYLD [lldb] Avoid duplicate vdso modules when opening core files 2022-04-05 11:22:37 +02:00
CMakeLists.txt [lldb/Plugin] Unconditionally build Darwin-Kernel 2020-02-17 18:14:24 -08:00