[Lldb-commits] [lldb] 6c88086 - [lldb] Fix a thinko in 2ace1e57

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 21 05:05:57 PDT 2021


Author: Pavel Labath
Date: 2021-10-21T14:05:49+02:00
New Revision: 6c88086ba8046884bb30a72ae1a8bea95e46f022

URL: https://github.com/llvm/llvm-project/commit/6c88086ba8046884bb30a72ae1a8bea95e46f022
DIFF: https://github.com/llvm/llvm-project/commit/6c88086ba8046884bb30a72ae1a8bea95e46f022.diff

LOG: [lldb] Fix a thinko in 2ace1e57

An empty plugin name means we should try everything.

Picked up by the windows bot.

Added: 
    

Modified: 
    lldb/source/Core/PluginManager.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Core/PluginManager.cpp b/lldb/source/Core/PluginManager.cpp
index d4a4d040ed082..39a412229d5fd 100644
--- a/lldb/source/Core/PluginManager.cpp
+++ b/lldb/source/Core/PluginManager.cpp
@@ -701,11 +701,11 @@ Status PluginManager::SaveCore(const lldb::ProcessSP &process_sp,
   Status error;
   auto &instances = GetObjectFileInstances().GetInstances();
   for (auto &instance : instances) {
-    if (instance.name.GetStringRef() != plugin_name)
-      continue;
-    if (instance.save_core &&
-        instance.save_core(process_sp, outfile, core_style, error))
-      return error;
+    if (plugin_name.empty() || instance.name.GetStringRef() == plugin_name) {
+      if (instance.save_core &&
+          instance.save_core(process_sp, outfile, core_style, error))
+        return error;
+    }
   }
   error.SetErrorString(
       "no ObjectFile plugins were able to save a core for this process");


        


More information about the lldb-commits mailing list