Skip to content

Commit 5fb9dca

Browse files
committed
Revert "[lldb] Call Target::ClearAllLoadedSections earlier (llvm#138892)"
This reverts commit 97aa01b and 7e7871d due to failures on windows.
1 parent 998dca4 commit 5fb9dca

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,7 @@ void DynamicLoaderDarwin::PrivateInitialize(Process *process) {
872872
StateAsCString(m_process->GetState()));
873873
Clear(true);
874874
m_process = process;
875+
m_process->GetTarget().ClearAllLoadedSections();
875876
}
876877

877878
// Member function that gets called when the process state changes.

lldb/source/Target/Process.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2675,7 +2675,6 @@ Status Process::LaunchPrivate(ProcessLaunchInfo &launch_info, StateType &state,
26752675
m_jit_loaders_up.reset();
26762676
m_system_runtime_up.reset();
26772677
m_os_up.reset();
2678-
GetTarget().ClearAllLoadedSections();
26792678

26802679
{
26812680
std::lock_guard<std::mutex> guard(m_process_input_reader_mutex);
@@ -2800,7 +2799,6 @@ Status Process::LaunchPrivate(ProcessLaunchInfo &launch_info, StateType &state,
28002799
}
28012800

28022801
Status Process::LoadCore() {
2803-
GetTarget().ClearAllLoadedSections();
28042802
Status error = DoLoadCore();
28052803
if (error.Success()) {
28062804
ListenerSP listener_sp(
@@ -3096,8 +3094,6 @@ void Process::CompleteAttach() {
30963094
Log *log(GetLog(LLDBLog::Process | LLDBLog::Target));
30973095
LLDB_LOGF(log, "Process::%s()", __FUNCTION__);
30983096

3099-
GetTarget().ClearAllLoadedSections();
3100-
31013097
// Let the process subclass figure out at much as it can about the process
31023098
// before we go looking for a dynamic loader plug-in.
31033099
ArchSpec process_arch;

lldb/test/API/lang/cpp/dynamic-value/TestDynamicValue.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ def test_from_forward_decl(self):
282282

283283
@no_debug_info_test
284284
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24663")
285+
@expectedFailureDarwin # dynamic loader unloads modules
285286
@expectedFailureAll(archs=["arm"]) # Minidump saving not implemented
286287
def test_from_core_file(self):
287288
"""Test fetching C++ dynamic values from core files. Specifically, test

0 commit comments

Comments
 (0)