<div dir="ltr">Is this group needed for something? Why not just delete it? All reviews are supposed to go to lldb-commits</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 19, 2016 at 9:23 AM Todd Fiala <<a href="mailto:todd.fiala@gmail.com">todd.fiala@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">(Since it never collided before, I never had to be that precise and I always got the right entry on the list).</div><div class="gmail_extra"></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 19, 2016 at 9:22 AM, Todd Fiala <span dir="ltr"><<a href="mailto:todd.fiala@gmail.com" target="_blank">todd.fiala@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">That is indeed what happened. On July 18th, 2016, Kate created a <a href="http://reviews.llvm.org" target="_blank">reviews.llvm.org</a> entity called LLDB, which is a group that anyone can join (see link below):<div><br></div><div><a href="https://reviews.llvm.org/project/profile/39/" target="_blank">https://reviews.llvm.org/project/profile/39/</a><br></div><div><br></div><div>Up until moments ago, she was the only member of the group. (I just added myself).</div><div><br></div><div>And I see how that would truncate the auto completion of lldb-commits.</div><div><br></div><div>-Todd</div><div><br></div></div><div class="gmail_extra"><div><div class="m_3033526307865616314h5"><br><div class="gmail_quote">On Fri, Aug 19, 2016 at 8:56 AM, Todd Fiala <span dir="ltr"><<a href="mailto:todd.fiala@gmail.com" target="_blank">todd.fiala@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ah okay. I usually type LLDB and it auto completes to the right thing. I wonder if a new id with name LLDB was added - it appears to be valid - and if that short circuited my normal lookup process. I'll look into that to see if that's the case, as this probably won't be the only time when that will<span></span> happen.<div><br></div><div>-Todd<br><div><div><div><br>On Friday, August 19, 2016, Pavel Labath <<a href="mailto:labath@google.com" target="_blank">labath@google.com</a>> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>You added LLDB as a subsriber. I don't know what that is, but the<br>
correct name for the list is "lldb-commits".<br>
<br>
pl<br>
<br>
On 19 August 2016 at 04:54, Todd Fiala via lldb-commits<br>
<<a>lldb-commits@lists.llvm.org</a>> wrote:<br>
> Huh, that is totally weird. I wonder what happened there?<br>
><br>
> On Thu, Aug 18, 2016 at 8:12 PM, Zachary Turner <<a>zturner@google.com</a>> wrote:<br>
>><br>
>> Weird, you linked to a phabricator revision but i never saw it come across<br>
>> to the mailing list<br>
>><br>
>> On Thu, Aug 18, 2016 at 8:00 PM Todd Fiala via lldb-commits<br>
>> <<a>lldb-commits@lists.llvm.org</a>> wrote:<br>
>>><br>
>>> Author: tfiala<br>
>>> Date: Thu Aug 18 21:52:07 2016<br>
>>> New Revision: 279198<br>
>>><br>
>>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=279198&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=279198&view=rev</a><br>
>>> Log:<br>
>>> Add StructuredData plugin type; showcase with new DarwinLog feature<br>
>>><br>
>>> See docs/structured_data/StructuredDataPlugins.md for details.<br>
>>><br>
>>> differential review: <a href="https://reviews.llvm.org/D22976" target="_blank">https://reviews.llvm.org/D22976</a><br>
>>><br>
>>> reviewers: clayborg, jingham<br>
>>><br>
>>> Added:<br>
>>> lldb/trunk/docs/structured_data/<br>
>>> lldb/trunk/docs/structured_data/DarwinLog.md<br>
>>> lldb/trunk/docs/structured_data/StructuredDataPlugins.md<br>
>>> lldb/trunk/include/lldb/API/SBStructuredData.h<br>
>>> lldb/trunk/include/lldb/Target/StructuredDataPlugin.h<br>
>>> lldb/trunk/include/lldb/Target/ThreadPlanCallOnFunctionExit.h<br>
>>> lldb/trunk/packages/Python/lldbsuite/test/darwin_log.py<br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/TestDarwinLogBasic.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/common/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/common/darwin_log_common.h<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/TestDarwinLogFilterMatchActivityChain.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/TestDarwinLogFilterMatchActivity.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/TestDarwinLogFilterMatchCategory.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/TestDarwinLogFilterMatchMessage.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/TestDarwinLogFilterMatchSubsystem.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/TestDarwinLogFilterRegexActivityChain.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/TestDarwinLogFilterRegexActivity.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/TestDarwinLogFilterRegexCategory.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/TestDarwinLogFilterRegexMessage.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/TestDarwinLogFilterRegexSubsystem.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/format/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/format/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/format/TestDarwinLogMessageFormat.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/format/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/source/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/TestDarwinLogSourceDebug.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/TestDarwinLogSourceInfo.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/main.c<br>
>>> lldb/trunk/scripts/interface/SBStructuredData.i<br>
>>> lldb/trunk/source/API/SBStructuredData.cpp<br>
>>> lldb/trunk/source/Plugins/StructuredData/<br>
>>> lldb/trunk/source/Plugins/StructuredData/CMakeLists.txt<br>
>>> lldb/trunk/source/Plugins/StructuredData/DarwinLog/<br>
>>> lldb/trunk/source/Plugins/StructuredData/DarwinLog/CMakeLists.txt<br>
>>><br>
>>> lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp<br>
>>><br>
>>> lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h<br>
>>> lldb/trunk/source/Target/StructuredDataPlugin.cpp<br>
>>> lldb/trunk/source/Target/ThreadPlanCallOnFunctionExit.cpp<br>
>>> lldb/trunk/tools/debugserver/source/JSON.cpp<br>
>>> lldb/trunk/tools/debugserver/source/JSON.h<br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/<br>
>>><br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/ActivityStore.cpp<br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/ActivityStore.h<br>
>>><br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/ActivityStreamSPI.h<br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/CMakeLists.txt<br>
>>><br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp<br>
>>><br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.h<br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogEvent.h<br>
>>><br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogInterfaces.h<br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogTypes.h<br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/LogFilter.cpp<br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/LogFilter.h<br>
>>><br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/LogFilterChain.cpp<br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/LogFilterChain.h<br>
>>><br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/LogFilterExactMatch.cpp<br>
>>><br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/LogFilterExactMatch.h<br>
>>><br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/LogFilterRegex.cpp<br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/LogFilterRegex.h<br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/LogMessage.cpp<br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/LogMessage.h<br>
>>><br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/LogMessageOsLog.cpp<br>
>>><br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/LogMessageOsLog.h<br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/OsLogger.cpp<br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/OsLogger.h<br>
>>> Modified:<br>
>>> lldb/trunk/.gitignore<br>
>>> lldb/trunk/cmake/LLDBDependencies.cmake<br>
>>> lldb/trunk/include/lldb/API/LLDB.h<br>
>>> lldb/trunk/include/lldb/API/SBDefines.h<br>
>>> lldb/trunk/include/lldb/API/SBError.h<br>
>>> lldb/trunk/include/lldb/API/SBProcess.h<br>
>>> lldb/trunk/include/lldb/API/SBStream.h<br>
>>> lldb/trunk/include/lldb/Core/Broadcaster.h<br>
>>> lldb/trunk/include/lldb/Core/Event.h<br>
>>> lldb/trunk/include/lldb/Core/PluginManager.h<br>
>>> lldb/trunk/include/lldb/Interpreter/Args.h<br>
>>> lldb/trunk/include/lldb/Target/Process.h<br>
>>> lldb/trunk/include/lldb/lldb-forward.h<br>
>>> lldb/trunk/include/lldb/lldb-private-interfaces.h<br>
>>> lldb/trunk/lldb.xcodeproj/project.pbxproj<br>
>>> lldb/trunk/scripts/interface/SBProcess.i<br>
>>> lldb/trunk/scripts/interface/SBTarget.i<br>
>>> lldb/trunk/scripts/lldb.swig<br>
>>> lldb/trunk/source/API/CMakeLists.txt<br>
>>> lldb/trunk/source/API/SBDebugger.cpp<br>
>>> lldb/trunk/source/API/SBProcess.cpp<br>
>>> lldb/trunk/source/API/SystemInitializerFull.cpp<br>
>>> lldb/trunk/source/Core/Debugger.cpp<br>
>>> lldb/trunk/source/Core/Event.cpp<br>
>>> lldb/trunk/source/Core/PluginManager.cpp<br>
>>> lldb/trunk/source/Interpreter/Args.cpp<br>
>>> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp<br>
>>> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h<br>
>>><br>
>>> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp<br>
>>><br>
>>> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h<br>
>>> lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp<br>
>>> lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h<br>
>>> lldb/trunk/source/Target/CMakeLists.txt<br>
>>> lldb/trunk/source/Target/Platform.cpp<br>
>>> lldb/trunk/source/Target/Process.cpp<br>
>>> lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj<br>
>>> lldb/trunk/tools/debugserver/source/CMakeLists.txt<br>
>>> lldb/trunk/tools/debugserver/source/DNB.cpp<br>
>>> lldb/trunk/tools/debugserver/source/DNB.h<br>
>>> lldb/trunk/tools/debugserver/source/DNBDefs.h<br>
>>> lldb/trunk/tools/debugserver/source/MacOSX/CMakeLists.txt<br>
>>> lldb/trunk/tools/debugserver/source/RNBContext.cpp<br>
>>> lldb/trunk/tools/debugserver/source/RNBContext.h<br>
>>> lldb/trunk/tools/debugserver/source/RNBRemote.cpp<br>
>>> lldb/trunk/tools/debugserver/source/RNBRemote.h<br>
>>> lldb/trunk/tools/debugserver/source/debugserver.cpp<br>
>>> lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.cpp<br>
>>> lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp<br>
>>><br>
>>> Modified: lldb/trunk/.gitignore<br>
>>> URL:<br>
>>> <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/.gitignore?rev=279198&r1=279197&r2=279198&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/.gitignore?rev=279198&r1=279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================================================================<br>
>>> --- lldb/trunk/.gitignore (original)<br>
>>> +++ lldb/trunk/.gitignore Thu Aug 18 21:52:07 2016<br>
>>> @@ -40,7 +40,18 @@ __pycache__/<br>
>>><br>
>>> clang-module-cache<br>
>>><br>
>>> +# Skip ctags-style tags files<br>
>>> +tags<br>
>>> +<br>
>>> # We should ignore Xcode-style embedding of llvm/ at lldb root dir.<br>
>>> # Do not add trailing '/'s, they skip symlinks.<br>
>>> /llvm<br>
>>> /DerivedData<br>
>>> +<br>
>>> +# Ignore test trace directories.<br>
>>> +20??-??-??-??_??_??/<br>
>>> +<br>
>>> +# Ignore crashlog support files.<br>
>>> +crashinfo.lock<br>
>>> +crashinfo.so<br>
>>> +<br>
>>><br>
>>> Modified: lldb/trunk/cmake/LLDBDependencies.cmake<br>
>>> URL:<br>
>>> <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/LLDBDependencies.cmake?rev=279198&r1=279197&r2=279198&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/LLDBDependencies.cmake?rev=279198&r1=279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================================================================<br>
>>> --- lldb/trunk/cmake/LLDBDependencies.cmake (original)<br>
>>> +++ lldb/trunk/cmake/LLDBDependencies.cmake Thu Aug 18 21:52:07 2016<br>
>>> @@ -47,6 +47,7 @@ set( LLDB_USED_LIBS<br>
>>> lldbPluginObjectContainerMachOArchive<br>
>>> lldbPluginObjectContainerBSDArchive<br>
>>> lldbPluginPlatformMacOSX<br>
>>> + lldbPluginStructuredDataDarwinLog<br>
>>> lldbPluginDynamicLoaderMacOSXDYLD<br>
>>> lldbPluginUnwindAssemblyInstEmulation<br>
>>> lldbPluginUnwindAssemblyX86<br>
>>><br>
>>> Added: lldb/trunk/docs/structured_data/DarwinLog.md<br>
>>> URL:<br>
>>> <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/docs/structured_data/DarwinLog.md?rev=279198&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/docs/structured_data/DarwinLog.md?rev=279198&view=auto</a><br>
>>><br>
>>> ==============================================================================<br>
>>> --- lldb/trunk/docs/structured_data/DarwinLog.md (added)<br>
>>> +++ lldb/trunk/docs/structured_data/DarwinLog.md Thu Aug 18 21:52:07 2016<br>
>>> @@ -0,0 +1,160 @@<br>
>>> +# Change Notes<br>
>>> +<br>
>>> +## Summary<br>
>>> +<br>
>>> +This document describes the DarwinLog logging feature.<br>
>>> +<br>
>>> +## StructuredDataDarwinLog feature<br>
>>> +<br>
>>> +The DarwinLog feature supports logging os_log*() and NSLog() messages<br>
>>> +to the command-line lldb console, as well as making those messages<br>
>>> +available to LLDB clients via the event system. Starting with fall<br>
>>> +2016 OSes, Apple platforms introduce a new fire-hose, stream-style<br>
>>> +logging system where the bulk of the log processing happens on the log<br>
>>> +consumer side. This reduces logging impact on the system when there<br>
>>> +are no consumers, making it cheaper to include logging at all times.<br>
>>> +However, it also increases the work needed on the consumer end when<br>
>>> +log messages are desired.<br>
>>> +<br>
>>> +The debugserver binary has been modified to support collection of<br>
>>> +os_log*()/NSLog() messages, selection of which messages appear in the<br>
>>> +stream, and fine-grained filtering of what gets passed on to the LLDB<br>
>>> +client. DarwinLog also tracks the activity chain (i.e. os_activity()<br>
>>> +hierarchy) in effect at the time the log messages were issued. The<br>
>>> +user is able to configure a number of aspects related to the<br>
>>> +formatting of the log message header fields.<br>
>>> +<br>
>>> +The DarwinLog support is written in a way which should support the<br>
>>> +lldb client side on non-Apple clients talking to an Apple device or<br>
>>> +macOS system; hence, the plugin support is built into all LLDB<br>
>>> +clients, not just those built on an Apple platform.<br>
>>> +<br>
>>> +StructuredDataDarwinLog implements the 'DarwinLog' feature type, and<br>
>>> +the plugin name for it shows up as 'darwin-log'.<br>
>>> +<br>
>>> +The user interface to the darwin-log support is via the following:<br>
>>> +<br>
>>> +* 'plugin structured-data darwin-log enable' command<br>
>>> +<br>
>>> + This is the main entry point for enabling the command. It can be<br>
>>> + set before launching a process or while the process is running.<br>
>>> + If the user wants to squelch seeing info-level or debug-level<br>
>>> + messages, which is the default behavior, then the enable command<br>
>>> + must be made prior to launching the process; otherwise, the<br>
>>> + info-level and debug-level messages will always show up. Also,<br>
>>> + there is a similar "echo os_log()/NSLog() messages to target<br>
>>> + process stderr" mechanism which is properly disabled when enabling<br>
>>> + the DarwinLog support prior to launch. This cannot be squelched<br>
>>> + if enabling DarwinLog after launch.<br>
>>> +<br>
>>> + See the help for this command. There are a number of options<br>
>>> + to shrink or expand the number of messages that are processed<br>
>>> + on the remote side and sent over to the client, and other<br>
>>> + options to control the formatting of messages displayed.<br>
>>> +<br>
>>> + This command is sticky. Once enabled, it will stay enabled for<br>
>>> + future process launches.<br>
>>> +<br>
>>> +* 'plugin structured-data darwin-log disable' command<br>
>>> +<br>
>>> + Executing this command disables os_log() capture in the currently<br>
>>> + running process and signals LLDB to stop attempting to launch<br>
>>> + new processes with DarwinLog support enabled.<br>
>>> +<br>
>>> +* 'settings set \<br>
>>> + plugin.structured-data.darwin-log.enable-on-startup'<br>
>>> +<br>
>>> + and<br>
>>> +<br>
>>> + 'settings set \<br>
>>> + plugin.structured-data.darwin-log.auto-enable-options -- {options}'<br>
>>> +<br>
>>> + When enable-on-startup is set to true, then LLDB will automatically<br>
>>> + enable DarwinLog on startup of relevant processes. It will use the<br>
>>> + content provided in the auto-enable-options settings as the<br>
>>> + options to pass to the enable command.<br>
>>> +<br>
>>> + Note the '--' required after auto-enable-command. That is necessary<br>
>>> + for raw commands like settings set. The '--' will not become part<br>
>>> + of the options for the enable command.<br>
>>> +<br>
>>> +### Message flow and related performance considerations<br>
>>> +<br>
>>> +os_log()-style collection is not free. The more data that must be<br>
>>> +processed, the slower it will be. There are several knobs available<br>
>>> +to the developer to limit how much data goes through the pipe, and how<br>
>>> +much data ultimately goes over the wire to the LLDB client. The<br>
>>> +user's goal should be to ensure he or she only collects as many log<br>
>>> +messages are needed, but no more.<br>
>>> +<br>
>>> +The flow of data looks like the following:<br>
>>> +<br>
>>> +1. Data comes into debugserver from the low-level OS facility that<br>
>>> + receives log messages. The data that comes through this pipe can<br>
>>> + be limited or expanded by the '--debug', '--info' and<br>
>>> + '--all-processes' options of the 'plugin structured-data darwin-log<br>
>>> + enable' command. options. Exclude as many categories as possible<br>
>>> + here (also the default). The knobs here are very coarse - for<br>
>>> + example, whether to include os_log_info()-level or<br>
>>> + os_log_debug()-level info, or to include callstacks in the log<br>
>>> + message event data.<br>
>>> +<br>
>>> +2. The debugserver process filters the messages that arrive through a<br>
>>> + message log filter that may be fully customized by the user. It<br>
>>> + works similar to a rules-based packet filter: a set of rules are<br>
>>> + matched against the log message, each rule tried in sequential<br>
>>> + order. The first rule that matches then either accepts or rejects<br>
>>> + the message. If the log message does not match any rule, then the<br>
>>> + message gets the no-match (i.e. fall-through) action. The no-match<br>
>>> + action defaults to accepting but may be set to reject.<br>
>>> +<br>
>>> + Filters can be added via the enable command's '--filter<br>
>>> + {filter-spec}' option. Filters are added in order, and multiple<br>
>>> + --filter entries can be provided to the enable command.<br>
>>> +<br>
>>> + Filters take the following form:<br>
>>> +<br>
>>> + {action} {attribute} {op}<br>
>>> +<br>
>>> + {action} :=<br>
>>> + accept |<br>
>>> + reject<br>
>>> +<br>
>>> + {attribute} :=<br>
>>> + category | // The log message category<br>
>>> + subsystem | // The log message subsystem}<br>
>>> + activity | // The child-most activity in force<br>
>>> + // at the time the message was logged.<br>
>>> + activity-chain | // The complete activity chain, specified<br>
>>> + // as {parent-activity}:{child-activity}:<br>
>>> + // {grandchild-activity}<br>
>>> + message | // The fully expanded message contents.<br>
>>> + // Note this one is expensive because it<br>
>>> + // requires expanding the message. Avoid<br>
>>> + // this if possible, or add it further<br>
>>> + // down the filter chain.<br>
>>> +<br>
>>> + {op} :=<br>
>>> + match {exact-match-text} |<br>
>>> + regex {search-regex} // uses C++ std::regex<br>
>>> + // ECMAScript variant.<br>
>>> +<br>
>>> +e.g.<br>
>>> + --filter "accept subsystem match com.example.mycompany.myproduct"<br>
>>> + --filter "accept subsystem regex com.example.+"<br>
>>> + --filter "reject category regex spammy-system-[[:digit:]]+"<br>
>>> +<br>
>>> +3. Messages that are accepted by the log message filter get sent to<br>
>>> + the lldb client, where they are mapped to the<br>
>>> + StructuredDataDarwinLog plugin. By default, command-line lldb will<br>
>>> + issue a Process-level event containing the log message content, and<br>
>>> + will request the plugin to print the message if the plugin is<br>
>>> + enabled to do so.<br>
>>> +<br>
>>> +### Log message display<br>
>>> +<br>
>>> +Several settings control aspects of displaying log messages in<br>
>>> +command-line LLDB. See the enable command's help for a description<br>
>>> +of these.<br>
>>> +<br>
>>> +<br>
>>><br>
>>> Added: lldb/trunk/docs/structured_data/StructuredDataPlugins.md<br>
>>> URL:<br>
>>> <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/docs/structured_data/StructuredDataPlugins.md?rev=279198&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/docs/structured_data/StructuredDataPlugins.md?rev=279198&view=auto</a><br>
>>><br>
>>> ==============================================================================<br>
>>> --- lldb/trunk/docs/structured_data/StructuredDataPlugins.md (added)<br>
>>> +++ lldb/trunk/docs/structured_data/StructuredDataPlugins.md Thu Aug 18<br>
>>> 21:52:07 2016<br>
>>> @@ -0,0 +1,136 @@<br>
>>> +# Change Notes<br>
>>> +<br>
>>> +## Overview<br>
>>> +<br>
>>> +This document describes an infrastructural feature called Structured<br>
>>> +Data plugins. See the DarwinLog.md doc for a description of one<br>
>>> +such plugin that makes use of this feature.<br>
>>> +<br>
>>> +## StructuredDataPlugin<br>
>>> +<br>
>>> +StructuredDataPlugin instances have the following characteristics:<br>
>>> +<br>
>>> +* Each plugin instance is bound to a single Process instance.<br>
>>> +<br>
>>> +* Each StructuredData feature has a type name that identifies the<br>
>>> + feature. For instance, the type name for the DarwinLog feature is<br>
>>> + "DarwinLog". This feature type name is used in various places.<br>
>>> +<br>
>>> +* The process monitor reports the list of supported StructuredData<br>
>>> + features advertised by the process monitor. Process goes through the<br>
>>> + list of supported feature type names, and asks each known<br>
>>> + StructuredDataPlugin if it can handle the feature. The first plugin<br>
>>> + that supports the feature is mapped to that Process instance for<br>
>>> + that feature. Plugins are only mapped when the process monitor<br>
>>> + advertises that a feature is supported.<br>
>>> +<br>
>>> +* The feature may send asynchronous messages in StructuredData format<br>
>>> + to the Process instance. Process instances route the asynchronous<br>
>>> + structured data messages to the plugin mapped to that feature type,<br>
>>> + if one exists.<br>
>>> +<br>
>>> +* Plugins can request that the Process instance forward on<br>
>>> + configuration data to the process monitor if the plugin needs/wants<br>
>>> + to configure the feature. Plugins may call the new Process method<br>
>>> +<br>
>>> + ```C++<br>
>>> + virtual Error<br>
>>> + ConfigureStructuredData(const ConstString &type_name,<br>
>>> + const StructuredData::ObjectSP &config_sp)<br>
>>> + ```<br>
>>> +<br>
>>> + where type_name is the feature name and config_sp points to the<br>
>>> + configuration structured data, which may be nullptr.<br>
>>> +<br>
>>> +* Plugins for features present in a process are notified when modules<br>
>>> + are loaded into the Process instance via this StructuredDataPlugin<br>
>>> + method:<br>
>>> +<br>
>>> + ```C++<br>
>>> + virtual void<br>
>>> + ModulesDidLoad(Process &process, ModuleList &module_list);<br>
>>> + ```<br>
>>> +<br>
>>> +* Plugins may optionally broadcast their received structured data as<br>
>>> + an LLDB process-level event via the following new Process call:<br>
>>> +<br>
>>> + ```C++<br>
>>> + void<br>
>>> + BroadcastStructuredData(const StructuredData::ObjectSP &object_sp,<br>
>>> + const lldb::StructuredDataPluginSP<br>
>>> &plugin_sp);<br>
>>> + ```<br>
>>> +<br>
>>> + IDE clients might use this feature to receive information about the<br>
>>> + process as it is running to monitor memory usage, CPU usage, and<br>
>>> + logging.<br>
>>> +<br>
>>> + Internally, the event type created is an instance of<br>
>>> + EventDataStructuredData.<br>
>>> +<br>
>>> +* In the case where a plugin chooses to broadcast a received<br>
>>> + StructuredData event, the command-line LLDB Debugger instance<br>
>>> + listens for them. The Debugger instance then gives the plugin an<br>
>>> + opportunity to display info to either the debugger output or error<br>
>>> + stream at a time that is safe to write to them. The plugin can<br>
>>> + choose to display something appropriate regarding the structured<br>
>>> + data that time.<br>
>>> +<br>
>>> +* Plugins can provide a ProcessLaunchInfo filter method when the<br>
>>> + plugin is registered. If such a filter method is provided, then<br>
>>> + when a process is about to be launched for debugging, the filter<br>
>>> + callback is invoked, given both the launch info and the target. The<br>
>>> + plugin may then alter the launch info if needed to better support<br>
>>> + the feature of the plugin.<br>
>>> +<br>
>>> +* The plugin is entirely independent of the type of Process-derived<br>
>>> + class that it is working with. The only requirements from the<br>
>>> + process monitor are the following feature-agnostic elements:<br>
>>> +<br>
>>> + * Provide a way to discover features supported by the process<br>
>>> + monitor for the current process.<br>
>>> +<br>
>>> + * Specify the list of supported feature type names to Process.<br>
>>> + The process monitor does this by calling the following new<br>
>>> + method on Process:<br>
>>> +<br>
>>> + ```C++<br>
>>> + void<br>
>>> + MapSupportedStructuredDataPlugins(const StructuredData::Array<br>
>>> + &supported_type_names)<br>
>>> + ```<br>
>>> +<br>
>>> + The supported_type_names specifies an array of string entries,<br>
>>> + where each entry specifies the name of a StructuredData feature.<br>
>>> +<br>
>>> + * Provide a way to forward on configuration data for a feature type<br>
>>> + to the process monitor. This is the manner by which LLDB can<br>
>>> + configure a feature, perhaps based on settings or commands from<br>
>>> + the user. The following virtual method on Process (described<br>
>>> + earlier) does the job:<br>
>>> +<br>
>>> + ```C++<br>
>>> + virtual Error<br>
>>> + ConfigureStructuredData(const ConstString &type_name,<br>
>>> + const StructuredData::ObjectSP &config_sp)<br>
>>> + ```<br>
>>> +<br>
>>> + * Listen for asynchronous structured data packets from the process<br>
>>> + monitor, and forward them on to Process via this new Process<br>
>>> + member method:<br>
>>> +<br>
>>> + ```C++<br>
>>> + bool<br>
>>> + RouteAsyncStructuredData(const StructuredData::ObjectSP object_sp)<br>
>>> + ```<br>
>>> +<br>
>>> +* StructuredData producers must send their top-level data as a<br>
>>> + Dictionary type, with a key called 'type' specifying a string value,<br>
>>> + where the value is equal to the StructuredData feature/type name<br>
>>> + previously advertised. Everything else about the content of the<br>
>>> + dictionary is entirely up to the feature.<br>
>>> +<br>
>>> +* StructuredDataPlugin commands show up under 'plugin structured-data<br>
>>> + plugin-name'.<br>
>>> +<br>
>>> +* StructuredDataPlugin settings show up under<br>
>>> + 'plugin.structured-data.{plugin-name}.<br>
>>><br>
>>> Modified: lldb/trunk/include/lldb/API/LLDB.h<br>
>>> URL:<br>
>>> <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/LLDB.h?rev=279198&r1=279197&r2=279198&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/LLDB.h?rev=279198&r1=279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================================================================<br>
>>> --- lldb/trunk/include/lldb/API/LLDB.h (original)<br>
>>> +++ lldb/trunk/include/lldb/API/LLDB.h Thu Aug 18 21:52:07 2016<br>
>>> @@ -55,6 +55,7 @@<br>
>>> #include "lldb/API/SBSourceManager.h"<br>
>>> #include "lldb/API/SBStream.h"<br>
>>> #include "lldb/API/SBStringList.h"<br>
>>> +#include "lldb/API/SBStructuredData.h"<br>
>>> #include "lldb/API/SBSymbol.h"<br>
>>> #include "lldb/API/SBSymbolContext.h"<br>
>>> #include "lldb/API/SBSymbolContextList.h"<br>
>>><br>
>>> Modified: lldb/trunk/include/lldb/API/SBDefines.h<br>
>>> URL:<br>
>>> <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDefines.h?rev=279198&r1=279197&r2=279198&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDefines.h?rev=279198&r1=279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================================================================<br>
>>> --- lldb/trunk/include/lldb/API/SBDefines.h (original)<br>
>>> +++ lldb/trunk/include/lldb/API/SBDefines.h Thu Aug 18 21:52:07 2016<br>
>>> @@ -71,6 +71,7 @@ class LLDB_API SBSection;<br>
>>> class LLDB_API SBSourceManager;<br>
>>> class LLDB_API SBStream;<br>
>>> class LLDB_API SBStringList;<br>
>>> +class LLDB_API SBStructuredData;<br>
>>> class LLDB_API SBSymbol;<br>
>>> class LLDB_API SBSymbolContext;<br>
>>> class LLDB_API SBSymbolContextList;<br>
>>><br>
>>> Modified: lldb/trunk/include/lldb/API/SBError.h<br>
>>> URL:<br>
>>> <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBError.h?rev=279198&r1=279197&r2=279198&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBError.h?rev=279198&r1=279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================================================================<br>
>>> --- lldb/trunk/include/lldb/API/SBError.h (original)<br>
>>> +++ lldb/trunk/include/lldb/API/SBError.h Thu Aug 18 21:52:07 2016<br>
>>> @@ -73,6 +73,7 @@ protected:<br>
>>> friend class SBHostOS;<br>
>>> friend class SBPlatform;<br>
>>> friend class SBProcess;<br>
>>> + friend class SBStructuredData;<br>
>>> friend class SBThread;<br>
>>> friend class SBTarget;<br>
>>> friend class SBValue;<br>
>>><br>
>>> Modified: lldb/trunk/include/lldb/API/SBProcess.h<br>
>>> URL:<br>
>>> <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBProcess.h?rev=279198&r1=279197&r2=279198&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBProcess.h?rev=279198&r1=279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================================================================<br>
>>> --- lldb/trunk/include/lldb/API/SBProcess.h (original)<br>
>>> +++ lldb/trunk/include/lldb/API/SBProcess.h Thu Aug 18 21:52:07 2016<br>
>>> @@ -32,7 +32,8 @@ public:<br>
>>> eBroadcastBitInterrupt = (1 << 1),<br>
>>> eBroadcastBitSTDOUT = (1 << 2),<br>
>>> eBroadcastBitSTDERR = (1 << 3),<br>
>>> - eBroadcastBitProfileData = (1 << 4)<br>
>>> + eBroadcastBitProfileData = (1 << 4),<br>
>>> + eBroadcastBitStructuredData = (1 << 5)<br>
>>> };<br>
>>><br>
>>> SBProcess ();<br>
>>> @@ -278,10 +279,16 @@ public:<br>
>>><br>
>>> static bool<br>
>>> GetInterruptedFromEvent (const lldb::SBEvent &event);<br>
>>> -<br>
>>> +<br>
>>> + static lldb::SBStructuredData<br>
>>> + GetStructuredDataFromEvent (const lldb::SBEvent &event);<br>
>>> +<br>
>>> static bool<br>
>>> EventIsProcessEvent (const lldb::SBEvent &event);<br>
>>><br>
>>> + static bool<br>
>>> + EventIsStructuredDataEvent (const lldb::SBEvent &event);<br>
>>> +<br>
>>> lldb::SBBroadcaster<br>
>>> GetBroadcaster () const;<br>
>>><br>
>>><br>
>>> Modified: lldb/trunk/include/lldb/API/SBStream.h<br>
>>> URL:<br>
>>> <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBStream.h?rev=279198&r1=279197&r2=279198&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBStream.h?rev=279198&r1=279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================================================================<br>
>>> --- lldb/trunk/include/lldb/API/SBStream.h (original)<br>
>>> +++ lldb/trunk/include/lldb/API/SBStream.h Thu Aug 18 21:52:07 2016<br>
>>> @@ -83,6 +83,7 @@ protected:<br>
>>> friend class SBProcess;<br>
>>> friend class SBSection;<br>
>>> friend class SBSourceManager;<br>
>>> + friend class SBStructuredData;<br>
>>> friend class SBSymbol;<br>
>>> friend class SBSymbolContext;<br>
>>> friend class SBSymbolContextList;<br>
>>><br>
>>> Added: lldb/trunk/include/lldb/API/SBStructuredData.h<br>
>>> URL:<br>
>>> <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBStructuredData.h?rev=279198&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBStructuredData.h?rev=279198&view=auto</a><br>
>>><br>
>>> ==============================================================================<br>
>>> --- lldb/trunk/include/lldb/API/SBStructuredData.h (added)<br>
>>> +++ lldb/trunk/include/lldb/API/SBStructuredData.h Thu Aug 18 21:52:07<br>
>>> 2016<br>
>>> @@ -0,0 +1,52 @@<br>
>>> +//===-- SBStructuredData.h --------------------------------------*- C++<br>
>>> -*-===//<br>
>>> +//<br>
>>> +// The LLVM Compiler Infrastructure<br>
>>> +//<br>
>>> +// This file is distributed under the University of Illinois Open Source<br>
>>> +// License. See LICENSE.TXT for details.<br>
>>> +//<br>
>>><br>
>>> +//===----------------------------------------------------------------------===//<br>
>>> +<br>
>>> +#ifndef SBStructuredData_h<br>
>>> +#define SBStructuredData_h<br>
>>> +<br>
>>> +#include "lldb/API/SBDefines.h"<br>
>>> +#include "lldb/API/SBModule.h"<br>
>>> +<br>
>>> +namespace lldb {<br>
>>> +<br>
>>> + class SBStructuredData<br>
>>> + {<br>
>>> + public:<br>
>>> +<br>
>>> + SBStructuredData();<br>
>>> +<br>
>>> + SBStructuredData(const lldb::SBStructuredData &rhs);<br>
>>> +<br>
>>> + SBStructuredData(const lldb::EventSP &event_sp);<br>
>>> +<br>
>>> + ~SBStructuredData();<br>
>>> +<br>
>>> + lldb::SBStructuredData &<br>
>>> + operator =(const lldb::SBStructuredData &rhs);<br>
>>> +<br>
>>> + bool<br>
>>> + IsValid() const;<br>
>>> +<br>
>>> + void<br>
>>> + Clear();<br>
>>> +<br>
>>> + lldb::SBError<br>
>>> + GetAsJSON(lldb::SBStream &stream) const;<br>
>>> +<br>
>>> + lldb::SBError<br>
>>> + GetDescription(lldb::SBStream &stream) const;<br>
>>> +<br>
>>> + private:<br>
>>> +<br>
>>> + class Impl;<br>
>>> + std::unique_ptr<Impl> m_impl_up;<br>
>>> + };<br>
>>> +}<br>
>>> +<br>
>>> +#endif /* SBStructuredData_h */<br>
>>><br>
>>> Modified: lldb/trunk/include/lldb/Core/Broadcaster.h<br>
>>> URL:<br>
>>> <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Broadcaster.h?rev=279198&r1=279197&r2=279198&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Broadcaster.h?rev=279198&r1=279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================================================================<br>
>>> --- lldb/trunk/include/lldb/Core/Broadcaster.h (original)<br>
>>> +++ lldb/trunk/include/lldb/Core/Broadcaster.h Thu Aug 18 21:52:07 2016<br>
>>> @@ -272,11 +272,10 @@ private:<br>
>>> /// //----------------------------------------------------------<br>
>>> /// enum<br>
>>> /// {<br>
>>> -/// eBroadcastBitStateChanged = (1 << 0),<br>
>>> -/// eBroadcastBitInterrupt = (1 << 1),<br>
>>> -/// eBroadcastBitSTDOUT = (1 << 2),<br>
>>> -/// eBroadcastBitSTDERR = (1 << 3),<br>
>>> -/// eBroadcastBitProfileData = (1 << 4)<br>
>>> +/// eBroadcastBitOne = (1 << 0),<br>
>>> +/// eBroadcastBitTwo = (1 << 1),<br>
>>> +/// eBroadcastBitThree = (1 << 2),<br>
>>> +/// ...<br>
>>> /// };<br>
>>> /// \endcode<br>
>>> //----------------------------------------------------------------------<br>
>>><br>
>>> Modified: lldb/trunk/include/lldb/Core/Event.h<br>
>>> URL:<br>
>>> <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Event.h?rev=279198&r1=279197&r2=279198&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Event.h?rev=279198&r1=279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================================================================<br>
>>> --- lldb/trunk/include/lldb/Core/Event.h (original)<br>
>>> +++ lldb/trunk/include/lldb/Core/Event.h Thu Aug 18 21:52:07 2016<br>
>>> @@ -20,6 +20,7 @@<br>
>>> // Project includes<br>
>>> #include "lldb/lldb-private.h"<br>
>>> #include "lldb/Core/ConstString.h"<br>
>>> +#include "lldb/Core/StructuredData.h"<br>
>>> #include "lldb/Host/Predicate.h"<br>
>>> #include "lldb/Core/Broadcaster.h"<br>
>>><br>
>>> @@ -159,6 +160,80 @@ private:<br>
>>> };<br>
>>><br>
>>> //----------------------------------------------------------------------<br>
>>> +/// This class handles one or more StructuredData::Dictionary entries<br>
>>> +/// that are raised for structured data events.<br>
>>> +//----------------------------------------------------------------------<br>
>>> +<br>
>>> +class EventDataStructuredData : public EventData<br>
>>> +{<br>
>>> +public:<br>
>>> +<br>
>>> + //------------------------------------------------------------------<br>
>>> + // Constructors<br>
>>> + //------------------------------------------------------------------<br>
>>> + EventDataStructuredData();<br>
>>> +<br>
>>> + EventDataStructuredData(const lldb::ProcessSP &process_sp,<br>
>>> + const StructuredData::ObjectSP &object_sp,<br>
>>> + const lldb::StructuredDataPluginSP<br>
>>> &plugin_sp);<br>
>>> +<br>
>>> + ~EventDataStructuredData() override;<br>
>>> +<br>
>>> + //------------------------------------------------------------------<br>
>>> + // Member functions<br>
>>> + //------------------------------------------------------------------<br>
>>> + const ConstString &<br>
>>> + GetFlavor() const override;<br>
>>> +<br>
>>> + void<br>
>>> + Dump(Stream *s) const override;<br>
>>> +<br>
>>> + const lldb::ProcessSP&<br>
>>> + GetProcess() const;<br>
>>> +<br>
>>> + const StructuredData::ObjectSP&<br>
>>> + GetObject() const;<br>
>>> +<br>
>>> + const lldb::StructuredDataPluginSP&<br>
>>> + GetStructuredDataPlugin() const;<br>
>>> +<br>
>>> + void<br>
>>> + SetProcess(const lldb::ProcessSP &process_sp);<br>
>>> +<br>
>>> + void<br>
>>> + SetObject(const StructuredData::ObjectSP &object_sp);<br>
>>> +<br>
>>> + void<br>
>>> + SetStructuredDataPlugin(const lldb::StructuredDataPluginSP<br>
>>> &plugin_sp);<br>
>>> +<br>
>>> + //------------------------------------------------------------------<br>
>>> + // Static functions<br>
>>> + //------------------------------------------------------------------<br>
>>> + static const EventDataStructuredData*<br>
>>> + GetEventDataFromEvent(const Event *event_ptr);<br>
>>> +<br>
>>> + static lldb::ProcessSP<br>
>>> + GetProcessFromEvent(const Event *event_ptr);<br>
>>> +<br>
>>> + static StructuredData::ObjectSP<br>
>>> + GetObjectFromEvent(const Event *event_ptr);<br>
>>> +<br>
>>> + static lldb::StructuredDataPluginSP<br>
>>> + GetPluginFromEvent(const Event *event_ptr);<br>
>>> +<br>
>>> + static const ConstString &<br>
>>> + GetFlavorString ();<br>
>>> +<br>
>>> +private:<br>
>>> +<br>
>>> + lldb::ProcessSP m_process_sp;<br>
>>> + StructuredData::ObjectSP m_object_sp;<br>
>>> + lldb::StructuredDataPluginSP m_plugin_sp;<br>
>>> +<br>
>>> + DISALLOW_COPY_AND_ASSIGN(EventDataStructuredData);<br>
>>> +};<br>
>>> +<br>
>>> +//----------------------------------------------------------------------<br>
>>> // lldb::Event<br>
>>> //----------------------------------------------------------------------<br>
>>> class Event<br>
>>><br>
>>> Modified: lldb/trunk/include/lldb/Core/PluginManager.h<br>
>>> URL:<br>
>>> <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/PluginManager.h?rev=279198&r1=279197&r2=279198&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/PluginManager.h?rev=279198&r1=279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================================================================<br>
>>> --- lldb/trunk/include/lldb/Core/PluginManager.h (original)<br>
>>> +++ lldb/trunk/include/lldb/Core/PluginManager.h Thu Aug 18 21:52:07 2016<br>
>>> @@ -328,6 +328,65 @@ public:<br>
>>> CommandInterpreter &interpreter);<br>
>>><br>
>>> //------------------------------------------------------------------<br>
>>> + // StructuredDataPlugin<br>
>>> + //------------------------------------------------------------------<br>
>>> +<br>
>>> + //------------------------------------------------------------------<br>
>>> + /// Register a StructuredDataPlugin class along with optional<br>
>>> + /// callbacks for debugger initialization and Process launch info<br>
>>> + /// filtering and manipulation.<br>
>>> + ///<br>
>>> + /// @param[in] name<br>
>>> + /// The name of the plugin.<br>
>>> + ///<br>
>>> + /// @param[in] description<br>
>>> + /// A description string for the plugin.<br>
>>> + ///<br>
>>> + /// @param[in] create_callback<br>
>>> + /// The callback that will be invoked to create an instance of<br>
>>> + /// the callback. This may not be nullptr.<br>
>>> + ///<br>
>>> + /// @param[in] debugger_init_callback<br>
>>> + /// An optional callback that will be made when a Debugger<br>
>>> + /// instance is initialized.<br>
>>> + ///<br>
>>> + /// @param[in] filter_callback<br>
>>> + /// An optional callback that will be invoked before LLDB<br>
>>> + /// launches a process for debugging. The callback must<br>
>>> + /// do the following:<br>
>>> + /// 1. Only do something if the plugin's behavior is enabled.<br>
>>> + /// 2. Only make changes for processes that are relevant to the<br>
>>> + /// plugin. The callback gets a pointer to the Target, which<br>
>>> + /// can be inspected as needed. The ProcessLaunchInfo is<br>
>>> + /// provided in read-write mode, and may be modified by the<br>
>>> + /// plugin if, for instance, additional environment variables<br>
>>> + /// are needed to support the feature when enabled.<br>
>>> + ///<br>
>>> + /// @return<br>
>>> + /// Returns true upon success; otherwise, false.<br>
>>> + //------------------------------------------------------------------<br>
>>> + static bool<br>
>>> + RegisterPlugin(const ConstString &name,<br>
>>> + const char *description,<br>
>>> + StructuredDataPluginCreateInstance create_callback,<br>
>>> + DebuggerInitializeCallback debugger_init_callback =<br>
>>> nullptr,<br>
>>> + StructuredDataFilterLaunchInfo filter_callback<br>
>>> + = nullptr);<br>
>>> +<br>
>>> + static bool<br>
>>> + UnregisterPlugin(StructuredDataPluginCreateInstance<br>
>>> create_callback);<br>
>>> +<br>
>>> + static StructuredDataPluginCreateInstance<br>
>>> + GetStructuredDataPluginCreateCallbackAtIndex(uint32_t idx);<br>
>>> +<br>
>>> + static StructuredDataPluginCreateInstance<br>
>>> + GetStructuredDataPluginCreateCallbackForPluginName(const ConstString<br>
>>> &name);<br>
>>> +<br>
>>> + static StructuredDataFilterLaunchInfo<br>
>>> + GetStructuredDataFilterCallbackAtIndex(uint32_t idx,<br>
>>> + bool &iteration_complete);<br>
>>> +<br>
>>> + //------------------------------------------------------------------<br>
>>> // SymbolFile<br>
>>> //------------------------------------------------------------------<br>
>>> static bool<br>
>>> @@ -531,6 +590,16 @@ public:<br>
>>> static bool CreateSettingForOperatingSystemPlugin(Debugger<br>
>>> &debugger,<br>
>>> const<br>
>>> lldb::OptionValuePropertiesSP &properties_sp,<br>
>>> const ConstString<br>
>>> &description, bool is_global_property);<br>
>>> +<br>
>>> + static lldb::OptionValuePropertiesSP<br>
>>> + GetSettingForStructuredDataPlugin(Debugger &debugger,<br>
>>> + const ConstString &setting_name);<br>
>>> +<br>
>>> + static bool<br>
>>> + CreateSettingForStructuredDataPlugin(Debugger &debugger,<br>
>>> + const<br>
>>> lldb::OptionValuePropertiesSP &properties_sp,<br>
>>> + const ConstString &description,<br>
>>> + bool is_global_property);<br>
>>> };<br>
>>><br>
>>> } // namespace lldb_private<br>
>>><br>
>>> Modified: lldb/trunk/include/lldb/Interpreter/Args.h<br>
>>> URL:<br>
>>> <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Args.h?rev=279198&r1=279197&r2=279198&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Args.h?rev=279198&r1=279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================================================================<br>
>>> --- lldb/trunk/include/lldb/Interpreter/Args.h (original)<br>
>>> +++ lldb/trunk/include/lldb/Interpreter/Args.h Thu Aug 18 21:52:07 2016<br>
>>> @@ -451,6 +451,17 @@ public:<br>
>>> LongestCommonPrefix (std::string &common_prefix);<br>
>>><br>
>>> //------------------------------------------------------------------<br>
>>> + /// Add or replace an environment variable with the given value.<br>
>>> + ///<br>
>>> + /// This command adds the environment variable if it is not already<br>
>>> + /// present using the given value. If the environment variable is<br>
>>> + /// already in the list, it replaces the first such occurrence<br>
>>> + /// with the new value.<br>
>>> + //------------------------------------------------------------------<br>
>>> + void<br>
>>> + AddOrReplaceEnvironmentVariable(const char *env_var_name,<br>
>>> + const char *new_value);<br>
>>> +<br>
>>> /// Return whether a given environment variable exists.<br>
>>> ///<br>
>>> /// This command treats Args like a list of environment variables,<br>
>>> @@ -460,12 +471,18 @@ public:<br>
>>> /// @param[in] env_var_name<br>
>>> /// Specifies the name of the environment variable to check.<br>
>>> ///<br>
>>> + /// @param[out] argument_index<br>
>>> + /// If non-null, then when the environment variable is found,<br>
>>> + /// the index of the argument position will be returned in<br>
>>> + /// the size_t pointed to by this argument.<br>
>>> + ///<br>
>>> /// @return<br>
>>> /// true if the specified env var name exists in the list in<br>
>>> /// either of the above-mentioned formats; otherwise, false.<br>
>>> //------------------------------------------------------------------<br>
>>> bool<br>
>>> - ContainsEnvironmentVariable(const char *env_var_name) const;<br>
>>> + ContainsEnvironmentVariable(const char *env_var_name,<br>
>>> + size_t *argument_index = nullptr) const;<br>
>>><br>
>>> protected:<br>
>>> //------------------------------------------------------------------<br>
>>><br>
>>> Modified: lldb/trunk/include/lldb/Target/Process.h<br>
>>> URL:<br>
>>> <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=279198&r1=279197&r2=279198&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=279198&r1=279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================================================================<br>
>>> --- lldb/trunk/include/lldb/Target/Process.h (original)<br>
>>> +++ lldb/trunk/include/lldb/Target/Process.h Thu Aug 18 21:52:07 2016<br>
>>> @@ -760,7 +760,8 @@ public:<br>
>>> eBroadcastBitInterrupt = (1 << 1),<br>
>>> eBroadcastBitSTDOUT = (1 << 2),<br>
>>> eBroadcastBitSTDERR = (1 << 3),<br>
>>> - eBroadcastBitProfileData = (1 << 4)<br>
>>> + eBroadcastBitProfileData = (1 << 4),<br>
>>> + eBroadcastBitStructuredData = (1 << 5),<br>
>>> };<br>
>>><br>
>>> enum<br>
>>> @@ -3254,6 +3255,71 @@ public:<br>
>>> AdvanceAddressToNextBranchInstruction (Address default_stop_addr,<br>
>>> AddressRange range_bounds);<br>
>>><br>
>>> + //------------------------------------------------------------------<br>
>>> + /// Configure asynchronous structured data feature.<br>
>>> + ///<br>
>>> + /// Each Process type that supports using an asynchronous<br>
>>> StructuredData<br>
>>> + /// feature should implement this to enable/disable/configure the<br>
>>> feature.<br>
>>> + /// The default implementation here will always return an error<br>
>>> indiciating<br>
>>> + /// the feature is unsupported.<br>
>>> + ///<br>
>>> + /// StructuredDataPlugin implementations will call this to configure<br>
>>> + /// a feature that has been reported as being supported.<br>
>>> + ///<br>
>>> + /// @param[in] type_name<br>
>>> + /// The StructuredData type name as previously discovered by<br>
>>> + /// the Process-derived instance.<br>
>>> + ///<br>
>>> + /// @param[in] config<br>
>>> + /// Configuration data for the feature being enabled. This<br>
>>> config<br>
>>> + /// data, which may be null, will be passed along to the feature<br>
>>> + /// to process. The feature will dictate whether this is a<br>
>>> dictionary,<br>
>>> + /// an array or some other object. If the feature needs to be<br>
>>> + /// set up properly before it can be enabled, then the config<br>
>>> should<br>
>>> + /// also take an enable/disable flag.<br>
>>> + ///<br>
>>> + /// @return<br>
>>> + /// Returns the result of attempting to configure the feature.<br>
>>> + //------------------------------------------------------------------<br>
>>> + virtual Error<br>
>>> + ConfigureStructuredData(const ConstString &type_name,<br>
>>> + const StructuredData::ObjectSP &config_sp);<br>
>>> +<br>
>>> + //------------------------------------------------------------------<br>
>>> + /// Broadcasts the given structured data object from the given<br>
>>> + /// plugin.<br>
>>> + ///<br>
>>> + /// StructuredDataPlugin instances can use this to optionally<br>
>>> + /// broadcast any of their data if they want to make it available<br>
>>> + /// for clients. The data will come in on the structured data<br>
>>> + /// event bit (eBroadcastBitStructuredData).<br>
>>> + ///<br>
>>> + /// @param[in] object_sp<br>
>>> + /// The structured data object to broadcast.<br>
>>> + ///<br>
>>> + /// @param[in] plugin_sp<br>
>>> + /// The plugin that will be reported in the event's plugin<br>
>>> + /// parameter.<br>
>>> + //------------------------------------------------------------------<br>
>>> + void<br>
>>> + BroadcastStructuredData(const StructuredData::ObjectSP &object_sp,<br>
>>> + const lldb::StructuredDataPluginSP<br>
>>> &plugin_sp);<br>
>>> +<br>
>>> + //------------------------------------------------------------------<br>
>>> + /// Returns the StructuredDataPlugin associated with a given type<br>
>>> + /// name, if there is one.<br>
>>> + ///<br>
>>> + /// There will only be a plugin for a given StructuredDataType if<br>
>>> the<br>
>>> + /// debugged process monitor claims that the feature is supported.<br>
>>> + /// This is one way to tell whether a feature is available.<br>
>>> + ///<br>
>>> + /// @return<br>
>>> + /// The plugin if one is available for the specified feature;<br>
>>> + /// otherwise, returns an empty shared pointer.<br>
>>> + //------------------------------------------------------------------<br>
>>> + lldb::StructuredDataPluginSP<br>
>>> + GetStructuredDataPlugin(const ConstString &type_name) const;<br>
>>> +<br>
>>> protected:<br>
>>> void<br>
>>> SetState (lldb::EventSP &event_sp);<br>
>>> @@ -3392,6 +3458,57 @@ protected:<br>
>>> }<br>
>>><br>
>>> //------------------------------------------------------------------<br>
>>> + /// Loads any plugins associated with asynchronous structured data<br>
>>> + /// and maps the relevant supported type name to the plugin.<br>
>>> + ///<br>
>>> + /// Processes can receive asynchronous structured data from the<br>
>>> + /// process monitor. This method will load and map any structured<br>
>>> + /// data plugins that support the given set of supported type names.<br>
>>> + /// Later, if any of these features are enabled, the process monitor<br>
>>> + /// is free to generate asynchronous structured data. The data must<br>
>>> + /// come in as a single \b StructuredData::Dictionary. That<br>
>>> dictionary<br>
>>> + /// must have a string field named 'type', with a value that equals<br>
>>> + /// the relevant type name string (one of the values in<br>
>>> + /// \b supported_type_names).<br>
>>> + ///<br>
>>> + /// @param[in] supported_type_names<br>
>>> + /// An array of zero or more type names. Each must be unique.<br>
>>> + /// For each entry in the list, a StructuredDataPlugin will be<br>
>>> + /// searched for that supports the structured data type name.<br>
>>> + //------------------------------------------------------------------<br>
>>> + void<br>
>>> + MapSupportedStructuredDataPlugins(const StructuredData::Array<br>
>>> + &supported_type_names);<br>
>>> +<br>
>>> + //------------------------------------------------------------------<br>
>>> + /// Route the incoming structured data dictionary to the right<br>
>>> plugin.<br>
>>> + ///<br>
>>> + /// The incoming structured data must be a dictionary, and it must<br>
>>> + /// have a key named 'type' that stores a string value. The string<br>
>>> + /// value must be the name of the structured data feature that<br>
>>> + /// knows how to handle it.<br>
>>> + ///<br>
>>> + /// @param[in] object_sp<br>
>>> + /// When non-null and pointing to a dictionary, the 'type'<br>
>>> + /// key's string value is used to look up the plugin that<br>
>>> + /// was registered for that structured data type. It then<br>
>>> + /// calls the following method on the StructuredDataPlugin<br>
>>> + /// instance:<br>
>>> + ///<br>
>>> + /// virtual void<br>
>>> + /// HandleArrivalOfStructuredData(Process &process,<br>
>>> + /// const ConstString &type_name,<br>
>>> + /// const StructuredData::ObjectSP<br>
>>> + /// &object_sp)<br>
>>> + ///<br>
>>> + /// @return<br>
>>> + /// True if the structured data was routed to a plugin;<br>
>>> otherwise,<br>
>>> + /// false.<br>
>>> + //------------------------------------------------------------------<br>
>>> + bool<br>
>>> + RouteAsyncStructuredData(const StructuredData::ObjectSP object_sp);<br>
>>> +<br>
>>> + //------------------------------------------------------------------<br>
>>> // Type definitions<br>
>>> //------------------------------------------------------------------<br>
>>> typedef std::map<lldb::LanguageType, lldb::LanguageRuntimeSP><br>
>>> LanguageRuntimeCollection;<br>
>>> @@ -3408,6 +3525,9 @@ protected:<br>
>>> {<br>
>>> }<br>
>>> };<br>
>>> +<br>
>>> + using StructuredDataPluginMap = std::map<ConstString,<br>
>>> +<br>
>>> lldb::StructuredDataPluginSP>;<br>
>>><br>
>>> //------------------------------------------------------------------<br>
>>> // Member variables<br>
>>> @@ -3477,7 +3597,9 @@ protected:<br>
>>> bool m_can_interpret_function_calls; // Some targets, e.g the OSX<br>
>>> kernel, don't support the ability to modify the stack.<br>
>>> WarningsCollection m_warnings_issued; // A set of object<br>
>>> pointers which have already had warnings printed<br>
>>> std::mutex m_run_thread_plan_lock;<br>
>>> -<br>
>>> + StructuredDataPluginMap m_structured_data_plugin_map;<br>
>>> +<br>
>>> +<br>
>>> enum {<br>
>>> eCanJITDontKnow= 0,<br>
>>> eCanJITYes,<br>
>>> @@ -3562,7 +3684,7 @@ protected:<br>
>>><br>
>>> void<br>
>>> BroadcastAsyncProfileData(const std::string &one_profile_data);<br>
>>> -<br>
>>> +<br>
>>> static void<br>
>>> STDIOReadThreadBytesReceived (void *baton, const void *src, size_t<br>
>>> src_len);<br>
>>><br>
>>><br>
>>> Added: lldb/trunk/include/lldb/Target/StructuredDataPlugin.h<br>
>>> URL:<br>
>>> <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/StructuredDataPlugin.h?rev=279198&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/StructuredDataPlugin.h?rev=279198&view=auto</a><br>
>>><br>
>>> ==============================================================================<br>
>>> --- lldb/trunk/include/lldb/Target/StructuredDataPlugin.h (added)<br>
>>> +++ lldb/trunk/include/lldb/Target/StructuredDataPlugin.h Thu Aug 18<br>
>>> 21:52:07 2016<br>
>>> @@ -0,0 +1,204 @@<br>
>>> +//===-- StructuredDataPlugin.h ----------------------------------*- C++<br>
>>> -*-===//<br>
>>> +//<br>
>>> +// The LLVM Compiler Infrastructure<br>
>>> +//<br>
>>> +// This file is distributed under the University of Illinois Open Source<br>
>>> +// License. See LICENSE.TXT for details.<br>
>>> +//<br>
>>><br>
>>> +//===----------------------------------------------------------------------===//<br>
>>> +<br>
>>> +#ifndef StructuredDataPlugin_h<br>
>>> +#define StructuredDataPlugin_h<br>
>>> +<br>
>>> +#include "lldb/Core/PluginInterface.h"<br>
>>> +#include "lldb/Core/StructuredData.h"<br>
>>> +<br>
>>> +namespace lldb_private<br>
>>> +{<br>
>>> +<br>
>>> +class CommandObjectMultiword;<br>
>>> +<br>
>>> +//<br>
>>> -----------------------------------------------------------------------------<br>
>>> +/// Plugin that supports process-related structured data sent<br>
>>> asynchronously<br>
>>> +/// from the debug monitor (e.g. debugserver, lldb-server, etc.)<br>
>>> +///<br>
>>> +/// This plugin type is activated by a Process-derived instance when<br>
>>> that<br>
>>> +/// instance detects that a given structured data feature is available.<br>
>>> +///<br>
>>> +/// StructuredDataPlugin instances are inherently tied to a process.<br>
>>> The<br>
>>> +/// main functionality they support is the ability to consume<br>
>>> asynchronously-<br>
>>> +/// delivered structured data from the process monitor, and do something<br>
>>> +/// reasonable with it. Something reasonable can include broadcasting a<br>
>>> +/// StructuredData event, which other parts of the system can then do<br>
>>> with<br>
>>> +/// as they please. An IDE could use this facility to retrieve CPU<br>
>>> usage,<br>
>>> +/// memory usage, and other run-time aspects of the process. That data<br>
>>> +/// can then be displayed meaningfully to the user through the IDE.<br>
>>> +<br>
>>> +/// For command-line LLDB, the Debugger instance listens for the<br>
>>> structured<br>
>>> +/// data events raised by the plugin, and give the plugin both the<br>
>>> output<br>
>>> +/// and error streams such that the plugin can display something about<br>
>>> the<br>
>>> +/// event, at a time when the debugger ensures it is safe to write to<br>
>>> the<br>
>>> +/// output or error streams.<br>
>>> +//<br>
>>> -----------------------------------------------------------------------------<br>
>>> +<br>
>>> +class StructuredDataPlugin :<br>
>>> + public PluginInterface,<br>
>>> + public std::enable_shared_from_this<StructuredDataPlugin><br>
>>> +{<br>
>>> +public:<br>
>>> +<br>
>>> + virtual ~StructuredDataPlugin();<br>
>>> +<br>
>>> + lldb::ProcessSP<br>
>>> + GetProcess() const;<br>
>>> +<br>
>>> + //<br>
>>> -------------------------------------------------------------------------<br>
>>> + // Public instance API<br>
>>> + //<br>
>>> -------------------------------------------------------------------------<br>
>>> +<br>
>>> + //<br>
>>> -------------------------------------------------------------------------<br>
>>> + /// Return whether this plugin supports the given StructuredData<br>
>>> feature.<br>
>>> + ///<br>
>>> + /// When Process is informed of a list of process-monitor-supported<br>
>>> + /// structured data features, Process will go through the list of<br>
>>> plugins,<br>
>>> + /// one at a time, and have the first plugin that supports a given<br>
>>> feature<br>
>>> + /// be the plugin instantiated to handle that feature. There is a<br>
>>> 1-1<br>
>>> + /// correspondence between a Process instance and a<br>
>>> StructuredDataPlugin<br>
>>> + /// mapped to that process. A plugin can support handling multiple<br>
>>> + /// features, and if that happens, there is a single plugin instance<br>
>>> + /// created covering all of the mapped features for a given process.<br>
>>> + ///<br>
>>> + /// @param[in] type_name<br>
>>> + /// The name of the feature tag supported by a process.<br>
>>> + /// e.g. "darwin-log".<br>
>>> + ///<br>
>>> + /// @return<br>
>>> + /// true if the plugin supports the feature; otherwise, false.<br>
>>> + //<br>
>>> -------------------------------------------------------------------------<br>
>>> + virtual bool<br>
>>> + SupportsStructuredDataType(const ConstString &type_name) = 0;<br>
>>> +<br>
>>> + //<br>
>>> -------------------------------------------------------------------------<br>
>>> + /// Handle the arrival of asynchronous structured data from the<br>
>>> process.<br>
>>> + ///<br>
>>> + /// When asynchronous structured data arrives from the process<br>
>>> monitor,<br>
>>> + /// it is immediately delivered to the plugin mapped for that<br>
>>> feature<br>
>>> + /// if one exists. The structured data that arrives from a process<br>
>>> + /// monitor must be a dictionary, and it must have a string field<br>
>>> named<br>
>>> + /// "type" that must contain the StructuredData feature name set as<br>
>>> the<br>
>>> + /// value. This is the manner in which the data is routed to the<br>
>>> proper<br>
>>> + /// plugin instance.<br>
>>> + ///<br>
>>> + /// @param[in] process<br>
>>> + /// The process instance that just received the structured data.<br>
>>> + /// This will always be the same process for a given instance of<br>
>>> + /// a plugin.<br>
>>> + ///<br>
>>> + /// @param[in] type_name<br>
>>> + /// The name of the feature tag for the asynchronous structured<br>
>>> data.<br>
>>> + /// Note this data will also be present in the \b object_sp<br>
>>> dictionary<br>
>>> + /// under the string value with key "type".<br>
>>> + ///<br>
>>> + /// @param[in] object_sp<br>
>>> + /// A shared pointer to the structured data that arrived. This<br>
>>> must<br></div></div>
>>> + ///> _______________________________________________<span><br>
> lldb-commits mailing list<br>
> <a>lldb-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br>
><br>
</span></blockquote></div></div><span><font color="#888888"><br><br>-- <br><div dir="ltr">-Todd</div><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="m_3033526307865616314HOEnZb"><font color="#888888">-- <br><div data-smartmail="gmail_signature"><div dir="ltr">-Todd</div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div><div class="gmail_extra">-- <br><div class="m_3033526307865616314gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-Todd</div></div>
</div></blockquote></div>