[Lldb-commits] [lldb] 555a71b - [LLDB] Don't forcefully initialize the process trace plugin (#71455)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 6 16:45:56 PST 2023
Author: Walter Erquinigo
Date: 2023-11-06T19:45:52-05:00
New Revision: 555a71be457f351411b89c6a6a66aeecf7ca5291
URL: https://github.com/llvm/llvm-project/commit/555a71be457f351411b89c6a6a66aeecf7ca5291
DIFF: https://github.com/llvm/llvm-project/commit/555a71be457f351411b89c6a6a66aeecf7ca5291.diff
LOG: [LLDB] Don't forcefully initialize the process trace plugin (#71455)
This was causing some process to wrongfully be handled by ProcessTrace.
The only place this was being used is in the intel pt plugin, but it
doesn't even build anymore, so I'm sure no one is using it.
Added:
Modified:
lldb/source/API/SystemInitializerFull.cpp
lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp
Removed:
################################################################################
diff --git a/lldb/source/API/SystemInitializerFull.cpp b/lldb/source/API/SystemInitializerFull.cpp
index 27319debc858288..c48466f25ede81b 100644
--- a/lldb/source/API/SystemInitializerFull.cpp
+++ b/lldb/source/API/SystemInitializerFull.cpp
@@ -68,9 +68,6 @@ llvm::Error SystemInitializerFull::Initialize() {
#define LLDB_PLUGIN(p) LLDB_PLUGIN_INITIALIZE(p);
#include "Plugins/Plugins.def"
- // Initialize plug-ins in core LLDB
- ProcessTrace::Initialize();
-
// Scan for any system or user LLDB plug-ins
PluginManager::Initialize();
diff --git a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp
index 6bed78fd83f0b70..bd9cca675f2d747 100644
--- a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp
+++ b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp
@@ -103,10 +103,11 @@ TraceIntelPTBundleLoader::CreateEmptyProcess(lldb::pid_t pid,
ParsedProcess parsed_process;
parsed_process.target_sp = target_sp;
- ProcessSP process_sp = target_sp->CreateProcess(
- /*listener*/ nullptr, "trace",
- /*crash_file*/ nullptr,
- /*can_connect*/ false);
+ // This should instead try to directly create an instance of ProcessTrace.
+ // ProcessSP process_sp = target_sp->CreateProcess(
+ // /*listener*/ nullptr, "trace",
+ // /*crash_file*/ nullptr,
+ // /*can_connect*/ false);
process_sp->SetID(static_cast<lldb::pid_t>(pid));
More information about the lldb-commits
mailing list