From d877ef80bbaa62afed2c7656c5ff6e84a8628786 Mon Sep 17 00:00:00 2001 From: walter erquinigo Date: Mon, 6 Nov 2023 17:57:45 -0500 Subject: [PATCH] [LLDB] Don't forcefully initialize the process trace plugin 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. --- lldb/source/API/SystemInitializerFull.cpp | 3 --- .../Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp | 9 +++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lldb/source/API/SystemInitializerFull.cpp b/lldb/source/API/SystemInitializerFull.cpp index 27319debc8582..c48466f25ede8 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 6bed78fd83f0b..bd9cca675f2d7 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(pid));