This change adds a new plugin-type called StructuredDataPlugin. These are detailed in depth in docs/structured_data/StructuredDataPlugins.md.
The DarwinLog feature is detailed in docs/structured_data/DarwinLog.md.
- StructuredData plugins are bound to a process.
- StructuredData features are advertised by the Process-derived class.
- ProcessGDBRemote sends off a query packet to ask about available features and wires up via Process if any plugins handle the feature.
- StructuredData producers (the process monitors) can send data asychronously via new $J packets, eligible to be sent while the target process is running. These packets are routed back to the plugins on the LLDB client side via the Process instance.
- DarwinLog makes use of this facility, and enables gathering and filtering new Fall 2016+ stream-based logging on Apple targets. The plugin to consume this is StructuredDataDarwinLog.cpp.
Other minor changes:
- Options and OptionsGroups now get constructed and store a pointer rather than reference to the CommandInterpreter. This facilitates reuse of the options parser without requiring the CommandInterpreter.
- debugserver will now log its internal logging through os_log() if os_log() is available on the platform and the LLDB_USE_OS_LOG=1 Xcode flag or define is set. This defaults to off except for the BuildAndIntegration configuration since it would otherwise fail to build on OS X 10.11 and earlier.
This change has been tested on:
macOS 10.12 Beta 3 + Xcode 8.0 Beta 3 (Xcode build)
macOS 10.11.5 + Xcode 7.3.1 (Xcode build)
macOS 10.12 Beta 3 (cmake build)
Ubuntu 16.04 x86_64 (cmake build)
The architecture of this change was substantially reviewed by Greg Clayton during implementation.