================
@@ -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;
----------------
labath wrote:

> I don't see how passing the debugger vs. the script interpreter would make a 
> difference if the scripted platform was created with one debugger and copied 
> to another debugger platform's list. Even if I held on the script interpreter 
> from the first debugger, once copied to the other one, the scripted platform 
> will still interact with the script interpreter from the first one, which is 
> basically the same as holding to the debugger.

It's basically the same, but it makes the intent clearer, I think.

> I'm not sure if this is a scenario we want to support, may be @jimingham 
> would have some opinions about this.

> @labath if you have some ideas how to support this scenario, I'd love to be 
> convinced :)

I am not saying we should support this scenario (I'm also not saying we should 
not). What I'm saying is that this (creating a platform with one debugger, but 
then adding it to another one) is something that can happen, so we should 
figure out what to do about it. Do we want to support it or not? Do we want to 
prevent it from happening or not?

I don't really have an answer to those, but I think we should have one..

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