[Lldb-commits] [lldb] [lldb][CommandObjectType] Print name of Python class when emitting warning about invalid synthetic provider (PR #181829)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 18 00:47:17 PST 2026


================
@@ -2181,10 +2181,12 @@ bool CommandObjectTypeSynthAdd::Execute_PythonClass(
 
   ScriptInterpreter *interpreter = GetDebugger().GetScriptInterpreter();
 
-  if (interpreter &&
-      !interpreter->CheckObjectExists(impl->GetPythonClassName()))
-    result.AppendWarning("The provided class does not exist - please define it "
-                         "before attempting to use this synthetic provider");
+  const char *python_class_name = impl->GetPythonClassName();
+  if (interpreter && !interpreter->CheckObjectExists(python_class_name))
+    result.AppendWarningWithFormatv(
+        "The provided class '{0}' does not exist - please define it "
----------------
Michael137 wrote:

> doesn't "the provided class does not exist" sound like "the thing you just gave me does not exist even though you gave it to me"?

hmm i guess technically the user did provide the class (name). Perhaps `could not find specified Python class with name '...'`?

https://github.com/llvm/llvm-project/pull/181829


More information about the lldb-commits mailing list