[Lldb-commits] [lldb] [LLDB] Skip JITLoaderGDB for post-mortem processes (PR #202013)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 5 23:58:50 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Igor Kudrin (igorkudrin)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/202013.diff
3 Files Affected:
- (modified) lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp (+7-1)
- (modified) lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp (-11)
- (modified) lldb/source/Plugins/Process/minidump/ProcessMinidump.h (-2)
``````````diff
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;
``````````
</details>
https://github.com/llvm/llvm-project/pull/202013
More information about the lldb-commits
mailing list