[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


================
@@ -1705,6 +1707,24 @@ class Target : public std::enable_shared_from_this<Target>,
 
   void SaveScriptedLaunchInfo(lldb_private::ProcessInfo &process_info);
 
+  // Scripted symbol locator per-target registration.
+  Status RegisterScriptedSymbolLocator(llvm::StringRef class_name,
+                                       StructuredData::DictionarySP args_sp);
+  void ClearScriptedSymbolLocator();
+  lldb::ScriptedSymbolLocatorInterfaceSP GetScriptedSymbolLocatorInterface();
+  llvm::StringRef GetScriptedSymbolLocatorClassName() const {
+    return m_scripted_symbol_locator_metadata_sp
+               ? m_scripted_symbol_locator_metadata_sp->GetClassName()
+               : "";
+  }
+
+  /// Look up a previously cached source file resolution result.
+  /// Returns true if a cached entry exists (even if the result is nullopt).
+  bool LookupScriptedSourceFileCache(const std::string &key,
----------------
JDevlieghere wrote:

```suggestion
  bool LookupScriptedSourceFileCache(llvm::StringRef key,
```

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


More information about the lldb-commits mailing list