[Lldb-commits] [lldb] [lldb] Add ScriptedSymbolLocator plugin for source file resolution (PR #181334)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 13 22:56:57 PST 2026


================
@@ -311,4 +314,62 @@ ScriptedPythonInterface::ExtractValueFromPythonObject<lldb::ValueObjectListSP>(
   return out;
 }
 
+template <>
+FileSpec ScriptedPythonInterface::ExtractValueFromPythonObject<FileSpec>(
+    python::PythonObject &p, Status &error) {
+  if (lldb::SBFileSpec *sb_file_spec = reinterpret_cast<lldb::SBFileSpec *>(
+          python::LLDBSWIGPython_CastPyObjectToSBFileSpec(p.get())))
+    return m_interpreter.GetOpaqueTypeFromSBFileSpec(*sb_file_spec);
+  error = Status::FromErrorString(
+      "Couldn't cast lldb::SBFileSpec to lldb_private::FileSpec.");
----------------
JDevlieghere wrote:

Error [should](https://llvm.org/docs/CodingStandards.html#error-and-warning-messages) start with a lowercase letter. 
```suggestion
      "couldn't cast lldb::SBFileSpec to lldb_private::FileSpec.");
```
Same below.

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


More information about the lldb-commits mailing list