<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"><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/<wbr>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="h5"><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-pr<wbr>oject?rev=279198&view=rev</a><br>
>>> Log:<br>
>>> Add StructuredData plugin type; showcase with new DarwinLog feature<br>
>>><br>
>>> See docs/structured_data/Structure<wbr>dDataPlugins.md for details.<br>
>>><br>
>>> differential review: <a href="https://reviews.llvm.org/D22976" target="_blank">https://reviews.llvm.org/D2297<wbr>6</a><br>
>>><br>
>>> reviewers: clayborg, jingham<br>
>>><br>
>>> Added:<br>
>>>     lldb/trunk/docs/structured_da<wbr>ta/<br>
>>>     lldb/trunk/docs/structured_da<wbr>ta/DarwinLog.md<br>
>>>     lldb/trunk/docs/structured_da<wbr>ta/StructuredDataPlugins.md<br>
>>>     lldb/trunk/include/lldb/API/S<wbr>BStructuredData.h<br>
>>>     lldb/trunk/include/lldb/Targe<wbr>t/StructuredDataPlugin.h<br>
>>>     lldb/trunk/include/lldb/Targe<wbr>t/ThreadPlanCallOnFunctionExit<wbr>.h<br>
>>>     lldb/trunk/packages/Python/ll<wbr>dbsuite/test/darwin_log.py<br>
>>>     lldb/trunk/packages/Python/ll<wbr>dbsuite/test/functionalities/d<wbr>arwin_log/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/basic/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/basic/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/basic/TestDarwinLogBa<wbr>sic.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/basic/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/common/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/common/darwin_log_com<wbr>mon.h<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/ac<wbr>tivity/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/ac<wbr>tivity-chain/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/ac<wbr>tivity-chain/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/ac<wbr>tivity-chain/TestDarwinLogFilt<wbr>erMatchActivityChain.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/ac<wbr>tivity-chain/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/ac<wbr>tivity/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/ac<wbr>tivity/TestDarwinLogFilterMatc<wbr>hActivity.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/ac<wbr>tivity/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/ca<wbr>tegory/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/ca<wbr>tegory/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/ca<wbr>tegory/TestDarwinLogFilterMatc<wbr>hCategory.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/ca<wbr>tegory/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/me<wbr>ssage/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/me<wbr>ssage/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/me<wbr>ssage/TestDarwinLogFilterMatch<wbr>Message.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/me<wbr>ssage/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/su<wbr>bsystem/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/su<wbr>bsystem/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/su<wbr>bsystem/TestDarwinLogFilterMat<wbr>chSubsystem.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/exact_match/su<wbr>bsystem/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/activity<wbr>/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/activity<wbr>-chain/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/activity<wbr>-chain/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/activity<wbr>-chain/TestDarwinLogFilterRege<wbr>xActivityChain.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/activity<wbr>-chain/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/activity<wbr>/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/activity<wbr>/TestDarwinLogFilterRegexActiv<wbr>ity.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/activity<wbr>/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/category<wbr>/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/category<wbr>/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/category<wbr>/TestDarwinLogFilterRegexCateg<wbr>ory.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/category<wbr>/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/message/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/message/<wbr>Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/message/<wbr>TestDarwinLogFilterRegexMessag<wbr>e.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/message/<wbr>main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/subsyste<wbr>m/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/subsyste<wbr>m/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/subsyste<wbr>m/TestDarwinLogFilterRegexSubs<wbr>ystem.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/filter/regex/subsyste<wbr>m/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/format/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/format/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/format/TestDarwinLogM<wbr>essageFormat.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/format/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/source/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/source/debug/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/source/debug/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/source/debug/TestDarw<wbr>inLogSourceDebug.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/source/debug/main.c<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/source/info/<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/source/info/Makefile<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/source/info/TestDarwi<wbr>nLogSourceInfo.py<br>
>>><br>
>>> lldb/trunk/packages/Python/lld<wbr>bsuite/test/functionalities/da<wbr>rwin_log/source/info/main.c<br>
>>>     lldb/trunk/scripts/interface/<wbr>SBStructuredData.i<br>
>>>     lldb/trunk/source/API/SBStruc<wbr>turedData.cpp<br>
>>>     lldb/trunk/source/Plugins/Str<wbr>ucturedData/<br>
>>>     lldb/trunk/source/Plugins/Str<wbr>ucturedData/CMakeLists.txt<br>
>>>     lldb/trunk/source/Plugins/Str<wbr>ucturedData/DarwinLog/<br>
>>>     lldb/trunk/source/Plugins/Str<wbr>ucturedData/DarwinLog/CMakeLis<wbr>ts.txt<br>
>>><br>
>>> lldb/trunk/source/Plugins/Stru<wbr>cturedData/DarwinLog/Structure<wbr>dDataDarwinLog.cpp<br>
>>><br>
>>> lldb/trunk/source/Plugins/Stru<wbr>cturedData/DarwinLog/Structure<wbr>dDataDarwinLog.h<br>
>>>     lldb/trunk/source/Target/Stru<wbr>cturedDataPlugin.cpp<br>
>>>     lldb/trunk/source/Target/Thre<wbr>adPlanCallOnFunctionExit.cpp<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/JSON.cpp<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/JSON.h<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/MacOSX/DarwinLog/<br>
>>><br>
>>> lldb/trunk/tools/debugserver/s<wbr>ource/MacOSX/DarwinLog/Activit<wbr>yStore.cpp<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/MacOSX/DarwinLog/Activi<wbr>tyStore.h<br>
>>><br>
>>> lldb/trunk/tools/debugserver/s<wbr>ource/MacOSX/DarwinLog/Activit<wbr>yStreamSPI.h<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/MacOSX/DarwinLog/CMakeL<wbr>ists.txt<br>
>>><br>
>>> lldb/trunk/tools/debugserver/s<wbr>ource/MacOSX/DarwinLog/DarwinL<wbr>ogCollector.cpp<br>
>>><br>
>>> lldb/trunk/tools/debugserver/s<wbr>ource/MacOSX/DarwinLog/DarwinL<wbr>ogCollector.h<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/MacOSX/DarwinLog/Darwin<wbr>LogEvent.h<br>
>>><br>
>>> lldb/trunk/tools/debugserver/s<wbr>ource/MacOSX/DarwinLog/DarwinL<wbr>ogInterfaces.h<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/MacOSX/DarwinLog/Darwin<wbr>LogTypes.h<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/MacOSX/DarwinLog/LogFil<wbr>ter.cpp<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/MacOSX/DarwinLog/LogFil<wbr>ter.h<br>
>>><br>
>>> lldb/trunk/tools/debugserver/s<wbr>ource/MacOSX/DarwinLog/LogFilt<wbr>erChain.cpp<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/MacOSX/DarwinLog/LogFil<wbr>terChain.h<br>
>>><br>
>>> lldb/trunk/tools/debugserver/s<wbr>ource/MacOSX/DarwinLog/LogFilt<wbr>erExactMatch.cpp<br>
>>><br>
>>> lldb/trunk/tools/debugserver/s<wbr>ource/MacOSX/DarwinLog/LogFilt<wbr>erExactMatch.h<br>
>>><br>
>>> lldb/trunk/tools/debugserver/s<wbr>ource/MacOSX/DarwinLog/LogFilt<wbr>erRegex.cpp<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/MacOSX/DarwinLog/LogFil<wbr>terRegex.h<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/MacOSX/DarwinLog/LogMes<wbr>sage.cpp<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/MacOSX/DarwinLog/LogMes<wbr>sage.h<br>
>>><br>
>>> lldb/trunk/tools/debugserver/s<wbr>ource/MacOSX/DarwinLog/LogMess<wbr>ageOsLog.cpp<br>
>>><br>
>>> lldb/trunk/tools/debugserver/s<wbr>ource/MacOSX/DarwinLog/LogMess<wbr>ageOsLog.h<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/MacOSX/OsLogger.cpp<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/MacOSX/OsLogger.h<br>
>>> Modified:<br>
>>>     lldb/trunk/.gitignore<br>
>>>     lldb/trunk/cmake/LLDBDependen<wbr>cies.cmake<br>
>>>     lldb/trunk/include/lldb/API/L<wbr>LDB.h<br>
>>>     lldb/trunk/include/lldb/API/S<wbr>BDefines.h<br>
>>>     lldb/trunk/include/lldb/API/S<wbr>BError.h<br>
>>>     lldb/trunk/include/lldb/API/S<wbr>BProcess.h<br>
>>>     lldb/trunk/include/lldb/API/S<wbr>BStream.h<br>
>>>     lldb/trunk/include/lldb/Core/<wbr>Broadcaster.h<br>
>>>     lldb/trunk/include/lldb/Core/<wbr>Event.h<br>
>>>     lldb/trunk/include/lldb/Core/<wbr>PluginManager.h<br>
>>>     lldb/trunk/include/lldb/Inter<wbr>preter/Args.h<br>
>>>     lldb/trunk/include/lldb/Targe<wbr>t/Process.h<br>
>>>     lldb/trunk/include/lldb/lldb-<wbr>forward.h<br>
>>>     lldb/trunk/include/lldb/lldb-<wbr>private-interfaces.h<br>
>>>     lldb/trunk/lldb.xcodeproj/pro<wbr>ject.pbxproj<br>
>>>     lldb/trunk/scripts/interface/<wbr>SBProcess.i<br>
>>>     lldb/trunk/scripts/interface/<wbr>SBTarget.i<br>
>>>     lldb/trunk/scripts/lldb.swig<br>
>>>     lldb/trunk/source/API/CMakeLi<wbr>sts.txt<br>
>>>     lldb/trunk/source/API/SBDebug<wbr>ger.cpp<br>
>>>     lldb/trunk/source/API/SBProce<wbr>ss.cpp<br>
>>>     lldb/trunk/source/API/SystemI<wbr>nitializerFull.cpp<br>
>>>     lldb/trunk/source/Core/Debugg<wbr>er.cpp<br>
>>>     lldb/trunk/source/Core/Event.<wbr>cpp<br>
>>>     lldb/trunk/source/Core/Plugin<wbr>Manager.cpp<br>
>>>     lldb/trunk/source/Interpreter<wbr>/Args.cpp<br>
>>>     lldb/trunk/source/Plugins/Pro<wbr>cess/gdb-remote/GDBRemoteClien<wbr>tBase.cpp<br>
>>>     lldb/trunk/source/Plugins/Pro<wbr>cess/gdb-remote/GDBRemoteClien<wbr>tBase.h<br>
>>><br>
>>> lldb/trunk/source/Plugins/Proc<wbr>ess/gdb-remote/GDBRemoteCommun<wbr>icationClient.cpp<br>
>>><br>
>>> lldb/trunk/source/Plugins/Proc<wbr>ess/gdb-remote/GDBRemoteCommun<wbr>icationClient.h<br>
>>>     lldb/trunk/source/Plugins/Pro<wbr>cess/gdb-remote/ProcessGDBRemo<wbr>te.cpp<br>
>>>     lldb/trunk/source/Plugins/Pro<wbr>cess/gdb-remote/ProcessGDBRemo<wbr>te.h<br>
>>>     lldb/trunk/source/Target/CMak<wbr>eLists.txt<br>
>>>     lldb/trunk/source/Target/Plat<wbr>form.cpp<br>
>>>     lldb/trunk/source/Target/Proc<wbr>ess.cpp<br>
>>>     lldb/trunk/tools/debugserver/<wbr>debugserver.xcodeproj/project.<wbr>pbxproj<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/CMakeLists.txt<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/DNB.cpp<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/DNB.h<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/DNBDefs.h<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/MacOSX/CMakeLists.txt<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/RNBContext.cpp<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/RNBContext.h<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/RNBRemote.cpp<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/RNBRemote.h<br>
>>>     lldb/trunk/tools/debugserver/<wbr>source/debugserver.cpp<br>
>>>     lldb/trunk/tools/lldb-mi/MICm<wbr>nLLDBDebugger.cpp<br>
>>>     lldb/trunk/tools/lldb-mi/MICm<wbr>nLLDBDebuggerHandleEvents.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-pr<wbr>oject/lldb/trunk/.gitignore?re<wbr>v=279198&r1=279197&r2=279198&v<wbr>iew=diff</a><br>
>>><br>
>>> ==============================<wbr>==============================<wbr>==================<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/LLDBDependenc<wbr>ies.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-pr<wbr>oject/lldb/trunk/cmake/LLDBDep<wbr>endencies.cmake?rev=279198&r1=<wbr>279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================<wbr>==============================<wbr>==================<br>
>>> --- lldb/trunk/cmake/LLDBDependenc<wbr>ies.cmake (original)<br>
>>> +++ lldb/trunk/cmake/LLDBDependenc<wbr>ies.cmake Thu Aug 18 21:52:07 2016<br>
>>> @@ -47,6 +47,7 @@ set( LLDB_USED_LIBS<br>
>>>    lldbPluginObjectContainerMachO<wbr>Archive<br>
>>>    lldbPluginObjectContainerBSDAr<wbr>chive<br>
>>>    lldbPluginPlatformMacOSX<br>
>>> +  lldbPluginStructuredDataDarwin<wbr>Log<br>
>>>    lldbPluginDynamicLoaderMacOSXD<wbr>YLD<br>
>>>    lldbPluginUnwindAssemblyInstEm<wbr>ulation<br>
>>>    lldbPluginUnwindAssemblyX86<br>
>>><br>
>>> Added: lldb/trunk/docs/structured_dat<wbr>a/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-pr<wbr>oject/lldb/trunk/docs/structur<wbr>ed_data/DarwinLog.md?rev=27919<wbr>8&view=auto</a><br>
>>><br>
>>> ==============================<wbr>==============================<wbr>==================<br>
>>> --- lldb/trunk/docs/structured_dat<wbr>a/DarwinLog.md (added)<br>
>>> +++ lldb/trunk/docs/structured_dat<wbr>a/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-<wbr>log.enable-on-startup'<br>
>>> +<br>
>>> +  and<br>
>>> +<br>
>>> +  'settings set \<br>
>>> +  plugin.structured-data.darwin-<wbr>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-activ<wbr>ity}:<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.myproduc<wbr>t"<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_dat<wbr>a/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-pr<wbr>oject/lldb/trunk/docs/structur<wbr>ed_data/StructuredDataPlugins.<wbr>md?rev=279198&view=auto</a><br>
>>><br>
>>> ==============================<wbr>==============================<wbr>==================<br>
>>> --- lldb/trunk/docs/structured_dat<wbr>a/StructuredDataPlugins.md (added)<br>
>>> +++ lldb/trunk/docs/structured_dat<wbr>a/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>
>>> +    MapSupportedStructuredDataPlug<wbr>ins(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.{plugi<wbr>n-name}.<br>
>>><br>
>>> Modified: lldb/trunk/include/lldb/API/LL<wbr>DB.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-pr<wbr>oject/lldb/trunk/include/lldb/<wbr>API/LLDB.h?rev=279198&r1=27919<wbr>7&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================<wbr>==============================<wbr>==================<br>
>>> --- lldb/trunk/include/lldb/API/LL<wbr>DB.h (original)<br>
>>> +++ lldb/trunk/include/lldb/API/LL<wbr>DB.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.<wbr>h"<br>
>>><br>
>>> Modified: lldb/trunk/include/lldb/API/SB<wbr>Defines.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-pr<wbr>oject/lldb/trunk/include/lldb/<wbr>API/SBDefines.h?rev=279198&r1=<wbr>279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================<wbr>==============================<wbr>==================<br>
>>> --- lldb/trunk/include/lldb/API/SB<wbr>Defines.h (original)<br>
>>> +++ lldb/trunk/include/lldb/API/SB<wbr>Defines.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/SB<wbr>Error.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-pr<wbr>oject/lldb/trunk/include/lldb/<wbr>API/SBError.h?rev=279198&r1=27<wbr>9197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================<wbr>==============================<wbr>==================<br>
>>> --- lldb/trunk/include/lldb/API/SB<wbr>Error.h (original)<br>
>>> +++ lldb/trunk/include/lldb/API/SB<wbr>Error.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/SB<wbr>Process.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-pr<wbr>oject/lldb/trunk/include/lldb/<wbr>API/SBProcess.h?rev=279198&r1=<wbr>279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================<wbr>==============================<wbr>==================<br>
>>> --- lldb/trunk/include/lldb/API/SB<wbr>Process.h (original)<br>
>>> +++ lldb/trunk/include/lldb/API/SB<wbr>Process.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/SB<wbr>Stream.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-pr<wbr>oject/lldb/trunk/include/lldb/<wbr>API/SBStream.h?rev=279198&r1=2<wbr>79197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================<wbr>==============================<wbr>==================<br>
>>> --- lldb/trunk/include/lldb/API/SB<wbr>Stream.h (original)<br>
>>> +++ lldb/trunk/include/lldb/API/SB<wbr>Stream.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/SB<wbr>StructuredData.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-pr<wbr>oject/lldb/trunk/include/lldb/<wbr>API/SBStructuredData.h?rev=279<wbr>198&view=auto</a><br>
>>><br>
>>> ==============================<wbr>==============================<wbr>==================<br>
>>> --- lldb/trunk/include/lldb/API/SB<wbr>StructuredData.h (added)<br>
>>> +++ lldb/trunk/include/lldb/API/SB<wbr>StructuredData.h Thu Aug 18 21:52:07<br>
>>> 2016<br>
>>> @@ -0,0 +1,52 @@<br>
>>> +//===-- SBStructuredData.h ------------------------------<wbr>--------*- 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>
>>> +//===------------------------<wbr>------------------------------<wbr>----------------===//<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/B<wbr>roadcaster.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-pr<wbr>oject/lldb/trunk/include/lldb/<wbr>Core/Broadcaster.h?rev=279198&<wbr>r1=279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================<wbr>==============================<wbr>==================<br>
>>> --- lldb/trunk/include/lldb/Core/B<wbr>roadcaster.h (original)<br>
>>> +++ lldb/trunk/include/lldb/Core/B<wbr>roadcaster.h Thu Aug 18 21:52:07 2016<br>
>>> @@ -272,11 +272,10 @@ private:<br>
>>>  ///         //---------------------------<wbr>------------------------------<wbr>-<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>
>>>  //----------------------------<wbr>------------------------------<wbr>------------<br>
>>><br>
>>> Modified: lldb/trunk/include/lldb/Core/E<wbr>vent.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-pr<wbr>oject/lldb/trunk/include/lldb/<wbr>Core/Event.h?rev=279198&r1=279<wbr>197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================<wbr>==============================<wbr>==================<br>
>>> --- lldb/trunk/include/lldb/Core/E<wbr>vent.h (original)<br>
>>> +++ lldb/trunk/include/lldb/Core/E<wbr>vent.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>
>>>  //----------------------------<wbr>------------------------------<wbr>------------<br>
>>> +/// This class handles one or more StructuredData::Dictionary entries<br>
>>> +/// that are raised for structured data events.<br>
>>> +//---------------------------<wbr>------------------------------<wbr>-------------<br>
>>> +<br>
>>> +class EventDataStructuredData : public EventData<br>
>>> +{<br>
>>> +public:<br>
>>> +<br>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<br>
>>> +    // Constructors<br>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<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>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<br>
>>> +    // Member functions<br>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<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>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<br>
>>> +    // Static functions<br>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<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(Event<wbr>DataStructuredData);<br>
>>> +};<br>
>>> +<br>
>>> +//---------------------------<wbr>------------------------------<wbr>-------------<br>
>>>  // lldb::Event<br>
>>>  //----------------------------<wbr>------------------------------<wbr>------------<br>
>>>  class Event<br>
>>><br>
>>> Modified: lldb/trunk/include/lldb/Core/P<wbr>luginManager.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-pr<wbr>oject/lldb/trunk/include/lldb/<wbr>Core/PluginManager.h?rev=27919<wbr>8&r1=279197&r2=279198&view=dif<wbr>f</a><br>
>>><br>
>>> ==============================<wbr>==============================<wbr>==================<br>
>>> --- lldb/trunk/include/lldb/Core/P<wbr>luginManager.h (original)<br>
>>> +++ lldb/trunk/include/lldb/Core/P<wbr>luginManager.h Thu Aug 18 21:52:07 2016<br>
>>> @@ -328,6 +328,65 @@ public:<br>
>>>                                      CommandInterpreter &interpreter);<br>
>>><br>
>>>      //----------------------------<wbr>------------------------------<wbr>--------<br>
>>> +    // StructuredDataPlugin<br>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<br>
>>> +<br>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<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>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<br>
>>> +    static bool<br>
>>> +    RegisterPlugin(const ConstString &name,<br>
>>> +                   const char *description,<br>
>>> +                   StructuredDataPluginCreateIns<wbr>tance create_callback,<br>
>>> +                   DebuggerInitializeCallback debugger_init_callback =<br>
>>> nullptr,<br>
>>> +                   StructuredDataFilterLaunchInf<wbr>o filter_callback<br>
>>> +                   = nullptr);<br>
>>> +<br>
>>> +    static bool<br>
>>> +    UnregisterPlugin(StructuredDat<wbr>aPluginCreateInstance<br>
>>> create_callback);<br>
>>> +<br>
>>> +    static StructuredDataPluginCreateInst<wbr>ance<br>
>>> +    GetStructuredDataPluginCreateC<wbr>allbackAtIndex(uint32_t idx);<br>
>>> +<br>
>>> +    static StructuredDataPluginCreateInst<wbr>ance<br>
>>> +    GetStructuredDataPluginCreateC<wbr>allbackForPluginName(const ConstString<br>
>>> &name);<br>
>>> +<br>
>>> +    static StructuredDataFilterLaunchInfo<br>
>>> +    GetStructuredDataFilterCallbac<wbr>kAtIndex(uint32_t idx,<br>
>>> +                                           bool &iteration_complete);<br>
>>> +<br>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<br>
>>>      // SymbolFile<br>
>>>      //----------------------------<wbr>------------------------------<wbr>--------<br>
>>>      static bool<br>
>>> @@ -531,6 +590,16 @@ public:<br>
>>>      static bool CreateSettingForOperatingSyste<wbr>mPlugin(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>
>>> +    GetSettingForStructuredDataPlu<wbr>gin(Debugger &debugger,<br>
>>> +                                      const ConstString &setting_name);<br>
>>> +<br>
>>> +    static bool<br>
>>> +    CreateSettingForStructuredData<wbr>Plugin(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/Interp<wbr>reter/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-pr<wbr>oject/lldb/trunk/include/lldb/<wbr>Interpreter/Args.h?rev=279198&<wbr>r1=279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================<wbr>==============================<wbr>==================<br>
>>> --- lldb/trunk/include/lldb/Interp<wbr>reter/Args.h (original)<br>
>>> +++ lldb/trunk/include/lldb/Interp<wbr>reter/Args.h Thu Aug 18 21:52:07 2016<br>
>>> @@ -451,6 +451,17 @@ public:<br>
>>>      LongestCommonPrefix (std::string &common_prefix);<br>
>>><br>
>>>      //----------------------------<wbr>------------------------------<wbr>--------<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>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<br>
>>> +    void<br>
>>> +    AddOrReplaceEnvironmentVariabl<wbr>e(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>
>>>      //----------------------------<wbr>------------------------------<wbr>--------<br>
>>>      bool<br>
>>> -    ContainsEnvironmentVariable(co<wbr>nst char *env_var_name) const;<br>
>>> +    ContainsEnvironmentVariable(co<wbr>nst char *env_var_name,<br>
>>> +                                size_t *argument_index = nullptr) const;<br>
>>><br>
>>>  protected:<br>
>>>      //----------------------------<wbr>------------------------------<wbr>--------<br>
>>><br>
>>> Modified: lldb/trunk/include/lldb/Target<wbr>/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-pr<wbr>oject/lldb/trunk/include/lldb/<wbr>Target/Process.h?rev=279198&r1<wbr>=279197&r2=279198&view=diff</a><br>
>>><br>
>>> ==============================<wbr>==============================<wbr>==================<br>
>>> --- lldb/trunk/include/lldb/Target<wbr>/Process.h (original)<br>
>>> +++ lldb/trunk/include/lldb/Target<wbr>/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>
>>>      AdvanceAddressToNextBranchInst<wbr>ruction (Address default_stop_addr,<br>
>>>                                             AddressRange range_bounds);<br>
>>><br>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<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>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<br>
>>> +    virtual Error<br>
>>> +    ConfigureStructuredData(const ConstString &type_name,<br>
>>> +                            const StructuredData::ObjectSP &config_sp);<br>
>>> +<br>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<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>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<br>
>>> +    void<br>
>>> +    BroadcastStructuredData(const StructuredData::ObjectSP &object_sp,<br>
>>> +                            const lldb::StructuredDataPluginSP<br>
>>> &plugin_sp);<br>
>>> +<br>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<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>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<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>
>>>      //----------------------------<wbr>------------------------------<wbr>--------<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>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<br>
>>> +    void<br>
>>> +    MapSupportedStructuredDataPlug<wbr>ins(const StructuredData::Array<br>
>>> +                                           &supported_type_names);<br>
>>> +<br>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<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<wbr>(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>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<br>
>>> +    bool<br>
>>> +    RouteAsyncStructuredData(const StructuredData::ObjectSP object_sp);<br>
>>> +<br>
>>> +    //----------------------------<wbr>------------------------------<wbr>--------<br>
>>>      // Type definitions<br>
>>>      //----------------------------<wbr>------------------------------<wbr>--------<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>
>>>      //----------------------------<wbr>------------------------------<wbr>--------<br>
>>>      // Member variables<br>
>>> @@ -3477,7 +3597,9 @@ protected:<br>
>>>      bool m_can_interpret_function_calls<wbr>; // 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(cons<wbr>t 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<wbr>/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-pr<wbr>oject/lldb/trunk/include/lldb/<wbr>Target/StructuredDataPlugin.h?<wbr>rev=279198&view=auto</a><br>
>>><br>
>>> ==============================<wbr>==============================<wbr>==================<br>
>>> --- lldb/trunk/include/lldb/Target<wbr>/StructuredDataPlugin.h (added)<br>
>>> +++ lldb/trunk/include/lldb/Target<wbr>/StructuredDataPlugin.h Thu Aug 18<br>
>>> 21:52:07 2016<br>
>>> @@ -0,0 +1,204 @@<br>
>>> +//===-- StructuredDataPlugin.h ------------------------------<wbr>----*- 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>
>>> +//===------------------------<wbr>------------------------------<wbr>----------------===//<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>
>>> ------------------------------<wbr>------------------------------<wbr>-----------------<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>
>>> ------------------------------<wbr>------------------------------<wbr>-----------------<br>
>>> +<br>
>>> +class StructuredDataPlugin :<br>
>>> +    public PluginInterface,<br>
>>> +    public std::enable_shared_from_this<S<wbr>tructuredDataPlugin><br>
>>> +{<br>
>>> +public:<br>
>>> +<br>
>>> +    virtual ~StructuredDataPlugin();<br>
>>> +<br>
>>> +    lldb::ProcessSP<br>
>>> +    GetProcess() const;<br>
>>> +<br>
>>> +    //<br>
>>> ------------------------------<wbr>------------------------------<wbr>-------------<br>
>>> +    // Public instance API<br>
>>> +    //<br>
>>> ------------------------------<wbr>------------------------------<wbr>-------------<br>
>>> +<br>
>>> +    //<br>
>>> ------------------------------<wbr>------------------------------<wbr>-------------<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>
>>> ------------------------------<wbr>------------------------------<wbr>-------------<br>
>>> +    virtual bool<br>
>>> +    SupportsStructuredDataType(con<wbr>st ConstString &type_name) = 0;<br>
>>> +<br>
>>> +    //<br>
>>> ------------------------------<wbr>------------------------------<wbr>-------------<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>
>>> +    ///> ______________________________<wbr>_________________<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/<wbr>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="HOEnZb"><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>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-Todd</div></div>
</div>