[Lldb-commits] [PATCH] D51176: Restrict the set of plugins used for ProcessMinidump
Leonard Mosescu via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 23 14:31:56 PDT 2018
lemo updated this revision to Diff 162270.
lemo added a comment.
Added the comment requested by zturner
https://reviews.llvm.org/D51176
Files:
source/Plugins/Process/minidump/ProcessMinidump.cpp
source/Plugins/Process/minidump/ProcessMinidump.h
Index: source/Plugins/Process/minidump/ProcessMinidump.h
===================================================================
--- source/Plugins/Process/minidump/ProcessMinidump.h
+++ source/Plugins/Process/minidump/ProcessMinidump.h
@@ -55,7 +55,7 @@
Status DoLoadCore() override;
- DynamicLoader *GetDynamicLoader() override;
+ DynamicLoader *GetDynamicLoader() override { return nullptr; }
ConstString GetPluginName() override;
@@ -102,6 +102,8 @@
void ReadModuleList();
+ JITLoaderList &GetJITLoaders() override;
+
private:
FileSpec m_core_file;
llvm::ArrayRef<MinidumpThread> m_thread_list;
Index: source/Plugins/Process/minidump/ProcessMinidump.cpp
===================================================================
--- source/Plugins/Process/minidump/ProcessMinidump.cpp
+++ source/Plugins/Process/minidump/ProcessMinidump.cpp
@@ -16,7 +16,7 @@
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Section.h"
-#include "lldb/Target/DynamicLoader.h"
+#include "lldb/Target/JITLoaderList.h"
#include "lldb/Target/MemoryRegionInfo.h"
#include "lldb/Target/SectionLoadList.h"
#include "lldb/Target/Target.h"
@@ -201,12 +201,6 @@
return error;
}
-DynamicLoader *ProcessMinidump::GetDynamicLoader() {
- if (m_dyld_ap.get() == nullptr)
- m_dyld_ap.reset(DynamicLoader::FindPlugin(this, nullptr));
- return m_dyld_ap.get();
-}
-
ConstString ProcessMinidump::GetPluginName() { return GetPluginNameStatic(); }
uint32_t ProcessMinidump::GetPluginVersion() { return 1; }
@@ -401,3 +395,14 @@
}
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_ap) {
+ m_jit_loaders_ap = llvm::make_unique<JITLoaderList>();
+ }
+ return *m_jit_loaders_ap;
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51176.162270.patch
Type: text/x-patch
Size: 2053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180823/6ef3d278/attachment.bin>
More information about the lldb-commits
mailing list