[all-commits] [llvm/llvm-project] 53a5be: [lldb] Call Target::ClearAllLoadedSections even ea...
Pavel Labath via All-commits
all-commits at lists.llvm.org
Wed May 21 23:32:32 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 53a5bea0ad7ebf72d076d00d3e4a8aff18692ec6
https://github.com/llvm/llvm-project/commit/53a5bea0ad7ebf72d076d00d3e4a8aff18692ec6
Author: Pavel Labath <pavel at labath.sk>
Date: 2025-05-22 (Thu, 22 May 2025)
Changed paths:
M lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
M lldb/source/Target/Process.cpp
M lldb/test/API/lang/cpp/dynamic-value/TestDynamicValue.py
Log Message:
-----------
[lldb] Call Target::ClearAllLoadedSections even earlier (#140228)
This reapplies https://github.com/llvm/llvm-project/pull/138892, which
was reverted in
https://github.com/llvm/llvm-project/commit/5fb9dca14aeaf12219ff149bf3a4f94c8dc58d8b
due to failures on windows.
Windows loads modules from the Process class, and it does that quite
early, and it kinda makes sense which is why I'm moving the clearing
code even earlier.
The original commit message was:
Minidump files contain explicit information about load addresses of
modules, so it can load them itself. This works on other platforms, but
fails on darwin because DynamicLoaderDarwin nukes the loaded module list
on initialization (which happens after the core file plugin has done its
work).
This used to work until
https://github.com/llvm/llvm-project/pull/109477, which enabled the
dynamic loader
plugins for minidump files in order to get them to provide access to
TLS.
Clearing the load list makes sense, but I think we could do it earlier
in the process, so that both Process and DynamicLoader plugins get a
chance to load modules. This patch does that by calling the function
early in the launch/attach/load core flows.
This fixes TestDynamicValue.py:test_from_core_file on darwin.
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