[Lldb-commits] [lldb] [LLDB] Skip JITLoaderGDB for post-mortem processes (PR #202013)
Igor Kudrin via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 5 23:58:14 PDT 2026
https://github.com/igorkudrin created https://github.com/llvm/llvm-project/pull/202013
Post-mortem processes do not support runtime-generated code, making the JITLoaderGDB plugin unnecessary. During initialization, the plugin attempts to set up symbolic breakpoints, which forces symbol loading. Disabling the plugin reduces load time for core dumps from large projects.
>From 40ee960a20cd98ff1bc5eb73bf759484e224d584 Mon Sep 17 00:00:00 2001
From: Igor Kudrin <ikudrin at accesssoftek.com>
Date: Fri, 5 Jun 2026 23:19:19 -0700
Subject: [PATCH] [LLDB] Skip JITLoaderGDB for post-mortem processes
Post-mortem processes do not support runtime-generated code, making
the JITLoaderGDB plugin unnecessary. During initialization, the plugin
attempts to set up symbolic breakpoints, which forces symbol loading.
Disabling the plugin reduces load time for core dumps from large
projects.
---
lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp | 8 +++++++-
.../Plugins/Process/minidump/ProcessMinidump.cpp | 11 -----------
.../source/Plugins/Process/minidump/ProcessMinidump.h | 2 --
3 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
index b336a605b747a..79b35a0773d38 100644
--- a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
+++ b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
@@ -421,7 +421,13 @@ JITLoaderSP JITLoaderGDB::CreateInstance(Process *process, bool force) {
break;
case EnableJITLoaderGDB::eEnableJITLoaderGDBDefault:
ArchSpec arch(process->GetTarget().GetArchitecture());
- enable = arch.GetTriple().getVendor() != llvm::Triple::Apple;
+ // Do not load the plugin for post-mortem processes because they do not
+ // support runtime-generated code. `JITLoaderGDB::DidAttach()` attempts
+ // to set up symbolic breakpoints, which may force loading of more debug
+ // information than necessary. Disabling the plugin speeds up loading of
+ // core dumps and other post-mortem files.
+ enable = process->IsLiveDebugSession() &&
+ arch.GetTriple().getVendor() != llvm::Triple::Apple;
break;
}
if (enable)
diff --git a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
index 2f0bfa6f751ae..3dfa670715a3e 100644
--- a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
+++ b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
@@ -603,17 +603,6 @@ bool ProcessMinidump::GetProcessInfo(ProcessInstanceInfo &info) {
return true;
}
-// For minidumps there's no runtime generated code so we don't need JITLoader(s)
-// Avoiding them will also speed up minidump loading since JITLoaders normally
-// try to set up symbolic breakpoints, which in turn may force loading more
-// debug information than needed.
-JITLoaderList &ProcessMinidump::GetJITLoaders() {
- if (!m_jit_loaders_up) {
- m_jit_loaders_up = std::make_unique<JITLoaderList>();
- }
- return *m_jit_loaders_up;
-}
-
#define INIT_BOOL(VAR, LONG, SHORT, DESC) \
VAR(LLDB_OPT_SET_1, false, LONG, SHORT, DESC, false, true)
#define APPEND_OPT(VAR) \
diff --git a/lldb/source/Plugins/Process/minidump/ProcessMinidump.h b/lldb/source/Plugins/Process/minidump/ProcessMinidump.h
index ad8d0ed7a4832..2b18651896103 100644
--- a/lldb/source/Plugins/Process/minidump/ProcessMinidump.h
+++ b/lldb/source/Plugins/Process/minidump/ProcessMinidump.h
@@ -103,8 +103,6 @@ class ProcessMinidump : public PostMortemProcess {
llvm::StringRef name,
lldb_private::ModuleSpec module_spec);
- JITLoaderList &GetJITLoaders() override;
-
private:
lldb::DataBufferSP m_core_data;
llvm::ArrayRef<minidump::Thread> m_thread_list;
More information about the lldb-commits
mailing list