================
@@ -1003,6 +1010,21 @@ class Platform : public PluginInterface {
   FileSpec GetModuleCacheRoot();
 };
 
+class PlatformMetadata {
+public:
+  PlatformMetadata(Debugger &debugger, const ScriptedMetadata metadata);
+  ~PlatformMetadata() = default;
+
+  Debugger &GetDebugger() const { return m_debugger; }
+  const ScriptedMetadata GetScriptedMetadata() const {
+    return m_scripted_metadata;
+  }
+
+protected:
+  Debugger &m_debugger;
----------------
jimingham wrote:

I don't like that idea, a scripted platform is really really going to want to 
create scripted processes.  That will be super awkward when the scripted 
platform and the scripted process can't share code because they are in 
different interpreters.  I don't want to have to explain this to people trying 
to use the lldb extension points.

I think a much simpler solution is that Debuggers have a list of Platforms 
which is where dynamically created platforms are registered, and which it 
consults first when resolving "platform for name".   Debuggers really should be 
independent of one another or things get hard to reason about.  For instance, 
it would be very strange to have `command script import` in debugger A make a 
new Platform show up in debugger B.   

So you want to keep platforms made by a debugger confined to that debugger, and 
having an "dynamic platforms" or whatever list in the debugger seems a pretty 
straightforward way of doing that.

https://github.com/llvm/llvm-project/pull/99814
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to