[lldb] Fix a thinko in 2ace1e57
authorPavel Labath <pavel@labath.sk>
Thu, 21 Oct 2021 12:01:24 +0000 (14:01 +0200)
committerPavel Labath <pavel@labath.sk>
Thu, 21 Oct 2021 12:05:49 +0000 (14:05 +0200)
An empty plugin name means we should try everything.

Picked up by the windows bot.

lldb/source/Core/PluginManager.cpp

index d4a4d04..39a4122 100644 (file)
@@ -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");