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");


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to