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

via lldb-commits lldb-commits at lists.llvm.org
Sat Feb 14 05:16:24 PST 2026


================
@@ -612,6 +621,16 @@ class ScriptInterpreter : public PluginInterface {
   lldb::ValueObjectSP
   GetOpaqueTypeFromSBValue(const lldb::SBValue &value) const;
 
+  FileSpec GetOpaqueTypeFromSBFileSpec(const lldb::SBFileSpec &file_spec) const;
+
+  ModuleSpec
+  GetOpaqueTypeFromSBModuleSpec(const lldb::SBModuleSpec &module_spec) const;
+
+  lldb::ModuleSP GetOpaqueTypeFromSBModule(const lldb::SBModule &module) const;
+
+  std::unique_ptr<lldb::SBModuleSpec>
+  MakeSBModuleSpec(const ModuleSpec &module_spec) const;
----------------
rchamala wrote:

The ctor for SBModuleSpec is private. I added `MakeSBModuleSpec` helper to avoid putting a plugin class (ScriptedPythonInterface) in the SBheader's friend list. Concern is to avoid layering violation, where a public API knows about plugin class in SBModuleSpec and took this route. Happy to change it if you think otherwise

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


More information about the lldb-commits mailing list