[Lldb-commits] [PATCH] D139249: [lldb] Add Debugger & ScriptedMetadata reference to Platform::CreateInstance

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 16 07:57:28 PST 2022


mib added inline comments.


================
Comment at: lldb/include/lldb/Interpreter/OptionGroupPlatform.h:73
   bool m_include_platform_option;
+  OptionGroupPythonClassWithDict m_class_options;
 };
----------------
labath wrote:
> labath wrote:
> > These nested groups are fairly unusual? Couldn't CommandObjectPlatformSelect just have two OptionGroup members?
> I see that this is referenced in `OptionGroupPlatform::CreatePlatformWithOptions`. Maybe that could be fixed by moving that functions somewhere else (making it a free function) and having it take the two groups as arguments? Creating a platforms seems like too high-level of a task for an option group anyway...
This special option group is used by many other scripted objects (Scripted Process, Breakpoint Callbacks, Stop Hooks, ...) since their basically an affordance to take a script name and a dictionary from the command line. I think it totally makes sense to use it here.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139249/new/

https://reviews.llvm.org/D139249



More information about the lldb-commits mailing list