<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I just committed:<div class=""><br class=""></div><div class="">$ svn commit<br class="">Sending        packages/Python/lldbsuite/test/tools/lldb-vscode/attach/TestVSCode_attach.py<br class="">Transmitting file data .done<br class="">Committing transaction...<br class="">Committed revision 340050.<br class=""><br class=""><div>This now uses self.assertEqual so we can see if we are getting no breakpoints. It will give a bit more signal on what is going on.</div><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 17, 2018, at 10:17 AM, Adrian Prantl <<a href="mailto:aprantl@apple.com" class="">aprantl@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Aug 17, 2018, at 10:15 AM, Greg Clayton <<a href="mailto:clayborg@gmail.com" class="">clayborg@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Is this flaky or does it fail all the time? If it fails all the time let me know and I will change the test to give us better error message when it fails so we can figure out what is going on.</div></div></blockquote><div class=""><br class=""></div><div class="">This fails all the time, but our sample size isn't particularly large because upstream LLVM was broken for the last 12 hours.</div><div class=""><br class=""></div><div class="">-- adrian</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">In order to test by name i copy the a.out to a temp file and then launch it:</div><div class=""><br class=""></div><div class="">        program = tempfile.mktemp()<br class="">        shutil.copyfile(orig_program, program)<br class="">        shutil.copymode(orig_program, program)<br class="">        self.process = subprocess.Popen([program],<br class="">                                        stdin=subprocess.PIPE,<br class="">                                        stdout=subprocess.PIPE,<br class="">                                        stderr=subprocess.PIPE)<br class=""><br class=""><div class="">Otherwise this is the exact same test as test_by_name that passed. Not sure what could be going on here.</div><div class=""><br class=""></div><div class="">Greg</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Aug 17, 2018, at 9:35 AM, Adrian Prantl via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><span style="font-family: monospace;" class="">Greg, could you please take a look at the failure in lldb-vscode/attach/TestVSCode_attach.py ?</span><div style="font-family: monospace;" class=""><br class=""></div><div class=""><font face="monospace" class=""><a href="http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/9014/testReport/junit/lldb-Suite/tools_lldb-vscode_attach/TestVSCode_attach_py/" class="">http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/9014/testReport/junit/lldb-Suite/tools_lldb-vscode_attach/TestVSCode_attach_py/</a></font></div><div style="font-family: monospace;" class=""><br class=""></div><div style="font-family: monospace;" class=""><pre style="box-sizing: border-box; white-space: pre-wrap; word-wrap: break-word; margin-top: 0px; margin-bottom: 0px; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-size: 13px;" class="">======================================================================
FAIL: test_by_name_waitFor (TestVSCode_attach.TestVSCode_attach)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/buildslave/jenkins/workspace/lldb-cmake/src/llvm/tools/lldb/packages/Python/lldbsuite/test/decorators.py", line 341, in wrapper
    return func(self, *args, **kwargs)
  File "/Users/buildslave/jenkins/workspace/lldb-cmake/src/llvm/tools/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/TestVSCode_attach.py", line 102, in test_by_name_waitFor
    self.set_and_hit_breakpoint(continueToExit=True)
  File "/Users/buildslave/jenkins/workspace/lldb-cmake/src/llvm/tools/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/TestVSCode_attach.py", line 41, in set_and_hit_breakpoint
    "expect correct number of breakpoints")
AssertionError: False is not True : expect correct number of breakpoints
Config=x86_64-/Users/buildslave/jenkins/workspace/lldb-cmake/build/bin/clang-8</pre><div class=""><br class=""></div></div><div style="font-family: monospace;" class=""><br class=""></div><div style="font-family: monospace;" class="">thanks!</div><div style="font-family: monospace;" class="">adrian</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Aug 16, 2018, at 10:59 AM, Greg Clayton via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Author: gclayton<br class="">Date: Thu Aug 16 10:59:38 2018<br class="">New Revision: 339911<br class=""><br class="">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=339911&view=rev" class="">http://llvm.org/viewvc/llvm-project?rev=339911&view=rev</a><br class="">Log:<br class="">Add a new tool named "lldb-vscode" that implements the Visual Studio Code Debug Adaptor Protocol<br class=""><br class="">This patch adds a new lldb-vscode tool that speaks the Microsoft Visual Studio Code debug adaptor protocol. It has full unit tests that test all packets.<br class=""><br class="">This tool can be easily packaged up into a native extension and used with Visual Studio Code, and it can also be used by Nuclide<br class=""><br class="">Differential Revision: <a href="https://reviews.llvm.org/D50365" class="">https://reviews.llvm.org/D50365</a><br class=""><br class=""><br class="">Added:<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/.categories<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/TestVSCode_attach.py<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setExceptionBreakpoints.py<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.py<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/main.cpp<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/main.c<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/TestVSCode_stackTrace.py<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/main.c<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/TestVSCode_step.py<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/main.cpp<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/TestVSCode_variables.py<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/main.cpp<br class="">    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py<br class="">    lldb/trunk/tools/lldb-vscode/<br class="">    lldb/trunk/tools/lldb-vscode/BreakpointBase.cpp<br class="">    lldb/trunk/tools/lldb-vscode/BreakpointBase.h<br class="">    lldb/trunk/tools/lldb-vscode/CMakeLists.txt<br class="">    lldb/trunk/tools/lldb-vscode/ExceptionBreakpoint.cpp<br class="">    lldb/trunk/tools/lldb-vscode/ExceptionBreakpoint.h<br class="">    lldb/trunk/tools/lldb-vscode/FunctionBreakpoint.cpp<br class="">    lldb/trunk/tools/lldb-vscode/FunctionBreakpoint.h<br class="">    lldb/trunk/tools/lldb-vscode/JSONUtils.cpp<br class="">    lldb/trunk/tools/lldb-vscode/JSONUtils.h<br class="">    lldb/trunk/tools/lldb-vscode/LLDBUtils.cpp<br class="">    lldb/trunk/tools/lldb-vscode/LLDBUtils.h<br class="">    lldb/trunk/tools/lldb-vscode/README.md<br class="">    lldb/trunk/tools/lldb-vscode/SourceBreakpoint.cpp<br class="">    lldb/trunk/tools/lldb-vscode/SourceBreakpoint.h<br class="">    lldb/trunk/tools/lldb-vscode/SourceReference.h<br class="">    lldb/trunk/tools/lldb-vscode/VSCode.cpp<br class="">    lldb/trunk/tools/lldb-vscode/VSCode.h<br class="">    lldb/trunk/tools/lldb-vscode/VSCodeForward.h<br class="">    lldb/trunk/tools/lldb-vscode/lldb-vscode-Info.plist<br class="">    lldb/trunk/tools/lldb-vscode/lldb-vscode.cpp<br class="">    lldb/trunk/tools/lldb-vscode/package.json<br class="">Modified:<br class="">    lldb/trunk/lldb.xcodeproj/project.pbxproj<br class="">    lldb/trunk/packages/Python/lldbsuite/test/dotest.py<br class="">    lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py<br class="">    lldb/trunk/tools/CMakeLists.txt<br class=""><br class="">Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=339911&r1=339910&r2=339911&view=diff" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=339911&r1=339910&r2=339911&view=diff</a><br class="">==============================================================================<br class="">--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)<br class="">+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Aug 16 10:59:38 2018<br class="">@@ -119,6 +119,7 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>268900D013353E6F00698AC0 /* Block.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1310F1B8EC00F91463 /* Block.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>49DEF1251CD7C6DF006A7C7D /* BlockPointer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49DEF11F1CD7BD90006A7C7D /* BlockPointer.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>2689FFEF13353DB600698AC0 /* Breakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E0A10F1B83100F91463 /* Breakpoint.cpp */; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>2660387E211CA98200329572 /* BreakpointBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2660387D211CA98200329572 /* BreakpointBase.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>2689FFF113353DB600698AC0 /* BreakpointID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E0B10F1B83100F91463 /* BreakpointID.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>2689FFF313353DB600698AC0 /* BreakpointIDList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E0C10F1B83100F91463 /* BreakpointIDList.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>23E2E5321D903832006F38BB /* BreakpointIDTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23E2E52D1D90382B006F38BB /* BreakpointIDTest.cpp */; };<br class="">@@ -290,6 +291,7 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>9A22A163135E30370024DDC3 /* EmulationStateARM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A22A15F135E30370024DDC3 /* EmulationStateARM.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>6B74D89B200696BB0074051B /* Environment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 22DC561920064C9600A7E9E8 /* Environment.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>2689003D13353E0400698AC0 /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E7910F1B85900F91463 /* Event.cpp */; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>2660387A211CA90F00329572 /* ExceptionBreakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26603874211CA90E00329572 /* ExceptionBreakpoint.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>268900EB13353E6F00698AC0 /* ExecutionContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3510F1B90C00F91463 /* ExecutionContext.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>4C88BC2A1BA3722B00AA0964 /* Expression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C88BC291BA3722B00AA0964 /* Expression.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>49A1CAC51430E8DE00306AC9 /* ExpressionSourceCode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49A1CAC31430E8BD00306AC9 /* ExpressionSourceCode.cpp */; };<br class="">@@ -313,6 +315,7 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>AF23B4DB19009C66003E2A58 /* FreeBSDSignals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF23B4D919009C66003E2A58 /* FreeBSDSignals.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>268900D913353E6F00698AC0 /* FuncUnwinders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 961FABB81235DE1600F93A47 /* FuncUnwinders.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>268900D813353E6F00698AC0 /* Function.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1810F1B8EC00F91463 /* Function.cpp */; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>2660387C211CA90F00329572 /* FunctionBreakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26603877211CA90E00329572 /* FunctionBreakpoint.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>4C2479BD1BA39295009C9A7B /* FunctionCaller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0083321B9A5DE200D5CF24 /* FunctionCaller.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>2374D7531D4BB2FF005C9575 /* GDBRemoteClientBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2374D74E1D4BB299005C9575 /* GDBRemoteClientBase.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>23CB153A1D66DA9300EDDDE1 /* GDBRemoteClientBaseTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2370A37D1D66C587000E7BE6 /* GDBRemoteClientBaseTest.cpp */; };<br class="">@@ -369,6 +372,7 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC179A18C7F2B300D2196D /* JITLoaderList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC179818C7F2B300D2196D /* JITLoaderList.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>942829561A89614C00521B30 /* JSON.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942829551A89614C00521B30 /* JSON.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>8C3BD9A01EF5D1FF0016C343 /* JSONTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C3BD99F1EF5D1B50016C343 /* JSONTest.cpp */; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>2660387B211CA90F00329572 /* JSONUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26603875211CA90E00329572 /* JSONUtils.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>6D0F61431C80AAAE00A4ECEE /* JavaASTContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61411C80AAAA00A4ECEE /* JavaASTContext.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>6D0F61591C80AB3500A4ECEE /* JavaFormatterFunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61511C80AB3000A4ECEE /* JavaFormatterFunctions.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>6D0F615A1C80AB3900A4ECEE /* JavaLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D0F61531C80AB3000A4ECEE /* JavaLanguage.cpp */; };<br class="">@@ -376,9 +380,11 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>6D0F614F1C80AB0C00A4ECEE /* JavaLanguageRuntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D0F614B1C80AB0400A4ECEE /* JavaLanguageRuntime.h */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>2668035C11601108008E1FE4 /* LLDB.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26680207115FD0ED008E1FE4 /* LLDB.framework */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>2669424D1A6DC32B0063BE93 /* LLDB.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26680207115FD0ED008E1FE4 /* LLDB.framework */; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792623211CA42300EE1D10 /* LLDB.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26680207115FD0ED008E1FE4 /* LLDB.framework */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>26B42C4D1187ABA50079C8C8 /* LLDB.h in Headers */ = {isa = PBXBuildFile; fileRef = 26B42C4C1187ABA50079C8C8 /* LLDB.h */; settings = {ATTRIBUTES = (Public, ); }; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>943BDEFE1AA7B2F800789CE8 /* LLDBAssert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 943BDEFD1AA7B2F800789CE8 /* LLDBAssert.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>6D762BEE1B1605D2006C929D /* LLDBServerUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D762BEC1B1605CD006C929D /* LLDBServerUtilities.cpp */; };<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>26F7619B211CBBB30044F6EA /* LLDBUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26F76199211CBBB30044F6EA /* LLDBUtils.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>2660AAB914622483003A9694 /* LLDBWrapPython.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A4EEB511682AAC007A372A /* LLDBWrapPython.cpp */; settings = {COMPILER_FLAGS = "-Dregister="; }; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>AEB0E4591BD6E9F800B24093 /* LLVMUserExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AEB0E4581BD6E9F800B24093 /* LLVMUserExpression.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>94B638531B8F8E6C004FE1E4 /* Language.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B638521B8F8E6C004FE1E4 /* Language.cpp */; };<br class="">@@ -487,9 +493,6 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>8C3BD9961EF45DA50016C343 /* MainThreadCheckerRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C3BD9951EF45D9B0016C343 /* MainThreadCheckerRuntime.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>2689004313353E0400698AC0 /* Mangled.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8010F1B85900F91463 /* Mangled.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>4F29D3CF21010FA3003B549A /* MangledTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F29D3CD21010F84003B549A /* MangledTest.cpp */; };<br class="">-<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>4FBC04EF211A06820015A814 /* RichManglingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FBC04EE211A06820015A814 /* RichManglingContext.h */; };<br class="">-<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>4FBC04ED211A06200015A814 /* RichManglingContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FBC04EC211A06200015A814 /* RichManglingContext.cpp */; };<br class="">-<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>4FBC04F5211A13770015A814 /* RichManglingContextTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FBC04F3211A0F0F0015A814 /* RichManglingContextTest.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>4CD44CFC20B37C440003557C /* ManualDWARFIndex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CD44CF920B37C440003557C /* ManualDWARFIndex.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>49DCF702170E70120092F75E /* Materializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49DCF700170E70120092F75E /* Materializer.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>2690B3711381D5C300ECFBAE /* Memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2690B3701381D5C300ECFBAE /* Memory.cpp */; };<br class="">@@ -708,6 +711,9 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>23D065901D4A7BEE0008EDE6 /* RenderScriptRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23D065841D4A7BDA0008EDE6 /* RenderScriptRuntime.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>9485545A1DCBAE3B00345FF5 /* RenderScriptScriptGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 948554591DCBAE3B00345FF5 /* RenderScriptScriptGroup.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>23D065911D4A7BEE0008EDE6 /* RenderScriptx86ABIFixups.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23D065861D4A7BDA0008EDE6 /* RenderScriptx86ABIFixups.cpp */; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>4FBC04ED211A06200015A814 /* RichManglingContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FBC04EC211A06200015A814 /* RichManglingContext.cpp */; };<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>4FBC04EF211A06820015A814 /* RichManglingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FBC04EE211A06820015A814 /* RichManglingContext.h */; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>4FBC04F5211A13770015A814 /* RichManglingContextTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FBC04F3211A0F0F0015A814 /* RichManglingContextTest.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>26DE204511618ADA00A093E2 /* SBAddress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DE204411618ADA00A093E2 /* SBAddress.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>26DE204311618ACA00A093E2 /* SBAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE204211618ACA00A093E2 /* SBAddress.h */; settings = {ATTRIBUTES = (Public, ); }; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>254FBBA51A91670E00BD6378 /* SBAttachInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 254FBBA41A91670E00BD6378 /* SBAttachInfo.cpp */; };<br class="">@@ -858,6 +864,7 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>23CB15451D66DA9300EDDDE1 /* SocketAddressTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F9391BDD332400BA9A93 /* SocketAddressTest.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>23CB153B1D66DA9300EDDDE1 /* SocketTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F93A1BDD332400BA9A93 /* SocketTest.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>232CB61D191E00CD00EF39FC /* SoftwareBreakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 232CB613191E00CC00EF39FC /* SoftwareBreakpoint.cpp */; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603879211CA90F00329572 /* SourceBreakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26603870211CA90D00329572 /* SourceBreakpoint.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>2689004C13353E0400698AC0 /* SourceManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8F10F1B85900F91463 /* SourceManager.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>268900F313353E6F00698AC0 /* StackFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3810F1B90C00F91463 /* StackFrame.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>268900F413353E6F00698AC0 /* StackFrameList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3910F1B90C00F91463 /* StackFrameList.cpp */; };<br class="">@@ -1002,6 +1009,7 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>2654A6901E552ED500DA1013 /* VASprintf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2654A68F1E552ED500DA1013 /* VASprintf.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>9A2057031F3A605200F6C293 /* VASprintfTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A3D43C41F3150D200EB767C /* VASprintfTest.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>AFC2DCF01E6E2FD200283714 /* VMRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC2DCEF1E6E2FD200283714 /* VMRange.cpp */; };<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603878211CA90F00329572 /* VSCode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2660386E211CA90D00329572 /* VSCode.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>2689005613353E0400698AC0 /* Value.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9910F1B85900F91463 /* Value.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>2689005713353E0400698AC0 /* ValueObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9A10F1B85900F91463 /* ValueObject.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>94094C6B163B6F840083A547 /* ValueObjectCast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94094C69163B6CD90083A547 /* ValueObjectCast.cpp */; };<br class="">@@ -1050,6 +1058,7 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>2656BBC41AE073A800441749 /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2670F8111862B44A006B332C /* libncurses.dylib */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2670F8121862B44A006B332C /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2670F8111862B44A006B332C /* libncurses.dylib */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26780C611867C33D00234593 /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2670F8111862B44A006B332C /* libncurses.dylib */; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792622211CA41E00EE1D10 /* libncurses.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 26792621211CA41E00EE1D10 /* libncurses.tbd */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>26680233115FD1A7008E1FE4 /* libobjc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F5C37410F3F61B009D5894 /* libobjc.dylib */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>23CB154A1D66DA9300EDDDE1 /* libpanel.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2326CF4E1BDD687800A5CEAC /* libpanel.dylib */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>260157C61885F51C00F875CF /* libpanel.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 260157C41885F4FF00F875CF /* libpanel.dylib */; };<br class="">@@ -1074,6 +1083,7 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>E769331E1A94D18100C73337 /* lldb-server.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E769331D1A94D18100C73337 /* lldb-server.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>26680214115FD12C008E1FE4 /* lldb-types.h in Headers */ = {isa = PBXBuildFile; fileRef = 26BC7C2910F1B3BC00F91463 /* lldb-types.h */; settings = {ATTRIBUTES = (Public, ); }; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>94145431175E63B500284436 /* lldb-versioning.h in Headers */ = {isa = PBXBuildFile; fileRef = 94145430175D7FDE00284436 /* lldb-versioning.h */; settings = {ATTRIBUTES = (Public, ); }; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>2679261E211CA3F200EE1D10 /* lldb-vscode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26792619211CA3E100EE1D10 /* lldb-vscode.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>AF90106515AB7D3600FF120D /* lldb.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = AF90106315AB7C5700FF120D /* lldb.1 */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>2689FFDA13353D9D00698AC0 /* lldb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E7410F1B85900F91463 /* lldb.cpp */; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>AF415AE71D949E4400FCE0D4 /* x86AssemblyInspectionEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF415AE51D949E4400FCE0D4 /* x86AssemblyInspectionEngine.cpp */; };<br class="">@@ -1123,6 +1133,13 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>remoteGlobalIDString = 26680206115FD0ED008E1FE4;<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>remoteInfo = LLDB;<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2679261F211CA40700EE1D10 /* PBXContainerItemProxy */ = {<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = PBXContainerItemProxy;<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>proxyType = 1;<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>remoteGlobalIDString = 26680206115FD0ED008E1FE4;<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>remoteInfo = LLDB;<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2687EACA1508115000DD8C2E /* PBXContainerItemProxy */ = {<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = PBXContainerItemProxy;<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;<br class="">@@ -1264,6 +1281,15 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>name = "Copy Files";<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>runOnlyForDeploymentPostprocessing = 1;<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2679260A211CA3AC00EE1D10 /* CopyFiles */ = {<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = PBXCopyFilesBuildPhase;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buildActionMask = 2147483647;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>dstPath = /usr/share/man/man1/;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>dstSubfolderSpec = 0;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>files = (<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>runOnlyForDeploymentPostprocessing = 1;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>940B04E31A89875C0045D5F7 /* CopyFiles */ = {<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = PBXCopyFilesBuildPhase;<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buildActionMask = 2147483647;<br class="">@@ -1427,6 +1453,8 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>49DEF1201CD7BD90006A7C7D /* BlockPointer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BlockPointer.h; path = Language/CPlusPlus/BlockPointer.h; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7E0A10F1B83100F91463 /* Breakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Breakpoint.cpp; path = source/Breakpoint/Breakpoint.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7CEE10F1B71400F91463 /* Breakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Breakpoint.h; path = include/lldb/Breakpoint/Breakpoint.h; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>2660387D211CA98200329572 /* BreakpointBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointBase.cpp; path = "tools/lldb-vscode/BreakpointBase.cpp"; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603872211CA90D00329572 /* BreakpointBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointBase.h; path = "tools/lldb-vscode/BreakpointBase.h"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7E0B10F1B83100F91463 /* BreakpointID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointID.cpp; path = source/Breakpoint/BreakpointID.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7CEF10F1B71400F91463 /* BreakpointID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointID.h; path = include/lldb/Breakpoint/BreakpointID.h; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7E0C10F1B83100F91463 /* BreakpointIDList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointIDList.cpp; path = source/Breakpoint/BreakpointIDList.cpp; sourceTree = "<group>"; };<br class="">@@ -1497,6 +1525,7 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>23E2E5191D9036F2006F38BB /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>23E2E5361D9048FB006F38BB /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>2669415B1A6DC2AB0063BE93 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CMakeLists.txt; path = "tools/lldb-mi/CMakeLists.txt"; sourceTree = SOURCE_ROOT; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792617211CA3E100EE1D10 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CMakeLists.txt; path = "tools/lldb-vscode/CMakeLists.txt"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>9A1890311F47D5D400394BCA /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CMakeLists.txt; path = TestingSupport/CMakeLists.txt; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>4CB443BC1249920C00C13DC2 /* CPPLanguageRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CPPLanguageRuntime.cpp; path = source/Target/CPPLanguageRuntime.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>4CB443BB1249920C00C13DC2 /* CPPLanguageRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CPPLanguageRuntime.h; path = include/lldb/Target/CPPLanguageRuntime.h; sourceTree = "<group>"; };<br class="">@@ -1796,6 +1825,8 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>6B74D89C2006972D0074051B /* Environment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Environment.h; path = include/lldb/Utility/Environment.h; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7E7910F1B85900F91463 /* Event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Event.cpp; path = source/Core/Event.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7D6110F1B77400F91463 /* Event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Event.h; path = include/lldb/Core/Event.h; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603874211CA90E00329572 /* ExceptionBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExceptionBreakpoint.cpp; path = "tools/lldb-vscode/ExceptionBreakpoint.cpp"; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603873211CA90E00329572 /* ExceptionBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExceptionBreakpoint.h; path = "tools/lldb-vscode/ExceptionBreakpoint.h"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7F3510F1B90C00F91463 /* ExecutionContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExecutionContext.cpp; path = source/Target/ExecutionContext.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7DF210F1B81A00F91463 /* ExecutionContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExecutionContext.h; path = include/lldb/Target/ExecutionContext.h; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>26DAFD9711529BC7005A394E /* ExecutionContextScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExecutionContextScope.h; path = include/lldb/Target/ExecutionContextScope.h; sourceTree = "<group>"; };<br class="">@@ -1847,6 +1878,8 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>269FF07D12494F7D00225026 /* FuncUnwinders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FuncUnwinders.h; path = include/lldb/Symbol/FuncUnwinders.h; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7F1810F1B8EC00F91463 /* Function.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Function.cpp; path = source/Symbol/Function.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7C5A10F1B6E900F91463 /* Function.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Function.h; path = include/lldb/Symbol/Function.h; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603877211CA90E00329572 /* FunctionBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FunctionBreakpoint.cpp; path = "tools/lldb-vscode/FunctionBreakpoint.cpp"; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603871211CA90D00329572 /* FunctionBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FunctionBreakpoint.h; path = "tools/lldb-vscode/FunctionBreakpoint.h"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>4C0083321B9A5DE200D5CF24 /* FunctionCaller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FunctionCaller.cpp; path = source/Expression/FunctionCaller.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>4C00832D1B9A58A700D5CF24 /* FunctionCaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FunctionCaller.h; path = include/lldb/Expression/FunctionCaller.h; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>2374D74E1D4BB299005C9575 /* GDBRemoteClientBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteClientBase.cpp; sourceTree = "<group>"; };<br class="">@@ -1977,6 +2010,8 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>942829551A89614C00521B30 /* JSON.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSON.cpp; path = source/Utility/JSON.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>942829541A89614000521B30 /* JSON.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JSON.h; path = include/lldb/Utility/JSON.h; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>8C3BD99F1EF5D1B50016C343 /* JSONTest.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSONTest.cpp; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603875211CA90E00329572 /* JSONUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSONUtils.cpp; path = "tools/lldb-vscode/JSONUtils.cpp"; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603876211CA90E00329572 /* JSONUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSONUtils.h; path = "tools/lldb-vscode/JSONUtils.h"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>6D0F61411C80AAAA00A4ECEE /* JavaASTContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JavaASTContext.cpp; path = source/Symbol/JavaASTContext.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>6D0F613D1C80AA8900A4ECEE /* JavaASTContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JavaASTContext.h; path = include/lldb/Symbol/JavaASTContext.h; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>6D0F61511C80AB3000A4ECEE /* JavaFormatterFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JavaFormatterFunctions.cpp; path = Language/Java/JavaFormatterFunctions.cpp; sourceTree = "<group>"; };<br class="">@@ -1993,6 +2028,8 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>6D762BEC1B1605CD006C929D /* LLDBServerUtilities.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LLDBServerUtilities.cpp; path = "tools/lldb-server/LLDBServerUtilities.cpp"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>6D762BED1B1605CD006C929D /* LLDBServerUtilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LLDBServerUtilities.h; path = "tools/lldb-server/LLDBServerUtilities.h"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>2361029A1CF38A2B00B8E0B9 /* LLDBStandalone.cmake */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LLDBStandalone.cmake; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26F76199211CBBB30044F6EA /* LLDBUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLDBUtils.cpp; path = "tools/lldb-vscode/LLDBUtils.cpp"; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>26F7619A211CBBB30044F6EA /* LLDBUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLDBUtils.h; path = "tools/lldb-vscode/LLDBUtils.h"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>26A4EEB511682AAC007A372A /* LLDBWrapPython.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = LLDBWrapPython.cpp; sourceTree = BUILT_PRODUCTS_DIR; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>AEB0E4581BD6E9F800B24093 /* LLVMUserExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLVMUserExpression.cpp; path = source/Expression/LLVMUserExpression.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>AEB0E45A1BD6EA1400B24093 /* LLVMUserExpression.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LLVMUserExpression.h; path = include/lldb/Expression/LLVMUserExpression.h; sourceTree = "<group>"; };<br class="">@@ -2199,9 +2236,6 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7E8010F1B85900F91463 /* Mangled.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Mangled.cpp; path = source/Core/Mangled.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7D6910F1B77400F91463 /* Mangled.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Mangled.h; path = include/lldb/Core/Mangled.h; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>4F29D3CD21010F84003B549A /* MangledTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MangledTest.cpp; sourceTree = "<group>"; };<br class="">-<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>4FBC04EE211A06820015A814 /* RichManglingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RichManglingContext.h; path = include/lldb/Core/RichManglingContext.h; sourceTree = "<group>"; };<br class="">-<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>4FBC04EC211A06200015A814 /* RichManglingContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RichManglingContext.cpp; path = source/Core/RichManglingContext.cpp; sourceTree = "<group>"; };<br class="">-<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>4FBC04F3211A0F0F0015A814 /* RichManglingContextTest.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RichManglingContextTest.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>4CD44CF920B37C440003557C /* ManualDWARFIndex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ManualDWARFIndex.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>4CD44D0020B37C580003557C /* ManualDWARFIndex.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ManualDWARFIndex.h; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>2682100C143A59AE004BCF2D /* MappedHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MappedHash.h; path = include/lldb/Core/MappedHash.h; sourceTree = "<group>"; };<br class="">@@ -2638,6 +2672,9 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>948554581DCBAE3200345FF5 /* RenderScriptScriptGroup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RenderScriptScriptGroup.h; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>23D065861D4A7BDA0008EDE6 /* RenderScriptx86ABIFixups.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderScriptx86ABIFixups.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>23D065871D4A7BDA0008EDE6 /* RenderScriptx86ABIFixups.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderScriptx86ABIFixups.h; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>4FBC04EC211A06200015A814 /* RichManglingContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RichManglingContext.cpp; path = source/Core/RichManglingContext.cpp; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>4FBC04EE211A06820015A814 /* RichManglingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RichManglingContext.h; path = include/lldb/Core/RichManglingContext.h; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>4FBC04F3211A0F0F0015A814 /* RichManglingContextTest.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RichManglingContextTest.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>26DE204411618ADA00A093E2 /* SBAddress.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBAddress.cpp; path = source/API/SBAddress.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>26DE204211618ACA00A093E2 /* SBAddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBAddress.h; path = include/lldb/API/SBAddress.h; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>2611FEEF142D83060017FEA3 /* SBAddress.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBAddress.i; sourceTree = "<group>"; };<br class="">@@ -2867,8 +2904,11 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>2321F93A1BDD332400BA9A93 /* SocketTest.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SocketTest.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>232CB613191E00CC00EF39FC /* SoftwareBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SoftwareBreakpoint.cpp; path = source/Host/common/SoftwareBreakpoint.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>267A47F21B14115A0021A5BC /* SoftwareBreakpoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SoftwareBreakpoint.h; path = include/lldb/Host/common/SoftwareBreakpoint.h; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603870211CA90D00329572 /* SourceBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SourceBreakpoint.cpp; path = "tools/lldb-vscode/SourceBreakpoint.cpp"; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>2660386D211CA90C00329572 /* SourceBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SourceBreakpoint.h; path = "tools/lldb-vscode/SourceBreakpoint.h"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7E8F10F1B85900F91463 /* SourceManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SourceManager.cpp; path = source/Core/SourceManager.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7D7610F1B77400F91463 /* SourceManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SourceManager.h; path = include/lldb/Core/SourceManager.h; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>26F76198211CB8870044F6EA /* SourceReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SourceReference.h; path = "tools/lldb-vscode/SourceReference.h"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7F3810F1B90C00F91463 /* StackFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StackFrame.cpp; path = source/Target/StackFrame.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7DF510F1B81A00F91463 /* StackFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StackFrame.h; path = include/lldb/Target/StackFrame.h; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7F3910F1B90C00F91463 /* StackFrameList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StackFrameList.cpp; path = source/Target/StackFrameList.cpp; sourceTree = "<group>"; };<br class="">@@ -3135,6 +3175,9 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>9A3D43C41F3150D200EB767C /* VASprintfTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VASprintfTest.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>AFC2DCEF1E6E2FD200283714 /* VMRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VMRange.cpp; path = source/Utility/VMRange.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>AFC2DCF11E6E2FDA00283714 /* VMRange.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VMRange.h; path = include/lldb/Utility/VMRange.h; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>2660386E211CA90D00329572 /* VSCode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VSCode.cpp; path = "tools/lldb-vscode/VSCode.cpp"; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>2660386F211CA90D00329572 /* VSCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VSCode.h; path = "tools/lldb-vscode/VSCode.h"; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>26F7619C211CDD700044F6EA /* VSCodeForward.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VSCodeForward.h; path = "tools/lldb-vscode/VSCodeForward.h"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7E9910F1B85900F91463 /* Value.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Value.cpp; path = source/Core/Value.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7D8110F1B77400F91463 /* Value.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Value.h; path = include/lldb/Core/Value.h; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7E9A10F1B85900F91463 /* ValueObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObject.cpp; path = source/Core/ValueObject.cpp; sourceTree = "<group>"; };<br class="">@@ -3217,6 +3260,7 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>2326CF471BDD67C100A5CEAC /* libncurses.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libncurses.dylib; path = ../../../../../../usr/lib/libncurses.dylib; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>239481851C59EBDD00DF7168 /* libncurses.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libncurses.dylib; path = ../../../../../usr/lib/libncurses.dylib; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>2670F8111862B44A006B332C /* libncurses.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libncurses.dylib; path = /usr/lib/libncurses.dylib; sourceTree = "<absolute>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792621211CA41E00EE1D10 /* libncurses.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libncurses.tbd; path = usr/lib/libncurses.tbd; sourceTree = SDKROOT; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>26F5C37410F3F61B009D5894 /* libobjc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libobjc.dylib; path = /usr/lib/libobjc.dylib; sourceTree = "<absolute>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>2326CF4E1BDD687800A5CEAC /* libpanel.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpanel.dylib; path = ../../../../../../usr/lib/libpanel.dylib; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>260157C41885F4FF00F875CF /* libpanel.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpanel.dylib; path = /usr/lib/libpanel.dylib; sourceTree = "<absolute>"; };<br class="">@@ -3250,11 +3294,15 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>E769331D1A94D18100C73337 /* lldb-server.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "lldb-server.cpp"; path = "tools/lldb-server/lldb-server.cpp"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7C2910F1B3BC00F91463 /* lldb-types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "lldb-types.h"; path = "include/lldb/lldb-types.h"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>94145430175D7FDE00284436 /* lldb-versioning.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "lldb-versioning.h"; path = "include/lldb/lldb-versioning.h"; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>2679260C211CA3AC00EE1D10 /* lldb-vscode */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "lldb-vscode"; sourceTree = BUILT_PRODUCTS_DIR; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792618211CA3E100EE1D10 /* lldb-vscode-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "lldb-vscode-Info.plist"; path = "tools/lldb-vscode/lldb-vscode-Info.plist"; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792619211CA3E100EE1D10 /* lldb-vscode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "lldb-vscode.cpp"; path = "tools/lldb-vscode/lldb-vscode.cpp"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>23173F8B192BA93F005C708F /* lldb-x86-register-enums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "lldb-x86-register-enums.h"; path = "Utility/lldb-x86-register-enums.h"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>AF90106315AB7C5700FF120D /* lldb.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; name = lldb.1; path = docs/lldb.1; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>26BC7E7410F1B85900F91463 /* lldb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lldb.cpp; path = source/lldb.cpp; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>2669605E1199F4230075C61A /* lldb.swig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = lldb.swig; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>94E367CC140C4EC4001C7A5A /* modify-python-lldb.py */ = {isa = PBXFileReference; lastKnownFileType = text.script.python; path = "modify-python-lldb.py"; sourceTree = "<group>"; };<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792616211CA3E100EE1D10 /* package.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = package.json; path = "tools/lldb-vscode/package.json"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>9A48A3A7124AAA5A00922451 /* python-extensions.swig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "python-extensions.swig"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>944DC3481774C99000D7D884 /* python-swigsafecast.swig */ = {isa = PBXFileReference; lastKnownFileType = text; path = "python-swigsafecast.swig"; sourceTree = "<group>"; };<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>94E367CE140C4EEA001C7A5A /* python-typemaps.swig */ = {isa = PBXFileReference; lastKnownFileType = text; path = "python-typemaps.swig"; sourceTree = "<group>"; };<br class="">@@ -3322,6 +3370,15 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>runOnlyForDeploymentPostprocessing = 0;<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792609211CA3AC00EE1D10 /* Frameworks */ = {<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = PBXFrameworksBuildPhase;<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buildActionMask = 2147483647;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>files = (<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792623211CA42300EE1D10 /* LLDB.framework in Frameworks */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792622211CA41E00EE1D10 /* libncurses.tbd in Frameworks */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>runOnlyForDeploymentPostprocessing = 0;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2689FFC713353D7A00698AC0 /* Frameworks */ = {<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = PBXFrameworksBuildPhase;<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buildActionMask = 2147483647;<br class="">@@ -3437,6 +3494,7 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>942829C01A89835300521B30 /* lldb-argdumper */,<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>239504D41BDD451400963CEA /* lldb-gtest */,<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>23CB15561D66DA9300EDDDE1 /* lldb-gtest */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2679260C211CA3AC00EE1D10 /* lldb-vscode */,<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>name = Products;<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>sourceTree = "<group>";<br class="">@@ -3672,6 +3730,7 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>23CB14E21D66CA2200EDDDE1 /* Frameworks */ = {<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = PBXGroup;<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>children = (<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792621211CA41E00EE1D10 /* libncurses.tbd */,<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>23CB14E31D66CA2200EDDDE1 /* libxml2.2.dylib */,<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>name = Frameworks;<br class="">@@ -4469,6 +4528,33 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>path = OperatingSystem;<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>sourceTree = "<group>";<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792615211CA3C100EE1D10 /* lldb-vscode */ = {<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = PBXGroup;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>children = (<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792617211CA3E100EE1D10 /* CMakeLists.txt */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792618211CA3E100EE1D10 /* lldb-vscode-Info.plist */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792619211CA3E100EE1D10 /* lldb-vscode.cpp */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792616211CA3E100EE1D10 /* package.json */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2660387D211CA98200329572 /* BreakpointBase.cpp */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603872211CA90D00329572 /* BreakpointBase.h */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603874211CA90E00329572 /* ExceptionBreakpoint.cpp */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603873211CA90E00329572 /* ExceptionBreakpoint.h */,<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603877211CA90E00329572 /* FunctionBreakpoint.cpp */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603871211CA90D00329572 /* FunctionBreakpoint.h */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603875211CA90E00329572 /* JSONUtils.cpp */,<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603876211CA90E00329572 /* JSONUtils.h */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26F76199211CBBB30044F6EA /* LLDBUtils.cpp */,<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26F7619A211CBBB30044F6EA /* LLDBUtils.h */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603870211CA90D00329572 /* SourceBreakpoint.cpp */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2660386D211CA90C00329572 /* SourceBreakpoint.h */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26F76198211CB8870044F6EA /* SourceReference.h */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2660386E211CA90D00329572 /* VSCode.cpp */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2660386F211CA90D00329572 /* VSCode.h */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26F7619C211CDD700044F6EA /* VSCodeForward.h */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>name = "lldb-vscode";<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>sourceTree = "<group>";<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>267F68461CC02DED0086832B /* SysV-s390x */ = {<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = PBXGroup;<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>children = (<br class="">@@ -5844,6 +5930,7 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = PBXGroup;<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>children = (<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>E769331B1A94D10E00C73337 /* lldb-server */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792615211CA3C100EE1D10 /* lldb-vscode */,<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>942829BA1A89830900521B30 /* argdumper */,<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26579F55126A255E0007C5CB /* darwin-debug */,<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>265E9BE0115C2B8500D0DCCB /* debugserver */,<br class="">@@ -7098,6 +7185,24 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>productReference = 26680207115FD0ED008E1FE4 /* LLDB.framework */;<br class=""> <span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>productType = "com.apple.product-type.framework";<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2679260B211CA3AC00EE1D10 /* lldb-vscode */ = {<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = PBXNativeTarget;<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buildConfigurationList = 26792614211CA3AD00EE1D10 /* Build configuration list for PBXNativeTarget "lldb-vscode" */;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buildPhases = (<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792608211CA3AC00EE1D10 /* Sources */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792609211CA3AC00EE1D10 /* Frameworks */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2679260A211CA3AC00EE1D10 /* CopyFiles */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buildRules = (<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>dependencies = (<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792620211CA40700EE1D10 /* PBXTargetDependency */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>name = "lldb-vscode";<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>productName = "lldb-vscode";<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>productReference = 2679260C211CA3AC00EE1D10 /* lldb-vscode */;<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>productType = "com.apple.product-type.tool";<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2689FFC913353D7A00698AC0 /* lldb-core */ = {<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = PBXNativeTarget;<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buildConfigurationList = 2689FFD813353D7A00698AC0 /* Build configuration list for PBXNativeTarget "lldb-core" */;<br class="">@@ -7202,6 +7307,9 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>239504D31BDD451400963CEA = {<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CreatedOnToolsVersion = 7.1;<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2679260B211CA3AC00EE1D10 = {<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CreatedOnToolsVersion = 9.4.1;<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2690CD161A6DC0D000E717C8 = {<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CreatedOnToolsVersion = 6.3;<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">@@ -7242,6 +7350,7 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2687EAC51508110B00DD8C2E /* install-headers */,<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2690CD161A6DC0D000E717C8 /* lldb-mi */,<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>942829BF1A89835300521B30 /* lldb-argdumper */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2679260B211CA3AC00EE1D10 /* lldb-vscode */,<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class=""> /* End PBXProject section */<br class="">@@ -7588,6 +7697,21 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>runOnlyForDeploymentPostprocessing = 0;<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792608211CA3AC00EE1D10 /* Sources */ = {<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = PBXSourcesBuildPhase;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buildActionMask = 2147483647;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>files = (<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2679261E211CA3F200EE1D10 /* lldb-vscode.cpp in Sources */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2660387E211CA98200329572 /* BreakpointBase.cpp in Sources */,<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603879211CA90F00329572 /* SourceBreakpoint.cpp in Sources */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2660387A211CA90F00329572 /* ExceptionBreakpoint.cpp in Sources */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2660387B211CA90F00329572 /* JSONUtils.cpp in Sources */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26F7619B211CBBB30044F6EA /* LLDBUtils.cpp in Sources */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2660387C211CA90F00329572 /* FunctionBreakpoint.cpp in Sources */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26603878211CA90F00329572 /* VSCode.cpp in Sources */,<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>runOnlyForDeploymentPostprocessing = 0;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2689FFC613353D7A00698AC0 /* Sources */ = {<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = PBXSourcesBuildPhase;<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buildActionMask = 2147483647;<br class="">@@ -8384,6 +8508,11 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>target = 26680206115FD0ED008E1FE4 /* LLDB */;<br class=""> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>targetProxy = 266803611160110D008E1FE4 /* PBXContainerItemProxy */;<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792620211CA40700EE1D10 /* PBXTargetDependency */ = {<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = PBXTargetDependency;<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>target = 26680206115FD0ED008E1FE4 /* LLDB */;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>targetProxy = 2679261F211CA40700EE1D10 /* PBXContainerItemProxy */;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2687EACB1508115000DD8C2E /* PBXTargetDependency */ = {<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = PBXTargetDependency;<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>target = 2687EAC51508110B00DD8C2E /* install-headers */;<br class="">@@ -9273,6 +9402,212 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>name = Release;<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792610211CA3AD00EE1D10 /* Debug */ = {<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = XCBuildConfiguration;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buildSettings = {<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_ANALYZER_NONNULL = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_ENABLE_MODULES = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_ENABLE_OBJC_ARC = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_COMMA = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_DOCUMENTATION_COMMENTS = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_INFINITE_RECURSION = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_STRICT_PROTOTYPES = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_SUSPICIOUS_MOVE = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CURRENT_PROJECT_VERSION = 360.99.0;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_C_LANGUAGE_STANDARD = gnu99;<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_DYNAMIC_NO_PIC = NO;<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_PREPROCESSOR_DEFINITIONS = (<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"DEBUG=1",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"$(inherited)",<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_SYMBOLS_PRIVATE_EXTERN = NO;<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>MTL_ENABLE_DEBUG_INFO = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>OTHER_LDFLAGS = (<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-sectcreate",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>__TEXT,<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>__info_plist,<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"$(PROJECT_DIR)/tools/lldb-vscode/lldb-vscode-Info.plist",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-Wl,-rpath,@loader_path/",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-filelist",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"$(LLVM_BUILD_DIR)/archives.txt",<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>PRODUCT_NAME = "$(TARGET_NAME)";<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>SDKROOT = macosx;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/include $(SRCROOT)/source $(LLVM_SOURCE_DIR)/include $(LLVM_SOURCE_DIR)/tools/clang/include $(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/include $(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/tools/clang/include $(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/lib/Target/ARM";<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>VERSIONING_SYSTEM = "apple-generic";<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>name = Debug;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792611211CA3AD00EE1D10 /* DebugClang */ = {<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = XCBuildConfiguration;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buildSettings = {<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_ANALYZER_NONNULL = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_ENABLE_MODULES = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_ENABLE_OBJC_ARC = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_COMMA = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_DOCUMENTATION_COMMENTS = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_INFINITE_RECURSION = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_STRICT_PROTOTYPES = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_SUSPICIOUS_MOVE = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CURRENT_PROJECT_VERSION = 360.99.0;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_C_LANGUAGE_STANDARD = gnu99;<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_DYNAMIC_NO_PIC = NO;<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_PREPROCESSOR_DEFINITIONS = (<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"DEBUG=1",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"$(inherited)",<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_SYMBOLS_PRIVATE_EXTERN = NO;<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>MTL_ENABLE_DEBUG_INFO = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>OTHER_LDFLAGS = (<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-sectcreate",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>__TEXT,<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>__info_plist,<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"$(PROJECT_DIR)/tools/lldb-vscode/lldb-vscode-Info.plist",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-Wl,-rpath,@loader_path/",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-filelist",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"$(LLVM_BUILD_DIR)/archives.txt",<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>PRODUCT_NAME = "$(TARGET_NAME)";<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>SDKROOT = macosx;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/include $(SRCROOT)/source $(LLVM_SOURCE_DIR)/include $(LLVM_SOURCE_DIR)/tools/clang/include $(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/include $(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/tools/clang/include $(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/lib/Target/ARM";<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>VERSIONING_SYSTEM = "apple-generic";<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>name = DebugClang;<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792612211CA3AD00EE1D10 /* Release */ = {<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = XCBuildConfiguration;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buildSettings = {<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_ANALYZER_NONNULL = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_ENABLE_MODULES = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_ENABLE_OBJC_ARC = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_COMMA = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_DOCUMENTATION_COMMENTS = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_INFINITE_RECURSION = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_STRICT_PROTOTYPES = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_SUSPICIOUS_MOVE = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CURRENT_PROJECT_VERSION = 360.99.0;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>ENABLE_NS_ASSERTIONS = NO;<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_C_LANGUAGE_STANDARD = gnu99;<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>MTL_ENABLE_DEBUG_INFO = NO;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>OTHER_LDFLAGS = (<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-sectcreate",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>__TEXT,<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>__info_plist,<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"$(PROJECT_DIR)/tools/lldb-vscode/lldb-vscode-Info.plist",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-Wl,-rpath,@loader_path/",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-filelist",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"$(LLVM_BUILD_DIR)/archives.txt",<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>PRODUCT_NAME = "$(TARGET_NAME)";<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>SDKROOT = macosx;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/include $(SRCROOT)/source $(LLVM_SOURCE_DIR)/include $(LLVM_SOURCE_DIR)/tools/clang/include $(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/include $(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/tools/clang/include $(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/lib/Target/ARM";<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>VERSIONING_SYSTEM = "apple-generic";<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>name = Release;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792613211CA3AD00EE1D10 /* BuildAndIntegration */ = {<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = XCBuildConfiguration;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buildSettings = {<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_ANALYZER_NONNULL = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_ENABLE_MODULES = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_ENABLE_OBJC_ARC = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_COMMA = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_DOCUMENTATION_COMMENTS = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_INFINITE_RECURSION = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_STRICT_PROTOTYPES = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_SUSPICIOUS_MOVE = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>COPY_PHASE_STRIP = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>CURRENT_PROJECT_VERSION = 360.99.0;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>ENABLE_NS_ASSERTIONS = NO;<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_C_LANGUAGE_STANDARD = gnu99;<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>MTL_ENABLE_DEBUG_INFO = NO;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"OTHER_LDFLAGS[sdk=iphoneos*]" = (<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-sectcreate",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>__TEXT,<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>__info_plist,<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"$(PROJECT_DIR)/tools/lldb-vscode/lldb-vscode-Info.plist",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-Wl,-rpath,@loader_path/../../../System/Library/PrivateFrameworks",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-filelist",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"$(LLVM_BUILD_DIR)/archives.txt",<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"OTHER_LDFLAGS[sdk=macosx*]" = (<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-sectcreate",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>__TEXT,<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>__info_plist,<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"$(PROJECT_DIR)/tools/lldb-vscode/lldb-vscode-Info.plist",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-Wl,-rpath,@loader_path/../../Library/PrivateFrameworks/",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-Wl,-rpath,@loader_path/../../../SharedFrameworks",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-Wl,-rpath,@loader_path/../../System/Library/PrivateFrameworks",<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-Wl,-rpath,@loader_path/../../Library/PrivateFrameworks",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"-filelist",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"$(LLVM_BUILD_DIR)/archives.txt",<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>PRODUCT_NAME = "$(TARGET_NAME)";<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>SDKROOT = macosx;<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>STRIP_INSTALLED_PRODUCT = YES;<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/include $(SRCROOT)/source $(LLVM_SOURCE_DIR)/include $(LLVM_SOURCE_DIR)/tools/clang/include $(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/include $(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/tools/clang/include $(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/lib/Target/ARM";<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>VERSIONING_SYSTEM = "apple-generic";<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>name = BuildAndIntegration;<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2687EAC71508110B00DD8C2E /* Debug */ = {<br class=""> <span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = XCBuildConfiguration;<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buildSettings = {<br class="">@@ -10965,6 +11300,17 @@<br class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>defaultConfigurationIsVisible = 0;<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>defaultConfigurationName = BuildAndIntegration;<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792614211CA3AD00EE1D10 /* Build configuration list for PBXNativeTarget "lldb-vscode" */ = {<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = XCConfigurationList;<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>buildConfigurations = (<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792610211CA3AD00EE1D10 /* Debug */,<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792611211CA3AD00EE1D10 /* DebugClang */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792612211CA3AD00EE1D10 /* Release */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>26792613211CA3AD00EE1D10 /* BuildAndIntegration */,<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>);<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>defaultConfigurationIsVisible = 0;<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>defaultConfigurationName = BuildAndIntegration;<br class=""> <span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>};<br class=""> <span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>2687EAC61508110B00DD8C2E /* Build configuration list for PBXLegacyTarget "install-headers" */ = {<br class=""> <span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>isa = XCConfigurationList;<br class=""><br class="">Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=339911&r1=339910&r2=339911&view=diff" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=339911&r1=339910&r2=339911&view=diff</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Thu Aug 16 10:59:38 2018<br class="">@@ -646,6 +646,7 @@ def setupSysPath():<br class=""><br class="">     pluginPath = os.path.join(scriptPath, 'plugins')<br class="">     toolsLLDBMIPath = os.path.join(scriptPath, 'tools', 'lldb-mi')<br class="">+    toolsLLDBVSCode = os.path.join(scriptPath, 'tools', 'lldb-vscode')<br class="">     toolsLLDBServerPath = os.path.join(scriptPath, 'tools', 'lldb-server')<br class=""><br class="">     # Insert script dir, plugin dir, lldb-mi dir and lldb-server dir to the<br class="">@@ -654,6 +655,9 @@ def setupSysPath():<br class="">     # Adding test/tools/lldb-mi to the path makes it easy<br class="">     sys.path.insert(0, toolsLLDBMIPath)<br class="">     # to "import lldbmi_testcase" from the MI tests<br class="">+    # Adding test/tools/lldb-vscode to the path makes it easy to<br class="">+    # "import lldb_vscode_testcase" from the VSCode tests<br class="">+    sys.path.insert(0, toolsLLDBVSCode)<br class="">     # Adding test/tools/lldb-server to the path makes it easy<br class="">     sys.path.insert(0, toolsLLDBServerPath)<br class="">     # to "import lldbgdbserverutils" from the lldb-server tests<br class="">@@ -723,6 +727,15 @@ def setupSysPath():<br class="">                 "The 'lldb-mi' executable cannot be located.  The lldb-mi tests can not be run as a result.")<br class="">             configuration.skipCategories.append("lldb-mi")<br class=""><br class="">+    lldbVSCodeExec = os.path.join(lldbDir, "lldb-vscode")<br class="">+    if is_exe(lldbVSCodeExec):<br class="">+        os.environ["LLDBVSCODE_EXEC"] = lldbVSCodeExec<br class="">+    else:<br class="">+        if not configuration.shouldSkipBecauseOfCategories(["lldb-vscode"]):<br class="">+            print(<br class="">+                "The 'lldb-vscode' executable cannot be located.  The lldb-vscode tests can not be run as a result.")<br class="">+            configuration.skipCategories.append("lldb-vscode")<br class="">+<br class="">     lldbPythonDir = None  # The directory that contains 'lldb/__init__.py'<br class="">     if not configuration.lldbFrameworkPath and os.path.exists(os.path.join(lldbLibDir, "LLDB.framework")):<br class="">         configuration.lldbFrameworkPath = os.path.join(lldbLibDir, "LLDB.framework")<br class=""><br class="">Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=339911&r1=339910&r2=339911&view=diff" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=339911&r1=339910&r2=339911&view=diff</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Thu Aug 16 10:59:38 2018<br class="">@@ -740,6 +740,11 @@ class Base(unittest2.TestCase):<br class="">         else:<br class="">             self.lldbMiExec = None<br class=""><br class="">+        if "LLDBVSCODE_EXEC" in os.environ:<br class="">+            self.lldbVSCodeExec = os.environ["LLDBVSCODE_EXEC"]<br class="">+        else:<br class="">+            self.lldbVSCodeExec = None<br class="">+<br class="">         # If we spawn an lldb process for test (via pexpect), do not load the<br class="">         # init file unless told otherwise.<br class="">         if "NO_LLDBINIT" in os.environ and "NO" == os.environ["NO_LLDBINIT"]:<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/.categories<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/.categories?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/.categories?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/.categories (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/.categories Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1 @@<br class="">+lldb-vscode<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,5 @@<br class="">+LEVEL = ../../../make<br class="">+<br class="">+C_SOURCES := main.c<br class="">+<br class="">+include $(LEVEL)/Makefile.rules<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/TestVSCode_attach.py<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/TestVSCode_attach.py?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/TestVSCode_attach.py?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/TestVSCode_attach.py (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/TestVSCode_attach.py Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,176 @@<br class="">+"""<br class="">+Test lldb-vscode setBreakpoints request<br class="">+"""<br class="">+<br class="">+from __future__ import print_function<br class="">+<br class="">+import unittest2<br class="">+import vscode<br class="">+from lldbsuite.test.decorators import *<br class="">+from lldbsuite.test.lldbtest import *<br class="">+from lldbsuite.test import lldbutil<br class="">+import lldbvscode_testcase<br class="">+import shutil<br class="">+import subprocess<br class="">+import tempfile<br class="">+import threading<br class="">+import time<br class="">+<br class="">+<br class="">+def spawn_and_wait(program, delay):<br class="">+    if delay:<br class="">+        time.sleep(delay)<br class="">+    process = subprocess.Popen([program],<br class="">+                               stdin=subprocess.PIPE,<br class="">+                               stdout=subprocess.PIPE,<br class="">+                               stderr=subprocess.PIPE)<br class="">+    process.wait()<br class="">+<br class="">+<br class="">+class TestVSCode_attach(lldbvscode_testcase.VSCodeTestCaseBase):<br class="">+<br class="">+    mydir = TestBase.compute_mydir(__file__)<br class="">+<br class="">+    def set_and_hit_breakpoint(self, continueToExit=True):<br class="">+        source = 'main.c'<br class="">+        breakpoint1_line = line_number(source, '// breakpoint 1')<br class="">+        lines = [breakpoint1_line]<br class="">+        # Set breakoint in the thread function so we can step the threads<br class="">+        breakpoint_ids = self.set_source_breakpoints(source, lines)<br class="">+        self.assertTrue(len(breakpoint_ids) == len(lines),<br class="">+                        "expect correct number of breakpoints")<br class="">+        self.continue_to_breakpoints(breakpoint_ids)<br class="">+        if continueToExit:<br class="">+            self.continue_to_exit()<br class="">+<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_by_pid(self):<br class="">+        '''<br class="">+            Tests attaching to a process by process ID.<br class="">+        '''<br class="">+        self.build_and_create_debug_adaptor()<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        self.process = subprocess.Popen([program],<br class="">+                                        stdin=subprocess.PIPE,<br class="">+                                        stdout=subprocess.PIPE,<br class="">+                                        stderr=subprocess.PIPE)<br class="">+        self.attach(pid=self.process.pid)<br class="">+        self.set_and_hit_breakpoint(continueToExit=True)<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_by_name(self):<br class="">+        '''<br class="">+            Tests attaching to a process by process name.<br class="">+        '''<br class="">+        self.build_and_create_debug_adaptor()<br class="">+        orig_program = self.getBuildArtifact("a.out")<br class="">+        # Since we are going to attach by process name, we need a unique<br class="">+        # process name that has minimal chance to match a process that is<br class="">+        # already running. To do this we use tempfile.mktemp() to give us a<br class="">+        # full path to a location where we can copy our executable. We then<br class="">+        # run this copy to ensure we don't get the error "more that one<br class="">+        # process matches 'a.out'".<br class="">+        program = tempfile.mktemp()<br class="">+        shutil.copyfile(orig_program, program)<br class="">+        shutil.copymode(orig_program, program)<br class="">+        self.process = subprocess.Popen([program],<br class="">+                                        stdin=subprocess.PIPE,<br class="">+                                        stdout=subprocess.PIPE,<br class="">+                                        stderr=subprocess.PIPE)<br class="">+        # Wait for a bit to ensure the process is launched<br class="">+        time.sleep(1)<br class="">+        self.attach(program=program)<br class="">+        self.set_and_hit_breakpoint(continueToExit=True)<br class="">+<br class="">+    @skipUnlessDarwin<br class="">+    @no_debug_info_test<br class="">+    def test_by_name_waitFor(self):<br class="">+        '''<br class="">+            Tests attaching to a process by process name and waiting for the<br class="">+            next instance of a process to be launched, ingoring all current<br class="">+            ones.<br class="">+        '''<br class="">+        self.build_and_create_debug_adaptor()<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        self.spawn_thread = threading.Thread(target=spawn_and_wait,<br class="">+                                             args=(program, 1.0,))<br class="">+        self.spawn_thread.start()<br class="">+        self.attach(program=program, waitFor=True)<br class="">+        self.set_and_hit_breakpoint(continueToExit=True)<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_commands(self):<br class="">+        '''<br class="">+            Tests the "initCommands", "preRunCommands", "stopCommands",<br class="">+            "exitCommands", and "attachCommands" that can be passed during<br class="">+            attach.<br class="">+<br class="">+            "initCommands" are a list of LLDB commands that get executed<br class="">+            before the targt is created.<br class="">+            "preRunCommands" are a list of LLDB commands that get executed<br class="">+            after the target has been created and before the launch.<br class="">+            "stopCommands" are a list of LLDB commands that get executed each<br class="">+            time the program stops.<br class="">+            "exitCommands" are a list of LLDB commands that get executed when<br class="">+            the process exits<br class="">+            "attachCommands" are a list of LLDB commands that get executed and<br class="">+            must have a valid process in the selected target in LLDB after<br class="">+            they are done executing. This allows custom commands to create any<br class="">+            kind of debug session.<br class="">+        '''<br class="">+        self.build_and_create_debug_adaptor()<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        # Here we just create a target and launch the process as a way to test<br class="">+        # if we are able to use attach commands to create any kind of a target<br class="">+        # and use it for debugging<br class="">+        attachCommands = [<br class="">+            'target create -d "%s"' % (program),<br class="">+            'process launch -- arg1'<br class="">+        ]<br class="">+        initCommands = ['target list', 'platform list']<br class="">+        preRunCommands = ['image list a.out', 'image dump sections a.out']<br class="">+        stopCommands = ['frame variable', 'bt']<br class="">+        exitCommands = ['expr 2+3', 'expr 3+4']<br class="">+        self.attach(program=program,<br class="">+                    attachCommands=attachCommands,<br class="">+                    initCommands=initCommands,<br class="">+                    preRunCommands=preRunCommands,<br class="">+                    stopCommands=stopCommands,<br class="">+                    exitCommands=exitCommands)<br class="">+<br class="">+        # Get output from the console. This should contain both the<br class="">+        # "initCommands" and the "preRunCommands".<br class="">+        output = self.get_console()<br class="">+        # Verify all "initCommands" were found in console output<br class="">+        self.verify_commands('initCommands', output, initCommands)<br class="">+        # Verify all "preRunCommands" were found in console output<br class="">+        self.verify_commands('preRunCommands', output, preRunCommands)<br class="">+<br class="">+        functions = ['main']<br class="">+        breakpoint_ids = self.set_function_breakpoints(functions)<br class="">+        self.assertTrue(len(breakpoint_ids) == len(functions),<br class="">+                        "expect one breakpoint")<br class="">+        self.continue_to_breakpoints(breakpoint_ids)<br class="">+        output = self.get_console(timeout=1.0)<br class="">+        self.verify_commands('stopCommands', output, stopCommands)<br class="">+<br class="">+        # Continue after launch and hit the "pause()" call and stop the target.<br class="">+        # Get output from the console. This should contain both the<br class="">+        # "stopCommands" that were run after we stop.<br class="">+        self.vscode.request_continue()<br class="">+        time.sleep(0.5)<br class="">+        self.vscode.request_pause()<br class="">+        self.vscode.wait_for_stopped()<br class="">+        output = self.get_console(timeout=1.0)<br class="">+        self.verify_commands('stopCommands', output, stopCommands)<br class="">+<br class="">+        # Continue until the program exits<br class="">+        self.continue_to_exit()<br class="">+        # Get output from the console. This should contain both the<br class="">+        # "exitCommands" that were run after the second breakpoint was hit<br class="">+        output = self.get_console(timeout=1.0)<br class="">+        self.verify_commands('exitCommands', output, exitCommands)<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,8 @@<br class="">+#include <stdio.h><br class="">+#include <unistd.h><br class="">+<br class="">+int main(int argc, char const *argv[]) {<br class="">+  printf("pid = %i\n", getpid());<br class="">+  sleep(5);<br class="">+  return 0; // breakpoint 1<br class="">+}<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,5 @@<br class="">+LEVEL = ../../../make<br class="">+<br class="">+CXX_SOURCES := main.cpp<br class="">+<br class="">+include $(LEVEL)/Makefile.rules<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,209 @@<br class="">+"""<br class="">+Test lldb-vscode setBreakpoints request<br class="">+"""<br class="">+<br class="">+from __future__ import print_function<br class="">+<br class="">+import pprint<br class="">+import unittest2<br class="">+import vscode<br class="">+from lldbsuite.test.decorators import *<br class="">+from lldbsuite.test.lldbtest import *<br class="">+from lldbsuite.test import lldbutil<br class="">+import lldbvscode_testcase<br class="">+import os<br class="">+<br class="">+<br class="">+class TestVSCode_setBreakpoints(lldbvscode_testcase.VSCodeTestCaseBase):<br class="">+<br class="">+    mydir = TestBase.compute_mydir(__file__)<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_set_and_clear(self):<br class="">+        '''Tests setting and clearing source file and line breakpoints.<br class="">+           This packet is a bit tricky on the debug adaptor side since there<br class="">+           is no "clearBreakpoints" packet. Source file and line breakpoints<br class="">+           are set by sending a "setBreakpoints" packet with a source file<br class="">+           specified and zero or more source lines. If breakpoints have been<br class="">+           set in the source file before, any exising breakpoints must remain<br class="">+           set, and any new breakpoints must be created, and any breakpoints<br class="">+           that were in previous requests and are not in the current request<br class="">+           must be removed. This function tests this setting and clearing<br class="">+           and makes sure things happen correctly. It doesn't test hitting<br class="">+           breakpoints and the functionality of each breakpoint, like<br class="">+           'conditions' and 'hitCondition' settings.'''<br class="">+        source_basename = 'main.cpp'<br class="">+        source_path = os.path.join(os.getcwd(), source_basename)<br class="">+        first_line = line_number('main.cpp', 'break 12')<br class="">+        second_line = line_number('main.cpp', 'break 13')<br class="">+        third_line = line_number('main.cpp', 'break 14')<br class="">+        lines = [first_line, second_line, third_line]<br class="">+<br class="">+        # Visual Studio Code Debug Adaptors have no way to specify the file<br class="">+        # without launching or attaching to a process, so we must start a<br class="">+        # process in order to be able to set breakpoints.<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        self.build_and_launch(program)<br class="">+<br class="">+        # Set 3 breakoints and verify that they got set correctly<br class="">+        response = self.vscode.request_setBreakpoints(source_path, lines)<br class="">+        line_to_id = {}<br class="">+        if response:<br class="">+            breakpoints = response['body']['breakpoints']<br class="">+            self.assertTrue(len(breakpoints) == len(lines),<br class="">+                            "expect %u source breakpoints" % (len(lines)))<br class="">+            for breakpoint in breakpoints:<br class="">+                line = breakpoint['line']<br class="">+                # Store the "id" of the breakpoint that was set for later<br class="">+                line_to_id[line] = breakpoint['id']<br class="">+                self.assertTrue(line in lines, "line expected in lines array")<br class="">+                self.assertTrue(breakpoint['verified'],<br class="">+                                "expect breakpoint verified")<br class="">+<br class="">+        # There is no breakpoint delete packet, clients just send another<br class="">+        # setBreakpoints packet with the same source file with fewer lines.<br class="">+        # Below we remove the second line entry and call the setBreakpoints<br class="">+        # function again. We want to verify that any breakpoints that were set<br class="">+        # before still have the same "id". This means we didn't clear the<br class="">+        # breakpoint and set it again at the same location. We also need to<br class="">+        # verify that the second line location was actually removed.<br class="">+        lines.remove(second_line)<br class="">+        # Set 2 breakoints and verify that the previous breakoints that were<br class="">+        # set above are still set.<br class="">+        response = self.vscode.request_setBreakpoints(source_path, lines)<br class="">+        if response:<br class="">+            breakpoints = response['body']['breakpoints']<br class="">+            self.assertTrue(len(breakpoints) == len(lines),<br class="">+                            "expect %u source breakpoints" % (len(lines)))<br class="">+            for breakpoint in breakpoints:<br class="">+                line = breakpoint['line']<br class="">+                # Verify the same breakpoints are still set within LLDB by<br class="">+                # making sure the breakpoint ID didn't change<br class="">+                self.assertTrue(line_to_id[line] == breakpoint['id'],<br class="">+                                "verify previous breakpoints stayed the same")<br class="">+                self.assertTrue(line in lines, "line expected in lines array")<br class="">+                self.assertTrue(breakpoint['verified'],<br class="">+                                "expect breakpoint still verified")<br class="">+<br class="">+        # Now get the full list of breakpoints set in the target and verify<br class="">+        # we have only 2 breakpoints set. The response above could have told<br class="">+        # us about 2 breakpoints, but we want to make sure we don't have the<br class="">+        # third one still set in the target<br class="">+        response = self.vscode.request_testGetTargetBreakpoints()<br class="">+        if response:<br class="">+            breakpoints = response['body']['breakpoints']<br class="">+            self.assertTrue(len(breakpoints) == len(lines),<br class="">+                            "expect %u source breakpoints" % (len(lines)))<br class="">+            for breakpoint in breakpoints:<br class="">+                line = breakpoint['line']<br class="">+                # Verify the same breakpoints are still set within LLDB by<br class="">+                # making sure the breakpoint ID didn't change<br class="">+                self.assertTrue(line_to_id[line] == breakpoint['id'],<br class="">+                                "verify previous breakpoints stayed the same")<br class="">+                self.assertTrue(line in lines, "line expected in lines array")<br class="">+                self.assertTrue(breakpoint['verified'],<br class="">+                                "expect breakpoint still verified")<br class="">+<br class="">+        # Now clear all breakpoints for the source file by passing down an<br class="">+        # empty lines array<br class="">+        lines = []<br class="">+        response = self.vscode.request_setBreakpoints(source_path, lines)<br class="">+        if response:<br class="">+            breakpoints = response['body']['breakpoints']<br class="">+            self.assertTrue(len(breakpoints) == len(lines),<br class="">+                            "expect %u source breakpoints" % (len(lines)))<br class="">+<br class="">+        # Verify with the target that all breakpoints have been cleared<br class="">+        response = self.vscode.request_testGetTargetBreakpoints()<br class="">+        if response:<br class="">+            breakpoints = response['body']['breakpoints']<br class="">+            self.assertTrue(len(breakpoints) == len(lines),<br class="">+                            "expect %u source breakpoints" % (len(lines)))<br class="">+<br class="">+        # Now set a breakpoint again in the same source file and verify it<br class="">+        # was added.<br class="">+        lines = [second_line]<br class="">+        response = self.vscode.request_setBreakpoints(source_path, lines)<br class="">+        if response:<br class="">+            breakpoints = response['body']['breakpoints']<br class="">+            self.assertTrue(len(breakpoints) == len(lines),<br class="">+                            "expect %u source breakpoints" % (len(lines)))<br class="">+            for breakpoint in breakpoints:<br class="">+                line = breakpoint['line']<br class="">+                self.assertTrue(line in lines, "line expected in lines array")<br class="">+                self.assertTrue(breakpoint['verified'],<br class="">+                                "expect breakpoint still verified")<br class="">+<br class="">+        # Now get the full list of breakpoints set in the target and verify<br class="">+        # we have only 2 breakpoints set. The response above could have told<br class="">+        # us about 2 breakpoints, but we want to make sure we don't have the<br class="">+        # third one still set in the target<br class="">+        response = self.vscode.request_testGetTargetBreakpoints()<br class="">+        if response:<br class="">+            breakpoints = response['body']['breakpoints']<br class="">+            self.assertTrue(len(breakpoints) == len(lines),<br class="">+                            "expect %u source breakpoints" % (len(lines)))<br class="">+            for breakpoint in breakpoints:<br class="">+                line = breakpoint['line']<br class="">+                self.assertTrue(line in lines, "line expected in lines array")<br class="">+                self.assertTrue(breakpoint['verified'],<br class="">+                                "expect breakpoint still verified")<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_functionality(self):<br class="">+        '''Tests hitting breakpoints and the functionality of a single<br class="">+           breakpoint, like 'conditions' and 'hitCondition' settings.'''<br class="">+        source_basename = 'main.cpp'<br class="">+        source_path = os.path.join(os.getcwd(), source_basename)<br class="">+        loop_line = line_number('main.cpp', '// break loop')<br class="">+<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        self.build_and_launch(program)<br class="">+        # Set a breakpoint at the loop line with no condition and no<br class="">+        # hitCondition<br class="">+        breakpoint_ids = self.set_source_breakpoints(source_path, [loop_line])<br class="">+        self.assertTrue(len(breakpoint_ids) == 1, "expect one breakpoint")<br class="">+        self.vscode.request_continue()<br class="">+<br class="">+        # Verify we hit the breakpoint we just set<br class="">+        self.verify_breakpoint_hit(breakpoint_ids)<br class="">+<br class="">+        # Make sure i is zero at first breakpoint<br class="">+        i = int(self.vscode.get_local_variable_value('i'))<br class="">+        self.assertTrue(i == 0, 'i != 0 after hitting breakpoint')<br class="">+<br class="">+        # Update the condition on our breakpoint<br class="">+        new_breakpoint_ids = self.set_source_breakpoints(source_path,<br class="">+                                                         [loop_line],<br class="">+                                                         condition="i==4")<br class="">+        self.assertTrue(breakpoint_ids == new_breakpoint_ids,<br class="">+                        "existing breakpoint should have its condition "<br class="">+                        "updated")<br class="">+<br class="">+        self.continue_to_breakpoints(breakpoint_ids)<br class="">+        i = int(self.vscode.get_local_variable_value('i'))<br class="">+        self.assertTrue(i == 4,<br class="">+                        'i != 4 showing conditional works')<br class="">+<br class="">+        new_breakpoint_ids = self.set_source_breakpoints(source_path,<br class="">+                                                         [loop_line],<br class="">+                                                         hitCondition="2")<br class="">+<br class="">+        self.assertTrue(breakpoint_ids == new_breakpoint_ids,<br class="">+                        "existing breakpoint should have its condition "<br class="">+                        "updated")<br class="">+<br class="">+        # Continue with a hitContidtion of 2 and expect it to skip 1 value<br class="">+        self.continue_to_breakpoints(breakpoint_ids)<br class="">+        i = int(self.vscode.get_local_variable_value('i'))<br class="">+        self.assertTrue(i == 6,<br class="">+                        'i != 6 showing hitCondition works')<br class="">+<br class="">+        # continue after hitting our hitCondition and make sure it only goes<br class="">+        # up by 1<br class="">+        self.continue_to_breakpoints(breakpoint_ids)<br class="">+        i = int(self.vscode.get_local_variable_value('i'))<br class="">+        self.assertTrue(i == 7,<br class="">+                        'i != 7 showing post hitCondition hits every time')<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setExceptionBreakpoints.py<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setExceptionBreakpoints.py?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setExceptionBreakpoints.py?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setExceptionBreakpoints.py (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setExceptionBreakpoints.py Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,50 @@<br class="">+"""<br class="">+Test lldb-vscode setBreakpoints request<br class="">+"""<br class="">+<br class="">+from __future__ import print_function<br class="">+<br class="">+import pprint<br class="">+import unittest2<br class="">+import vscode<br class="">+from lldbsuite.test.decorators import *<br class="">+from lldbsuite.test.lldbtest import *<br class="">+from lldbsuite.test import lldbutil<br class="">+import lldbvscode_testcase<br class="">+import os<br class="">+<br class="">+<br class="">+class TestVSCode_setExceptionBreakpoints(<br class="">+        lldbvscode_testcase.VSCodeTestCaseBase):<br class="">+<br class="">+    mydir = TestBase.compute_mydir(__file__)<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_functionality(self):<br class="">+        '''Tests setting and clearing exception breakpoints.<br class="">+           This packet is a bit tricky on the debug adaptor side since there<br class="">+           is no "clear exception breakpoints" packet. Exception breakpoints<br class="">+           are set by sending a "setExceptionBreakpoints" packet with zero or<br class="">+           more exception filters. If exception breakpoints have been set<br class="">+           before, any exising breakpoints must remain set, and any new<br class="">+           breakpoints must be created, and any breakpoints that were in<br class="">+           previous requests and are not in the current request must be<br class="">+           removed. This exception tests this setting and clearing and makes<br class="">+           sure things happen correctly. It doesn't test hitting breakpoints<br class="">+           and the functionality of each breakpoint, like 'conditions' and<br class="">+           x'hitCondition' settings.<br class="">+        '''<br class="">+        # Visual Studio Code Debug Adaptors have no way to specify the file<br class="">+        # without launching or attaching to a process, so we must start a<br class="">+        # process in order to be able to set breakpoints.<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        self.build_and_launch(program)<br class="">+<br class="">+        filters = ['cpp_throw', 'cpp_catch']<br class="">+        response = self.vscode.request_setExceptionBreakpoints(filters)<br class="">+        if response:<br class="">+            self.assertTrue(response['success'])<br class="">+<br class="">+        self.continue_to_exception_breakpoint('C++ Throw')<br class="">+        self.continue_to_exception_breakpoint('C++ Catch')<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.py<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.py?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.py?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.py (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.py Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,164 @@<br class="">+"""<br class="">+Test lldb-vscode setBreakpoints request<br class="">+"""<br class="">+<br class="">+from __future__ import print_function<br class="">+<br class="">+import pprint<br class="">+import unittest2<br class="">+import vscode<br class="">+from lldbsuite.test.decorators import *<br class="">+from lldbsuite.test.lldbtest import *<br class="">+from lldbsuite.test import lldbutil<br class="">+import lldbvscode_testcase<br class="">+import os<br class="">+<br class="">+<br class="">+class TestVSCode_setFunctionBreakpoints(<br class="">+        lldbvscode_testcase.VSCodeTestCaseBase):<br class="">+<br class="">+    mydir = TestBase.compute_mydir(__file__)<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_set_and_clear(self):<br class="">+        '''Tests setting and clearing function breakpoints.<br class="">+           This packet is a bit tricky on the debug adaptor side since there<br class="">+           is no "clearFunction Breakpoints" packet. Function breakpoints<br class="">+           are set by sending a "setFunctionBreakpoints" packet with zero or<br class="">+           more function names. If function breakpoints have been set before,<br class="">+           any exising breakpoints must remain set, and any new breakpoints<br class="">+           must be created, and any breakpoints that were in previous requests<br class="">+           and are not in the current request must be removed. This function<br class="">+           tests this setting and clearing and makes sure things happen<br class="">+           correctly. It doesn't test hitting breakpoints and the functionality<br class="">+           of each breakpoint, like 'conditions' and 'hitCondition' settings.<br class="">+        '''<br class="">+        # Visual Studio Code Debug Adaptors have no way to specify the file<br class="">+        # without launching or attaching to a process, so we must start a<br class="">+        # process in order to be able to set breakpoints.<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        self.build_and_launch(program)<br class="">+        bp_id_12 = None<br class="">+        functions = ['twelve']<br class="">+        # Set a function breakpoint at 'twelve'<br class="">+        response = self.vscode.request_setFunctionBreakpoints(functions)<br class="">+        if response:<br class="">+            breakpoints = response['body']['breakpoints']<br class="">+            self.assertTrue(len(breakpoints) == len(functions),<br class="">+                            "expect %u source breakpoints" % (len(functions)))<br class="">+            for breakpoint in breakpoints:<br class="">+                bp_id_12 = breakpoint['id']<br class="">+                self.assertTrue(breakpoint['verified'],<br class="">+                                "expect breakpoint verified")<br class="">+<br class="">+        # Add an extra name and make sure we have two breakpoints after this<br class="">+        functions.append('thirteen')<br class="">+        response = self.vscode.request_setFunctionBreakpoints(functions)<br class="">+        if response:<br class="">+            breakpoints = response['body']['breakpoints']<br class="">+            self.assertTrue(len(breakpoints) == len(functions),<br class="">+                            "expect %u source breakpoints" % (len(functions)))<br class="">+            for breakpoint in breakpoints:<br class="">+                self.assertTrue(breakpoint['verified'],<br class="">+                                "expect breakpoint verified")<br class="">+<br class="">+        # There is no breakpoint delete packet, clients just send another<br class="">+        # setFunctionBreakpoints packet with the different function names.<br class="">+        functions.remove('thirteen')<br class="">+        response = self.vscode.request_setFunctionBreakpoints(functions)<br class="">+        if response:<br class="">+            breakpoints = response['body']['breakpoints']<br class="">+            self.assertTrue(len(breakpoints) == len(functions),<br class="">+                            "expect %u source breakpoints" % (len(functions)))<br class="">+            for breakpoint in breakpoints:<br class="">+                bp_id = breakpoint['id']<br class="">+                self.assertTrue(bp_id == bp_id_12,<br class="">+                                'verify "twelve" breakpoint ID is same')<br class="">+                self.assertTrue(breakpoint['verified'],<br class="">+                                "expect breakpoint still verified")<br class="">+<br class="">+        # Now get the full list of breakpoints set in the target and verify<br class="">+        # we have only 1 breakpoints set. The response above could have told<br class="">+        # us about 1 breakpoints, but we want to make sure we don't have the<br class="">+        # second one still set in the target<br class="">+        response = self.vscode.request_testGetTargetBreakpoints()<br class="">+        if response:<br class="">+            breakpoints = response['body']['breakpoints']<br class="">+            self.assertTrue(len(breakpoints) == len(functions),<br class="">+                            "expect %u source breakpoints" % (len(functions)))<br class="">+            for breakpoint in breakpoints:<br class="">+                bp_id = breakpoint['id']<br class="">+                self.assertTrue(bp_id == bp_id_12,<br class="">+                                'verify "twelve" breakpoint ID is same')<br class="">+                self.assertTrue(breakpoint['verified'],<br class="">+                                "expect breakpoint still verified")<br class="">+<br class="">+        # Now clear all breakpoints for the source file by passing down an<br class="">+        # empty lines array<br class="">+        functions = []<br class="">+        response = self.vscode.request_setFunctionBreakpoints(functions)<br class="">+        if response:<br class="">+            breakpoints = response['body']['breakpoints']<br class="">+            self.assertTrue(len(breakpoints) == len(functions),<br class="">+                            "expect %u source breakpoints" % (len(functions)))<br class="">+<br class="">+        # Verify with the target that all breakpoints have been cleared<br class="">+        response = self.vscode.request_testGetTargetBreakpoints()<br class="">+        if response:<br class="">+            breakpoints = response['body']['breakpoints']<br class="">+            self.assertTrue(len(breakpoints) == len(functions),<br class="">+                            "expect %u source breakpoints" % (len(functions)))<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_functionality(self):<br class="">+        '''Tests hitting breakpoints and the functionality of a single<br class="">+           breakpoint, like 'conditions' and 'hitCondition' settings.'''<br class="">+<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        self.build_and_launch(program)<br class="">+        # Set a breakpoint on "twelve" with no condition and no hitCondition<br class="">+        functions = ['twelve']<br class="">+        breakpoint_ids = self.set_function_breakpoints(functions)<br class="">+<br class="">+        self.assertTrue(len(breakpoint_ids) == len(functions),<br class="">+                        "expect one breakpoint")<br class="">+<br class="">+        # Verify we hit the breakpoint we just set<br class="">+        self.continue_to_breakpoints(breakpoint_ids)<br class="">+<br class="">+        # Make sure i is zero at first breakpoint<br class="">+        i = int(self.vscode.get_local_variable_value('i'))<br class="">+        self.assertTrue(i == 0, 'i != 0 after hitting breakpoint')<br class="">+<br class="">+        # Update the condition on our breakpoint<br class="">+        new_breakpoint_ids = self.set_function_breakpoints(functions,<br class="">+                                                           condition="i==4")<br class="">+        self.assertTrue(breakpoint_ids == new_breakpoint_ids,<br class="">+                        "existing breakpoint should have its condition "<br class="">+                        "updated")<br class="">+<br class="">+        self.continue_to_breakpoints(breakpoint_ids)<br class="">+        i = int(self.vscode.get_local_variable_value('i'))<br class="">+        self.assertTrue(i == 4,<br class="">+                        'i != 4 showing conditional works')<br class="">+        new_breakpoint_ids = self.set_function_breakpoints(functions,<br class="">+                                                           hitCondition="2")<br class="">+<br class="">+        self.assertTrue(breakpoint_ids == new_breakpoint_ids,<br class="">+                        "existing breakpoint should have its condition "<br class="">+                        "updated")<br class="">+<br class="">+        # Continue with a hitContidtion of 2 and expect it to skip 1 value<br class="">+        self.continue_to_breakpoints(breakpoint_ids)<br class="">+        i = int(self.vscode.get_local_variable_value('i'))<br class="">+        self.assertTrue(i == 6,<br class="">+                        'i != 6 showing hitCondition works')<br class="">+<br class="">+        # continue after hitting our hitCondition and make sure it only goes<br class="">+        # up by 1<br class="">+        self.continue_to_breakpoints(breakpoint_ids)<br class="">+        i = int(self.vscode.get_local_variable_value('i'))<br class="">+        self.assertTrue(i == 7,<br class="">+                        'i != 7 showing post hitCondition hits every time')<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/main.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/main.cpp?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/main.cpp?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/main.cpp (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/main.cpp Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,27 @@<br class="">+#include <stdio.h><br class="">+#include <stdexcept><br class="">+<br class="">+int twelve(int i) {<br class="">+  return 12 + i; // break 12<br class="">+}<br class="">+<br class="">+int thirteen(int i) {<br class="">+  return 13 + i; // break 13<br class="">+}<br class="">+<br class="">+namespace a {<br class="">+  int fourteen(int i) {<br class="">+    return 14 + i; // break 14<br class="">+  }<br class="">+}<br class="">+int main(int argc, char const *argv[]) {<br class="">+  for (int i=0; i<10; ++i) {<br class="">+    int x = twelve(i) + thirteen(i) + a::fourteen(i); // break loop<br class="">+  }<br class="">+  try {<br class="">+    throw std::invalid_argument( "throwing exception for testing" );<br class="">+  } catch (...) {<br class="">+    puts("caught exception...");<br class="">+  }<br class="">+  return 0;<br class="">+}<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,5 @@<br class="">+LEVEL = ../../../make<br class="">+<br class="">+C_SOURCES := main.c<br class="">+<br class="">+include $(LEVEL)/Makefile.rules<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,331 @@<br class="">+"""<br class="">+Test lldb-vscode setBreakpoints request<br class="">+"""<br class="">+<br class="">+from __future__ import print_function<br class="">+<br class="">+import pprint<br class="">+import unittest2<br class="">+import vscode<br class="">+from lldbsuite.test.decorators import *<br class="">+from lldbsuite.test.lldbtest import *<br class="">+from lldbsuite.test import lldbutil<br class="">+import lldbvscode_testcase<br class="">+import os<br class="">+import time<br class="">+<br class="">+<br class="">+class TestVSCode_launch(lldbvscode_testcase.VSCodeTestCaseBase):<br class="">+<br class="">+    mydir = TestBase.compute_mydir(__file__)<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_default(self):<br class="">+        '''<br class="">+            Tests the default launch of a simple program. No arguments,<br class="">+            environment, or anything else is specified.<br class="">+        '''<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        self.build_and_launch(program)<br class="">+        self.continue_to_exit()<br class="">+        # Now get the STDOUT and verify our program argument is correct<br class="">+        output = self.get_stdout()<br class="">+        self.assertTrue(output and len(output) > 0,<br class="">+                        "expect program output")<br class="">+        lines = output.splitlines()<br class="">+        self.assertTrue(program in lines[0],<br class="">+                        "make sure program path is in first argument")<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_stopOnEntry(self):<br class="">+        '''<br class="">+            Tests the default launch of a simple program that stops at the<br class="">+            entry point instead of continuing.<br class="">+        '''<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        self.build_and_launch(program, stopOnEntry=True)<br class="">+        self.set_function_breakpoints(['main'])<br class="">+        stopped_events = self.continue_to_next_stop()<br class="">+        for stopped_event in stopped_events:<br class="">+            if 'body' in stopped_event:<br class="">+                body = stopped_event['body']<br class="">+                if 'reason' in body:<br class="">+                    reason = body['reason']<br class="">+                    self.assertTrue(<br class="">+                        reason != 'breakpoint',<br class="">+                        'verify stop isn\'t "main" breakpoint')<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_cwd(self):<br class="">+        '''<br class="">+            Tests the default launch of a simple program with a current working<br class="">+            directory.<br class="">+        '''<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        program_parent_dir = os.path.split(os.path.split(program)[0])[0]<br class="">+        self.build_and_launch(program,<br class="">+                              cwd=program_parent_dir)<br class="">+        self.continue_to_exit()<br class="">+        # Now get the STDOUT and verify our program argument is correct<br class="">+        output = self.get_stdout()<br class="">+        self.assertTrue(output and len(output) > 0,<br class="">+                        "expect program output")<br class="">+        lines = output.splitlines()<br class="">+        found = False<br class="">+        for line in lines:<br class="">+            if line.startswith('cwd = \"'):<br class="">+                quote_path = '"%s"' % (program_parent_dir)<br class="">+                found = True<br class="">+                self.assertTrue(quote_path in line,<br class="">+                                "working directory '%s' not in '%s'" % (<br class="">+                                    program_parent_dir, line))<br class="">+        self.assertTrue(found, "verified program working directory")<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_debuggerRoot(self):<br class="">+        '''<br class="">+            Tests the "debuggerRoot" will change the working directory of<br class="">+            the lldb-vscode debug adaptor.<br class="">+        '''<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        program_parent_dir = os.path.split(os.path.split(program)[0])[0]<br class="">+        commands = ['platform shell echo cwd = $PWD']<br class="">+        self.build_and_launch(program,<br class="">+                              debuggerRoot=program_parent_dir,<br class="">+                              initCommands=commands)<br class="">+        output = self.get_console()<br class="">+        self.assertTrue(output and len(output) > 0,<br class="">+                        "expect console output")<br class="">+        lines = output.splitlines()<br class="">+        prefix = 'cwd = '<br class="">+        found = False<br class="">+        for line in lines:<br class="">+            if line.startswith(prefix):<br class="">+                found = True<br class="">+                self.assertTrue(program_parent_dir == line[len(prefix):],<br class="">+                                "lldb-vscode working dir '%s' == '%s'" % (<br class="">+                                    program_parent_dir, line[6:]))<br class="">+        self.assertTrue(found, "verified lldb-vscode working directory")<br class="">+        self.continue_to_exit()<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_sourcePath(self):<br class="">+        '''<br class="">+            Tests the "sourcePath" will set the target.source-map.<br class="">+        '''<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        program_dir = os.path.split(program)[0]<br class="">+        self.build_and_launch(program,<br class="">+                              sourcePath=program_dir)<br class="">+        output = self.get_console()<br class="">+        self.assertTrue(output and len(output) > 0,<br class="">+                        "expect console output")<br class="">+        lines = output.splitlines()<br class="">+        prefix = '(lldb) settings set target.source-map "." '<br class="">+        found = False<br class="">+        for line in lines:<br class="">+            if line.startswith(prefix):<br class="">+                found = True<br class="">+                quoted_path = '"%s"' % (program_dir)<br class="">+                self.assertTrue(quoted_path == line[len(prefix):],<br class="">+                                "lldb-vscode working dir %s == %s" % (<br class="">+                                    quoted_path, line[6:]))<br class="">+        self.assertTrue(found, 'found "sourcePath" in console output')<br class="">+        self.continue_to_exit()<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_disableSTDIO(self):<br class="">+        '''<br class="">+            Tests the default launch of a simple program with STDIO disabled.<br class="">+        '''<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        self.build_and_launch(program,<br class="">+                              disableSTDIO=True)<br class="">+        self.continue_to_exit()<br class="">+        # Now get the STDOUT and verify our program argument is correct<br class="">+        output = self.get_stdout()<br class="">+        self.assertTrue(output is None or len(output) == 0,<br class="">+                        "expect no program output")<br class="">+<br class="">+    @skipUnlessDarwin<br class="">+    @skipIfDarwinEmbedded<br class="">+    @no_debug_info_test<br class="">+    def test_shellExpandArguments_enabled(self):<br class="">+        '''<br class="">+            Tests the default launch of a simple program with shell expansion<br class="">+            enabled.<br class="">+        '''<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        program_dir = os.path.split(program)[0]<br class="">+        glob = os.path.join(program_dir, '*.out')<br class="">+        self.build_and_launch(program, args=[glob], shellExpandArguments=True)<br class="">+        self.continue_to_exit()<br class="">+        # Now get the STDOUT and verify our program argument is correct<br class="">+        output = self.get_stdout()<br class="">+        self.assertTrue(output and len(output) > 0,<br class="">+                        "expect no program output")<br class="">+        lines = output.splitlines()<br class="">+        for line in lines:<br class="">+            quote_path = '"%s"' % (program)<br class="">+            if line.startswith("arg[1] ="):<br class="">+                self.assertTrue(quote_path in line,<br class="">+                                'verify "%s" expanded to "%s"' % (<br class="">+                                    glob, program))<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_shellExpandArguments_disabled(self):<br class="">+        '''<br class="">+            Tests the default launch of a simple program with shell expansion<br class="">+            disabled.<br class="">+        '''<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        program_dir = os.path.split(program)[0]<br class="">+        glob = os.path.join(program_dir, '*.out')<br class="">+        self.build_and_launch(program,<br class="">+                              args=[glob],<br class="">+                              shellExpandArguments=False)<br class="">+        self.continue_to_exit()<br class="">+        # Now get the STDOUT and verify our program argument is correct<br class="">+        output = self.get_stdout()<br class="">+        self.assertTrue(output and len(output) > 0,<br class="">+                        "expect no program output")<br class="">+        lines = output.splitlines()<br class="">+        for line in lines:<br class="">+            quote_path = '"%s"' % (glob)<br class="">+            if line.startswith("arg[1] ="):<br class="">+                self.assertTrue(quote_path in line,<br class="">+                                'verify "%s" stayed to "%s"' % (<br class="">+                                    glob, glob))<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_args(self):<br class="">+        '''<br class="">+            Tests launch of a simple program with arguments<br class="">+        '''<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        args = ["one", "with space", "'with single quotes'",<br class="">+                '"with double quotes"']<br class="">+        self.build_and_launch(program,<br class="">+                              args=args)<br class="">+        self.continue_to_exit()<br class="">+<br class="">+        # Now get the STDOUT and verify our arguments got passed correctly<br class="">+        output = self.get_stdout()<br class="">+        self.assertTrue(output and len(output) > 0,<br class="">+                        "expect program output")<br class="">+        lines = output.splitlines()<br class="">+        # Skip the first argument that contains the program name<br class="">+        lines.pop(0)<br class="">+        # Make sure arguments we specified are correct<br class="">+        for (i, arg) in enumerate(args):<br class="">+            quoted_arg = '"%s"' % (arg)<br class="">+            self.assertTrue(quoted_arg in lines[i],<br class="">+                            'arg[%i] "%s" not in "%s"' % (i+1, quoted_arg, lines[i]))<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_environment(self):<br class="">+        '''<br class="">+            Tests launch of a simple program with environment variables<br class="">+        '''<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        env = ["NO_VALUE", "WITH_VALUE=BAR", "EMPTY_VALUE=",<br class="">+               "SPACE=Hello World"]<br class="">+        self.build_and_launch(program,<br class="">+                              env=env)<br class="">+        self.continue_to_exit()<br class="">+<br class="">+        # Now get the STDOUT and verify our arguments got passed correctly<br class="">+        output = self.get_stdout()<br class="">+        self.assertTrue(output and len(output) > 0,<br class="">+                        "expect program output")<br class="">+        lines = output.splitlines()<br class="">+        # Skip the all arguments so we have only environment vars left<br class="">+        while len(lines) and lines[0].startswith("arg["):<br class="">+            lines.pop(0)<br class="">+        # Make sure each environment variable in "env" is actually set in the<br class="">+        # program environment that was printed to STDOUT<br class="">+        for var in env:<br class="">+            found = False<br class="">+            for program_var in lines:<br class="">+                if var in program_var:<br class="">+                    found = True<br class="">+                    break<br class="">+            self.assertTrue(found,<br class="">+                            '"%s" must exist in program environment (%s)' % (<br class="">+                                var, lines))<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_commands(self):<br class="">+        '''<br class="">+            Tests the "initCommands", "preRunCommands", "stopCommands" and<br class="">+            "exitCommands" that can be passed during launch.<br class="">+<br class="">+            "initCommands" are a list of LLDB commands that get executed<br class="">+            before the targt is created.<br class="">+            "preRunCommands" are a list of LLDB commands that get executed<br class="">+            after the target has been created and before the launch.<br class="">+            "stopCommands" are a list of LLDB commands that get executed each<br class="">+            time the program stops.<br class="">+            "exitCommands" are a list of LLDB commands that get executed when<br class="">+            the process exits<br class="">+        '''<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        initCommands = ['target list', 'platform list']<br class="">+        preRunCommands = ['image list a.out', 'image dump sections a.out']<br class="">+        stopCommands = ['frame variable', 'bt']<br class="">+        exitCommands = ['expr 2+3', 'expr 3+4']<br class="">+        self.build_and_launch(program,<br class="">+                              initCommands=initCommands,<br class="">+                              preRunCommands=preRunCommands,<br class="">+                              stopCommands=stopCommands,<br class="">+                              exitCommands=exitCommands)<br class="">+<br class="">+        # Get output from the console. This should contain both the<br class="">+        # "initCommands" and the "preRunCommands".<br class="">+        output = self.get_console()<br class="">+        # Verify all "initCommands" were found in console output<br class="">+        self.verify_commands('initCommands', output, initCommands)<br class="">+        # Verify all "preRunCommands" were found in console output<br class="">+        self.verify_commands('preRunCommands', output, preRunCommands)<br class="">+<br class="">+        source = 'main.c'<br class="">+        first_line = line_number(source, '// breakpoint 1')<br class="">+        second_line = line_number(source, '// breakpoint 2')<br class="">+        lines = [first_line, second_line]<br class="">+<br class="">+        # Set 2 breakoints so we can verify that "stopCommands" get run as the<br class="">+        # breakpoints get hit<br class="">+        breakpoint_ids = self.set_source_breakpoints(source, lines)<br class="">+        self.assertTrue(len(breakpoint_ids) == len(lines),<br class="">+                        "expect correct number of breakpoints")<br class="">+<br class="">+        # Continue after launch and hit the first breakpoint.<br class="">+        # Get output from the console. This should contain both the<br class="">+        # "stopCommands" that were run after the first breakpoint was hit<br class="">+        self.continue_to_breakpoints(breakpoint_ids)<br class="">+        output = self.get_console(timeout=1.0)<br class="">+        self.verify_commands('stopCommands', output, stopCommands)<br class="">+<br class="">+        # Continue again and hit the second breakpoint.<br class="">+        # Get output from the console. This should contain both the<br class="">+        # "stopCommands" that were run after the second breakpoint was hit<br class="">+        self.continue_to_breakpoints(breakpoint_ids)<br class="">+        output = self.get_console(timeout=1.0)<br class="">+        self.verify_commands('stopCommands', output, stopCommands)<br class="">+<br class="">+        # Continue until the program exits<br class="">+        self.continue_to_exit()<br class="">+        # Get output from the console. This should contain both the<br class="">+        # "exitCommands" that were run after the second breakpoint was hit<br class="">+        output = self.get_console(timeout=1.0)<br class="">+        self.verify_commands('exitCommands', output, exitCommands)<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/main.c<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/main.c?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/main.c?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/main.c (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/main.c Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,15 @@<br class="">+#include <stdio.h><br class="">+#include <stdlib.h><br class="">+#include <unistd.h><br class="">+<br class="">+int main(int argc, char const *argv[], char const *envp[]) {<br class="">+  for (int i=0; i<argc; ++i)<br class="">+    printf("arg[%i] = \"%s\"\n", i, argv[i]);<br class="">+  for (int i=0; envp[i]; ++i)<br class="">+    printf("env[%i] = \"%s\"\n", i, envp[i]);<br class="">+  char *cwd = getcwd(NULL, 0);<br class="">+  printf("cwd = \"%s\"\n", cwd); // breakpoint 1<br class="">+  free(cwd);<br class="">+  cwd = NULL;<br class="">+  return 0;  // breakpoint 2<br class="">+}<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,288 @@<br class="">+from __future__ import print_function<br class="">+<br class="">+from lldbsuite.test.lldbtest import *<br class="">+import os<br class="">+import vscode<br class="">+<br class="">+<br class="">+class VSCodeTestCaseBase(TestBase):<br class="">+<br class="">+    def create_debug_adaptor(self):<br class="">+        '''Create the Visual Studio Code debug adaptor'''<br class="">+        self.assertTrue(os.path.exists(self.lldbVSCodeExec),<br class="">+                        'lldb-vscode must exist')<br class="">+        self.vscode = vscode.DebugAdaptor(executable=self.lldbVSCodeExec)<br class="">+<br class="">+    def build_and_create_debug_adaptor(self):<br class="">+        self.build()<br class="">+        self.create_debug_adaptor()<br class="">+<br class="">+    def set_source_breakpoints(self, source_path, lines, condition=None,<br class="">+                               hitCondition=None):<br class="">+        '''Sets source breakpoints and returns an array of strings containing<br class="">+           the breakpoint location IDs ("1.1", "1.2") for each breakpoint<br class="">+           that was set.<br class="">+        '''<br class="">+        response = self.vscode.request_setBreakpoints(<br class="">+            source_path, lines, condition=condition, hitCondition=hitCondition)<br class="">+        if response is None:<br class="">+            return []<br class="">+        breakpoints = response['body']['breakpoints']<br class="">+        breakpoint_ids = []<br class="">+        for breakpoint in breakpoints:<br class="">+            response_id = breakpoint['id']<br class="">+            bp_id = response_id >> 32<br class="">+            bp_loc_id = response_id & 0xffffffff<br class="">+            breakpoint_ids.append('%i.%i' % (bp_id, bp_loc_id))<br class="">+        return breakpoint_ids<br class="">+<br class="">+    def set_function_breakpoints(self, functions, condition=None,<br class="">+                                 hitCondition=None):<br class="">+        '''Sets breakpoints by function name given an array of function names<br class="">+           and returns an array of strings containing the breakpoint location<br class="">+           IDs ("1.1", "1.2") for each breakpoint that was set.<br class="">+        '''<br class="">+        response = self.vscode.request_setFunctionBreakpoints(<br class="">+            functions, condition=condition, hitCondition=hitCondition)<br class="">+        if response is None:<br class="">+            return []<br class="">+        breakpoints = response['body']['breakpoints']<br class="">+        breakpoint_ids = []<br class="">+        for breakpoint in breakpoints:<br class="">+            response_id = breakpoint['id']<br class="">+            bp_id = response_id >> 32<br class="">+            bp_loc_id = response_id & 0xffffffff<br class="">+            breakpoint_ids.append('%i.%i' % (bp_id, bp_loc_id))<br class="">+        return breakpoint_ids<br class="">+<br class="">+    def verify_breakpoint_hit(self, breakpoint_ids):<br class="">+        '''Wait for the process we are debugging to stop, and verify we hit<br class="">+           any breakpoint location in the "breakpoint_ids" array.<br class="">+           "breakpoint_ids" should be a list of breakpoint location ID strings<br class="">+           (["1.1", "2.1"]). The return value from<br class="">+           self.set_source_breakpoints() can be passed to this function'''<br class="">+        stopped_events = self.vscode.wait_for_stopped()<br class="">+        for stopped_event in stopped_events:<br class="">+            if 'body' in stopped_event:<br class="">+                body = stopped_event['body']<br class="">+                if 'reason' not in body:<br class="">+                    continue<br class="">+                if body['reason'] != 'breakpoint':<br class="">+                    continue<br class="">+                if 'description' not in body:<br class="">+                    continue<br class="">+                # Description is "breakpoint 1.1", so look for any location id<br class="">+                # ("1.1") in the description field as verification that one of<br class="">+                # the breakpoint locations was hit<br class="">+                description = body['description']<br class="">+                for breakpoint_id in breakpoint_ids:<br class="">+                    if breakpoint_id in description:<br class="">+                        return True<br class="">+        return False<br class="">+<br class="">+    def verify_exception_breakpoint_hit(self, filter_label):<br class="">+        '''Wait for the process we are debugging to stop, and verify the stop<br class="">+           reason is 'exception' and that the description matches<br class="">+           'filter_label'<br class="">+        '''<br class="">+        stopped_events = self.vscode.wait_for_stopped()<br class="">+        for stopped_event in stopped_events:<br class="">+            if 'body' in stopped_event:<br class="">+                body = stopped_event['body']<br class="">+                if 'reason' not in body:<br class="">+                    continue<br class="">+                if body['reason'] != 'exception':<br class="">+                    continue<br class="">+                if 'description' not in body:<br class="">+                    continue<br class="">+                description = body['description']<br class="">+                if filter_label == description:<br class="">+                    return True<br class="">+        return False<br class="">+<br class="">+    def verify_commands(self, flavor, output, commands):<br class="">+        self.assertTrue(output and len(output) > 0, "expect console output")<br class="">+        lines = output.splitlines()<br class="">+        prefix = '(lldb) '<br class="">+        for cmd in commands:<br class="">+            found = False<br class="">+            for line in lines:<br class="">+                if line.startswith(prefix) and cmd in line:<br class="">+                    found = True<br class="">+                    break<br class="">+            self.assertTrue(found,<br class="">+                            "verify '%s' found in console output for '%s'" % (<br class="">+                                cmd, flavor))<br class="">+<br class="">+    def get_dict_value(self, d, key_path):<br class="">+        '''Verify each key in the key_path array is in contained in each<br class="">+           dictionary within "d". Assert if any key isn't in the<br class="">+           corresponding dictionary. This is handy for grabbing values from VS<br class="">+           Code response dictionary like getting<br class="">+           response['body']['stackFrames']<br class="">+        '''<br class="">+        value = d<br class="">+        for key in key_path:<br class="">+            if key in value:<br class="">+                value = value[key]<br class="">+            else:<br class="">+                self.assertTrue(key in value,<br class="">+                                'key "%s" from key_path "%s" not in "%s"' % (<br class="">+                                    key, key_path, d))<br class="">+        return value<br class="">+<br class="">+    def get_stackFrames(self, threadId=None, startFrame=None, levels=None,<br class="">+                        dump=False):<br class="">+        response = self.vscode.request_stackTrace(threadId=threadId,<br class="">+                                                  startFrame=startFrame,<br class="">+                                                  levels=levels,<br class="">+                                                  dump=dump)<br class="">+        if response:<br class="">+            return self.get_dict_value(response, ['body', 'stackFrames'])<br class="">+        return None<br class="">+<br class="">+    def get_source_and_line(self, threadId=None, frameIndex=0):<br class="">+        stackFrames = self.get_stackFrames(threadId=threadId,<br class="">+                                           startFrame=frameIndex,<br class="">+                                           levels=1)<br class="">+        if stackFrames is not None:<br class="">+            stackFrame = stackFrames[0]<br class="">+            ['source', 'path']<br class="">+            if 'source' in stackFrame:<br class="">+                source = stackFrame['source']<br class="">+                if 'path' in source:<br class="">+                    if 'line' in stackFrame:<br class="">+                        return (source['path'], stackFrame['line'])<br class="">+        return ('', 0)<br class="">+<br class="">+    def get_stdout(self, timeout=0.0):<br class="">+        return self.vscode.get_output('stdout', timeout=timeout)<br class="">+<br class="">+    def get_console(self, timeout=0.0):<br class="">+        return self.vscode.get_output('console', timeout=timeout)<br class="">+<br class="">+    def get_local_as_int(self, name, threadId=None):<br class="">+        value = self.vscode.get_local_variable_value(name, threadId=threadId)<br class="">+        if value.startswith('0x'):<br class="">+            return int(value, 16)<br class="">+        elif value.startswith('0'):<br class="">+            return int(value, 8)<br class="">+        else:<br class="">+            return int(value)<br class="">+<br class="">+    def set_local(self, name, value, id=None):<br class="">+        '''Set a top level local variable only.'''<br class="">+        return self.vscode.request_setVariable(1, name, str(value), id=id)<br class="">+<br class="">+    def set_global(self, name, value, id=None):<br class="">+        '''Set a top level global variable only.'''<br class="">+        return self.vscode.request_setVariable(2, name, str(value), id=id)<br class="">+<br class="">+    def stepIn(self, threadId=None, waitForStop=True):<br class="">+        self.vscode.request_stepIn(threadId=threadId)<br class="">+        if waitForStop:<br class="">+            return self.vscode.wait_for_stopped()<br class="">+        return None<br class="">+<br class="">+    def stepOver(self, threadId=None, waitForStop=True):<br class="">+        self.vscode.request_next(threadId=threadId)<br class="">+        if waitForStop:<br class="">+            return self.vscode.wait_for_stopped()<br class="">+        return None<br class="">+<br class="">+    def stepOut(self, threadId=None, waitForStop=True):<br class="">+        self.vscode.request_stepOut(threadId=threadId)<br class="">+        if waitForStop:<br class="">+            return self.vscode.wait_for_stopped()<br class="">+        return None<br class="">+<br class="">+    def continue_to_next_stop(self):<br class="">+        self.vscode.request_continue()<br class="">+        return self.vscode.wait_for_stopped()<br class="">+<br class="">+    def continue_to_breakpoints(self, breakpoint_ids):<br class="">+        self.vscode.request_continue()<br class="">+        self.verify_breakpoint_hit(breakpoint_ids)<br class="">+<br class="">+    def continue_to_exception_breakpoint(self, filter_label):<br class="">+        self.vscode.request_continue()<br class="">+        self.assertTrue(self.verify_exception_breakpoint_hit(filter_label),<br class="">+                        'verify we got "%s"' % (filter_label))<br class="">+<br class="">+    def continue_to_exit(self, exitCode=0):<br class="">+        self.vscode.request_continue()<br class="">+        stopped_events = self.vscode.wait_for_stopped()<br class="">+        self.assertTrue(len(stopped_events) == 1,<br class="">+                        "expecting single 'exited' event")<br class="">+        self.assertTrue(stopped_events[0]['event'] == 'exited',<br class="">+                        'make sure program ran to completion')<br class="">+        self.assertTrue(stopped_events[0]['body']['exitCode'] == exitCode,<br class="">+                        'exitCode == %i' % (exitCode))<br class="">+<br class="">+    def attach(self, program=None, pid=None, waitFor=None, trace=None,<br class="">+               initCommands=None, preRunCommands=None, stopCommands=None,<br class="">+               exitCommands=None, attachCommands=None):<br class="">+        '''Build the default Makefile target, create the VSCode debug adaptor,<br class="">+           and attach to the process.<br class="">+        '''<br class="">+        # Make sure we disconnect and terminate the VSCode debug adaptor even<br class="">+        # if we throw an exception during the test case.<br class="">+        def cleanup():<br class="">+            self.vscode.request_disconnect(terminateDebuggee=True)<br class="">+            self.vscode.terminate()<br class="">+<br class="">+        # Execute the cleanup function during test case tear down.<br class="">+        self.addTearDownHook(cleanup)<br class="">+        # Initialize and launch the program<br class="">+        self.vscode.request_initialize()<br class="">+        response = self.vscode.request_attach(<br class="">+            program=program, pid=pid, waitFor=waitFor, trace=trace,<br class="">+            initCommands=initCommands, preRunCommands=preRunCommands,<br class="">+            stopCommands=stopCommands, exitCommands=exitCommands,<br class="">+            attachCommands=attachCommands)<br class="">+        if not (response and response['success']):<br class="">+            self.assertTrue(response['success'],<br class="">+                            'attach failed (%s)' % (response['message']))<br class="">+<br class="">+    def build_and_launch(self, program, args=None, cwd=None, env=None,<br class="">+                         stopOnEntry=False, disableASLR=True,<br class="">+                         disableSTDIO=False, shellExpandArguments=False,<br class="">+                         trace=False, initCommands=None, preRunCommands=None,<br class="">+                         stopCommands=None, exitCommands=None,<br class="">+                         sourcePath=None, debuggerRoot=None):<br class="">+        '''Build the default Makefile target, create the VSCode debug adaptor,<br class="">+           and launch the process.<br class="">+        '''<br class="">+        self.build_and_create_debug_adaptor()<br class="">+        self.assertTrue(os.path.exists(program), 'executable must exist')<br class="">+<br class="">+        # Make sure we disconnect and terminate the VSCode debug adaptor even<br class="">+        # if we throw an exception during the test case.<br class="">+        def cleanup():<br class="">+            self.vscode.request_disconnect(terminateDebuggee=True)<br class="">+            self.vscode.terminate()<br class="">+<br class="">+        # Execute the cleanup function during test case tear down.<br class="">+        self.addTearDownHook(cleanup)<br class="">+<br class="">+        # Initialize and launch the program<br class="">+        self.vscode.request_initialize()<br class="">+        response = self.vscode.request_launch(<br class="">+            program,<br class="">+            args=args,<br class="">+            cwd=cwd,<br class="">+            env=env,<br class="">+            stopOnEntry=stopOnEntry,<br class="">+            disableASLR=disableASLR,<br class="">+            disableSTDIO=disableSTDIO,<br class="">+            shellExpandArguments=shellExpandArguments,<br class="">+            trace=trace,<br class="">+            initCommands=initCommands,<br class="">+            preRunCommands=preRunCommands,<br class="">+            stopCommands=stopCommands,<br class="">+            exitCommands=exitCommands,<br class="">+            sourcePath=sourcePath,<br class="">+            debuggerRoot=debuggerRoot)<br class="">+        if not (response and response['success']):<br class="">+            self.assertTrue(response['success'],<br class="">+                            'launch failed (%s)' % (response['message']))<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,5 @@<br class="">+LEVEL = ../../../make<br class="">+<br class="">+C_SOURCES := main.c<br class="">+<br class="">+include $(LEVEL)/Makefile.rules<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/TestVSCode_stackTrace.py<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/TestVSCode_stackTrace.py?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/TestVSCode_stackTrace.py?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/TestVSCode_stackTrace.py (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/TestVSCode_stackTrace.py Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,159 @@<br class="">+"""<br class="">+Test lldb-vscode setBreakpoints request<br class="">+"""<br class="">+<br class="">+from __future__ import print_function<br class="">+<br class="">+import unittest2<br class="">+import vscode<br class="">+from lldbsuite.test.decorators import *<br class="">+from lldbsuite.test.lldbtest import *<br class="">+from lldbsuite.test import lldbutil<br class="">+import lldbvscode_testcase<br class="">+import os<br class="">+<br class="">+<br class="">+class TestVSCode_stackTrace(lldbvscode_testcase.VSCodeTestCaseBase):<br class="">+<br class="">+    mydir = TestBase.compute_mydir(__file__)<br class="">+    name_key_path = ['name']<br class="">+    source_key_path = ['source', 'path']<br class="">+    line_key_path = ['line']<br class="">+<br class="">+    def verify_stackFrames(self, start_idx, stackFrames):<br class="">+        frame_idx = start_idx<br class="">+        for stackFrame in stackFrames:<br class="">+            # Don't care about frame above main<br class="">+            if frame_idx > 20:<br class="">+                return<br class="">+            self.verify_stackFrame(frame_idx, stackFrame)<br class="">+            frame_idx += 1<br class="">+<br class="">+    def verify_stackFrame(self, frame_idx, stackFrame):<br class="">+        frame_name = self.get_dict_value(stackFrame, self.name_key_path)<br class="">+        frame_source = self.get_dict_value(stackFrame, self.source_key_path)<br class="">+        frame_line = self.get_dict_value(stackFrame, self.line_key_path)<br class="">+        if frame_idx == 0:<br class="">+            expected_line = self.recurse_end<br class="">+            expected_name = 'recurse'<br class="">+        elif frame_idx < 20:<br class="">+            expected_line = self.recurse_call<br class="">+            expected_name = 'recurse'<br class="">+        else:<br class="">+            expected_line = self.recurse_invocation<br class="">+            expected_name = 'main'<br class="">+        self.assertTrue(frame_name == expected_name,<br class="">+                        'frame #%i name "%s" == "%s"' % (<br class="">+                            frame_idx, frame_name, expected_name))<br class="">+        self.assertTrue(frame_source == self.source_path,<br class="">+                        'frame #%i source "%s" == "%s"' % (<br class="">+                            frame_idx, frame_source, self.source_path))<br class="">+        self.assertTrue(frame_line == expected_line,<br class="">+                        'frame #%i line %i == %i' % (frame_idx, frame_line,<br class="">+                                                     expected_line))<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_stackTrace(self):<br class="">+        '''<br class="">+            Tests the 'stackTrace' packet and all its variants.<br class="">+        '''<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        self.build_and_launch(program)<br class="">+        source = 'main.c'<br class="">+        self.source_path = os.path.join(os.getcwd(), source)<br class="">+        self.recurse_end = line_number(source, 'recurse end')<br class="">+        self.recurse_call = line_number(source, 'recurse call')<br class="">+        self.recurse_invocation = line_number(source, 'recurse invocation')<br class="">+<br class="">+        lines = [self.recurse_end]<br class="">+<br class="">+        # Set breakoint at a point of deepest recuusion<br class="">+        breakpoint_ids = self.set_source_breakpoints(source, lines)<br class="">+        self.assertTrue(len(breakpoint_ids) == len(lines),<br class="">+                        "expect correct number of breakpoints")<br class="">+<br class="">+        self.continue_to_breakpoints(breakpoint_ids)<br class="">+        startFrame = 0<br class="">+        # Verify we get all stack frames with no arguments<br class="">+        stackFrames = self.get_stackFrames()<br class="">+        frameCount = len(stackFrames)<br class="">+        self.assertTrue(frameCount >= 20,<br class="">+                        'verify we get at least 20 frames for all frames')<br class="">+        self.verify_stackFrames(startFrame, stackFrames)<br class="">+<br class="">+        # Verify all stack frames by specifying startFrame = 0 and levels not<br class="">+        # specified<br class="">+        stackFrames = self.get_stackFrames(startFrame=startFrame)<br class="">+        self.assertTrue(frameCount == len(stackFrames),<br class="">+                        ('verify same number of frames with startFrame=%i') % (<br class="">+                            startFrame))<br class="">+        self.verify_stackFrames(startFrame, stackFrames)<br class="">+<br class="">+        # Verify all stack frames by specifying startFrame = 0 and levels = 0<br class="">+        levels = 0<br class="">+        stackFrames = self.get_stackFrames(startFrame=startFrame,<br class="">+                                           levels=levels)<br class="">+        self.assertTrue(frameCount == len(stackFrames),<br class="">+                        ('verify same number of frames with startFrame=%i and'<br class="">+                         ' levels=%i') % (startFrame, levels))<br class="">+        self.verify_stackFrames(startFrame, stackFrames)<br class="">+<br class="">+        # Get only the first stack frame by sepcifying startFrame = 0 and<br class="">+        # levels = 1<br class="">+        levels = 1<br class="">+        stackFrames = self.get_stackFrames(startFrame=startFrame,<br class="">+                                           levels=levels)<br class="">+        self.assertTrue(levels == len(stackFrames),<br class="">+                        ('verify one frame with startFrame=%i and'<br class="">+                         ' levels=%i') % (startFrame, levels))<br class="">+        self.verify_stackFrames(startFrame, stackFrames)<br class="">+<br class="">+        # Get only the first 3 stack frames by sepcifying startFrame = 0 and<br class="">+        # levels = 3<br class="">+        levels = 3<br class="">+        stackFrames = self.get_stackFrames(startFrame=startFrame,<br class="">+                                           levels=levels)<br class="">+        self.assertTrue(levels == len(stackFrames),<br class="">+                        ('verify %i frames with startFrame=%i and'<br class="">+                         ' levels=%i') % (levels, startFrame, levels))<br class="">+        self.verify_stackFrames(startFrame, stackFrames)<br class="">+<br class="">+        # Get only the first 15 stack frames by sepcifying startFrame = 5 and<br class="">+        # levels = 16<br class="">+        startFrame = 5<br class="">+        levels = 16<br class="">+        stackFrames = self.get_stackFrames(startFrame=startFrame,<br class="">+                                           levels=levels)<br class="">+        self.assertTrue(levels == len(stackFrames),<br class="">+                        ('verify %i frames with startFrame=%i and'<br class="">+                         ' levels=%i') % (levels, startFrame, levels))<br class="">+        self.verify_stackFrames(startFrame, stackFrames)<br class="">+<br class="">+        # Verify we cap things correctly when we ask for too many frames<br class="">+        startFrame = 5<br class="">+        levels = 1000<br class="">+        stackFrames = self.get_stackFrames(startFrame=startFrame,<br class="">+                                           levels=levels)<br class="">+        self.assertTrue(len(stackFrames) == frameCount - startFrame,<br class="">+                        ('verify less than 1000 frames with startFrame=%i and'<br class="">+                         ' levels=%i') % (startFrame, levels))<br class="">+        self.verify_stackFrames(startFrame, stackFrames)<br class="">+<br class="">+        # Verify level=0 works with non-zerp start frame<br class="">+        startFrame = 5<br class="">+        levels = 0<br class="">+        stackFrames = self.get_stackFrames(startFrame=startFrame,<br class="">+                                           levels=levels)<br class="">+        self.assertTrue(len(stackFrames) == frameCount - startFrame,<br class="">+                        ('verify less than 1000 frames with startFrame=%i and'<br class="">+                         ' levels=%i') % (startFrame, levels))<br class="">+        self.verify_stackFrames(startFrame, stackFrames)<br class="">+<br class="">+        # Verify we get not frames when startFrame is too high<br class="">+        startFrame = 1000<br class="">+        levels = 1<br class="">+        stackFrames = self.get_stackFrames(startFrame=startFrame,<br class="">+                                           levels=levels)<br class="">+        self.assertTrue(0 == len(stackFrames),<br class="">+                        'verify zero frames with startFrame out of bounds')<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/main.c<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/main.c?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/main.c?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/main.c (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/main.c Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,13 @@<br class="">+#include <stdio.h><br class="">+#include <unistd.h><br class="">+<br class="">+int recurse(int x) {<br class="">+  if (x <= 1)<br class="">+    return 1; // recurse end<br class="">+  return recurse(x-1) + x; // recurse call<br class="">+}<br class="">+<br class="">+int main(int argc, char const *argv[]) {<br class="">+  recurse(20); // recurse invocation<br class="">+  return 0;<br class="">+}<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,5 @@<br class="">+LEVEL = ../../../make<br class="">+<br class="">+CXX_SOURCES := main.cpp<br class="">+<br class="">+include $(LEVEL)/Makefile.rules<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/TestVSCode_step.py<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/TestVSCode_step.py?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/TestVSCode_step.py?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/TestVSCode_step.py (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/TestVSCode_step.py Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,78 @@<br class="">+"""<br class="">+Test lldb-vscode setBreakpoints request<br class="">+"""<br class="">+<br class="">+from __future__ import print_function<br class="">+<br class="">+import unittest2<br class="">+import vscode<br class="">+from lldbsuite.test.decorators import *<br class="">+from lldbsuite.test.lldbtest import *<br class="">+from lldbsuite.test import lldbutil<br class="">+import lldbvscode_testcase<br class="">+import os<br class="">+<br class="">+<br class="">+class TestVSCode_step(lldbvscode_testcase.VSCodeTestCaseBase):<br class="">+<br class="">+    mydir = TestBase.compute_mydir(__file__)<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_step(self):<br class="">+        '''<br class="">+            Tests the stepping in/out/over in threads.<br class="">+        '''<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        self.build_and_launch(program)<br class="">+        source = 'main.cpp'<br class="">+        # source_path = os.path.join(os.getcwd(), source)<br class="">+        breakpoint1_line = line_number(source, '// breakpoint 1')<br class="">+        lines = [breakpoint1_line]<br class="">+        # Set breakoint in the thread function so we can step the threads<br class="">+        breakpoint_ids = self.set_source_breakpoints(source, lines)<br class="">+        self.assertTrue(len(breakpoint_ids) == len(lines),<br class="">+                        "expect correct number of breakpoints")<br class="">+        self.continue_to_breakpoints(breakpoint_ids)<br class="">+        threads = self.vscode.get_threads()<br class="">+        for thread in threads:<br class="">+            if 'reason' in thread:<br class="">+                reason = thread['reason']<br class="">+                if reason == 'breakpoint':<br class="">+                    # We have a thread that is stopped at our breakpoint.<br class="">+                    # Get the value of "x" and get the source file and line.<br class="">+                    # These will help us determine if we are stepping<br class="">+                    # correctly. If we step a thread correctly we will verify<br class="">+                    # the correct falue for x as it progresses through the<br class="">+                    # program.<br class="">+                    tid = thread['id']<br class="">+                    x1 = self.get_local_as_int('x', threadId=tid)<br class="">+                    (src1, line1) = self.get_source_and_line(threadId=tid)<br class="">+<br class="">+                    # Now step into the "recurse()" function call again and<br class="">+                    # verify, using the new value of "x" and the source file<br class="">+                    # and line if we stepped correctly<br class="">+                    self.stepIn(threadId=tid, waitForStop=True)<br class="">+                    x2 = self.get_local_as_int('x', threadId=tid)<br class="">+                    (src2, line2) = self.get_source_and_line(threadId=tid)<br class="">+                    self.assertTrue(x1 == x2 + 1, 'verify step in variable')<br class="">+                    self.assertTrue(line2 < line1, 'verify step in line')<br class="">+                    self.assertTrue(src1 == src2, 'verify step in source')<br class="">+<br class="">+                    # Now step out and verify<br class="">+                    self.stepOut(threadId=tid, waitForStop=True)<br class="">+                    x3 = self.get_local_as_int('x', threadId=tid)<br class="">+                    (src3, line3) = self.get_source_and_line(threadId=tid)<br class="">+                    self.assertTrue(x1 == x3, 'verify step out variable')<br class="">+                    self.assertTrue(line3 >= line1, 'verify step out line')<br class="">+                    self.assertTrue(src1 == src3, 'verify step in source')<br class="">+<br class="">+                    # Step over and verify<br class="">+                    self.stepOver(threadId=tid, waitForStop=True)<br class="">+                    x4 = self.get_local_as_int('x', threadId=tid)<br class="">+                    (src4, line4) = self.get_source_and_line(threadId=tid)<br class="">+                    self.assertTrue(x4 == x3, 'verify step over variable')<br class="">+                    self.assertTrue(line4 > line3, 'verify step over line')<br class="">+                    self.assertTrue(src1 == src4, 'verify step over source')<br class="">+                    # only step one thread that is at the breakpoint and stop<br class="">+                    break<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/main.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/main.cpp?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/main.cpp?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/main.cpp (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/step/main.cpp Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,16 @@<br class="">+#include <thread><br class="">+<br class="">+int function(int x) {<br class="">+  if ((x % 2) == 0)<br class="">+    return function(x-1) + x; // breakpoint 1<br class="">+  else<br class="">+    return x;<br class="">+}<br class="">+<br class="">+int main(int argc, char const *argv[]) {<br class="">+  std::thread thread1(function, 2);<br class="">+  std::thread thread2(function, 4);<br class="">+  thread1.join();<br class="">+  thread2.join();<br class="">+  return 0;<br class="">+}<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,5 @@<br class="">+LEVEL = ../../../make<br class="">+<br class="">+CXX_SOURCES := main.cpp<br class="">+<br class="">+include $(LEVEL)/Makefile.rules<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/TestVSCode_variables.py<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/TestVSCode_variables.py?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/TestVSCode_variables.py?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/TestVSCode_variables.py (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/TestVSCode_variables.py Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,224 @@<br class="">+"""<br class="">+Test lldb-vscode setBreakpoints request<br class="">+"""<br class="">+<br class="">+from __future__ import print_function<br class="">+<br class="">+import unittest2<br class="">+import vscode<br class="">+from lldbsuite.test.decorators import *<br class="">+from lldbsuite.test.lldbtest import *<br class="">+from lldbsuite.test import lldbutil<br class="">+import lldbvscode_testcase<br class="">+import os<br class="">+<br class="">+<br class="">+def make_buffer_verify_dict(start_idx, count, offset=0):<br class="">+    verify_dict = {}<br class="">+    for i in range(start_idx, start_idx + count):<br class="">+        verify_dict['[%i]' % (i)] = {'type': 'int', 'value': str(i+offset)}<br class="">+    return verify_dict<br class="">+<br class="">+<br class="">+class TestVSCode_variables(lldbvscode_testcase.VSCodeTestCaseBase):<br class="">+<br class="">+    mydir = TestBase.compute_mydir(__file__)<br class="">+<br class="">+    def verify_values(self, verify_dict, actual, varref_dict=None):<br class="">+        if 'equals' in verify_dict:<br class="">+            verify = verify_dict['equals']<br class="">+            for key in verify:<br class="">+                verify_value = verify[key]<br class="">+                actual_value = actual[key]<br class="">+                self.assertTrue(verify_value == actual_value,<br class="">+                                '"%s" keys don\'t match (%s != %s)' % (<br class="">+                                    key, actual_value, verify_value))<br class="">+        if 'startswith' in verify_dict:<br class="">+            verify = verify_dict['startswith']<br class="">+            for key in verify:<br class="">+                verify_value = verify[key]<br class="">+                actual_value = actual[key]<br class="">+                startswith = actual_value.startswith(verify_value)<br class="">+                self.assertTrue(startswith,<br class="">+                                ('"%s" value "%s" doesn\'t start with'<br class="">+                                 ' "%s")') % (<br class="">+                                    key, actual_value,<br class="">+                                    verify_value))<br class="">+        hasVariablesReference = 'variablesReference' in actual<br class="">+        varRef = None<br class="">+        if hasVariablesReference:<br class="">+            # Remember variable references in case we want to test further<br class="">+            # by using the evaluate name.<br class="">+            varRef = actual['variablesReference']<br class="">+            if varRef != 0 and varref_dict is not None:<br class="">+                varref_dict[actual['evaluateName']] = varRef<br class="">+        if ('hasVariablesReference' in verify_dict and<br class="">+                verify_dict['hasVariablesReference']):<br class="">+            self.assertTrue(hasVariablesReference,<br class="">+                            "verify variable reference")<br class="">+        if 'children' in verify_dict:<br class="">+            self.assertTrue(hasVariablesReference and varRef is not None and<br class="">+                            varRef != 0,<br class="">+                            ("children verify values specified for "<br class="">+                             "variable without children"))<br class="">+<br class="">+            response = self.vscode.request_variables(varRef)<br class="">+            self.verify_variables(verify_dict['children'],<br class="">+                                  response['body']['variables'],<br class="">+                                  varref_dict)<br class="">+<br class="">+    def verify_variables(self, verify_dict, variables, varref_dict=None):<br class="">+        for variable in variables:<br class="">+            name = variable['name']<br class="">+            self.assertTrue(name in verify_dict,<br class="">+                            'variable "%s" in verify dictionary' % (name))<br class="">+            self.verify_values(verify_dict[name], variable, varref_dict)<br class="">+<br class="">+    @skipIfWindows<br class="">+    @no_debug_info_test<br class="">+    def test_scopes_variables_setVariable_evaluate(self):<br class="">+        '''<br class="">+            Tests the "scopes", "variables", "setVariable", and "evaluate"<br class="">+            packets.<br class="">+        '''<br class="">+        program = self.getBuildArtifact("a.out")<br class="">+        self.build_and_launch(program)<br class="">+        source = 'main.cpp'<br class="">+        breakpoint1_line = line_number(source, '// breakpoint 1')<br class="">+        lines = [breakpoint1_line]<br class="">+        # Set breakoint in the thread function so we can step the threads<br class="">+        breakpoint_ids = self.set_source_breakpoints(source, lines)<br class="">+        self.assertTrue(len(breakpoint_ids) == len(lines),<br class="">+                        "expect correct number of breakpoints")<br class="">+        self.continue_to_breakpoints(breakpoint_ids)<br class="">+        locals = self.vscode.get_local_variables()<br class="">+        globals = self.vscode.get_global_variables()<br class="">+        buffer_children = make_buffer_verify_dict(0, 32)<br class="">+        verify_locals = {<br class="">+            'argc': {<br class="">+                'equals': {'type': 'int', 'value': '1'}<br class="">+            },<br class="">+            'argv': {<br class="">+                'equals': {'type': 'const char **'},<br class="">+                'startswith': {'value': '0x'},<br class="">+                'hasVariablesReference': True<br class="">+            },<br class="">+            'pt': {<br class="">+                'equals': {'type': 'PointType'},<br class="">+                'hasVariablesReference': True,<br class="">+                'children': {<br class="">+                    'x': {'equals': {'type': 'int', 'value': '11'}},<br class="">+                    'y': {'equals': {'type': 'int', 'value': '22'}},<br class="">+                    'buffer': {'children': buffer_children}<br class="">+                }<br class="">+            }<br class="">+        }<br class="">+        verify_globals = {<br class="">+            's_local': {<br class="">+                'equals': {'type': 'float', 'value': '2.25'}<br class="">+            },<br class="">+            '::g_global': {<br class="">+                'equals': {'type': 'int', 'value': '123'}<br class="">+            },<br class="">+            's_global': {<br class="">+                'equals': {'type': 'int', 'value': '234'}<br class="">+            },<br class="">+        }<br class="">+        varref_dict = {}<br class="">+        self.verify_variables(verify_locals, locals, varref_dict)<br class="">+        self.verify_variables(verify_globals, globals, varref_dict)<br class="">+        # pprint.PrettyPrinter(indent=4).pprint(varref_dict)<br class="">+        # We need to test the functionality of the "variables" request as it<br class="">+        # has optional parameters like "start" and "count" to limit the number<br class="">+        # of variables that are fetched<br class="">+        varRef = varref_dict['pt.buffer']<br class="">+        response = self.vscode.request_variables(varRef)<br class="">+        self.verify_variables(buffer_children, response['body']['variables'])<br class="">+        # Verify setting start=0 in the arguments still gets all children<br class="">+        response = self.vscode.request_variables(varRef, start=0)<br class="">+        self.verify_variables(buffer_children, response['body']['variables'])<br class="">+        # Verify setting count=0 in the arguments still gets all children.<br class="">+        # If count is zero, it means to get all children.<br class="">+        response = self.vscode.request_variables(varRef, count=0)<br class="">+        self.verify_variables(buffer_children, response['body']['variables'])<br class="">+        # Verify setting count to a value that is too large in the arguments<br class="">+        # still gets all children, and no more<br class="">+        response = self.vscode.request_variables(varRef, count=1000)<br class="">+        self.verify_variables(buffer_children, response['body']['variables'])<br class="">+        # Verify setting the start index and count gets only the children we<br class="">+        # want<br class="">+        response = self.vscode.request_variables(varRef, start=5, count=5)<br class="">+        self.verify_variables(make_buffer_verify_dict(5, 5),<br class="">+                              response['body']['variables'])<br class="">+        # Verify setting the start index to a value that is out of range<br class="">+        # results in an empty list<br class="">+        response = self.vscode.request_variables(varRef, start=32, count=1)<br class="">+        self.assertTrue(len(response['body']['variables']) == 0,<br class="">+                        'verify we get no variable back for invalid start')<br class="">+<br class="">+        # Test evaluate<br class="">+        expressions = {<br class="">+            'pt.x': {<br class="">+                'equals': {'result': '11', 'type': 'int'},<br class="">+                'hasVariablesReference': False<br class="">+            },<br class="">+            'pt.buffer[2]': {<br class="">+                'equals': {'result': '2', 'type': 'int'},<br class="">+                'hasVariablesReference': False<br class="">+            },<br class="">+            'pt': {<br class="">+                'equals': {'type': 'PointType'},<br class="">+                'startswith': {'result': 'PointType @ 0x'},<br class="">+                'hasVariablesReference': True<br class="">+            },<br class="">+            'pt.buffer': {<br class="">+                'equals': {'type': 'int [32]'},<br class="">+                'startswith': {'result': 'int [32] @ 0x'},<br class="">+                'hasVariablesReference': True<br class="">+            },<br class="">+            'argv': {<br class="">+                'equals': {'type': 'const char **'},<br class="">+                'startswith': {'result': '0x'},<br class="">+                'hasVariablesReference': True<br class="">+            },<br class="">+            'argv[0]': {<br class="">+                'equals': {'type': 'const char *'},<br class="">+                'startswith': {'result': '0x'},<br class="">+                'hasVariablesReference': True<br class="">+            },<br class="">+            '2+3': {<br class="">+                'equals': {'result': '5', 'type': 'int'},<br class="">+                'hasVariablesReference': False<br class="">+            },<br class="">+        }<br class="">+        for expression in expressions:<br class="">+            response = self.vscode.request_evaluate(expression)<br class="">+            self.verify_values(expressions[expression], response['body'])<br class="">+<br class="">+        # Test setting variables<br class="">+        self.set_local('argc', 123)<br class="">+        argc = self.get_local_as_int('argc')<br class="">+        self.assertTrue(argc == 123,<br class="">+                        'verify argc was set to 123 (123 != %i)' % (argc))<br class="">+<br class="">+        self.set_local('argv', 0x1234)<br class="">+        argv = self.get_local_as_int('argv')<br class="">+        self.assertTrue(argv == 0x1234,<br class="">+                        'verify argv was set to 0x1234 (0x1234 != %#x)' % (<br class="">+                            argv))<br class="">+<br class="">+        # Set a variable value whose name is synthetic, like a variable index<br class="">+        # and verify the value by reading it<br class="">+        self.vscode.request_setVariable(varRef, "[0]", 100)<br class="">+        response = self.vscode.request_variables(varRef, start=0, count=1)<br class="">+        self.verify_variables(make_buffer_verify_dict(0, 1, 100),<br class="">+                              response['body']['variables'])<br class="">+<br class="">+        # Set a variable value whose name is a real child value, like "pt.x"<br class="">+        # and verify the value by reading it<br class="">+        varRef = varref_dict['pt']<br class="">+        self.vscode.request_setVariable(varRef, "x", 111)<br class="">+        response = self.vscode.request_variables(varRef, start=0, count=1)<br class="">+        value = response['body']['variables'][0]['value']<br class="">+        self.assertTrue(value == '111',<br class="">+                        'verify pt.x got set to 111 (111 != %s)' % (value))<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/main.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/main.cpp?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/main.cpp?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/main.cpp (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/main.cpp Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,18 @@<br class="">+<br class="">+#define BUFFER_SIZE 32<br class="">+struct PointType {<br class="">+  int x;<br class="">+  int y;<br class="">+  int buffer[BUFFER_SIZE];<br class="">+};<br class="">+<br class="">+int g_global = 123;<br class="">+static int s_global = 234;<br class="">+<br class="">+int main(int argc, char const *argv[]) {<br class="">+  static float s_local = 2.25;<br class="">+  PointType pt = { 11,22, {0}};<br class="">+  for (int i=0; i<BUFFER_SIZE; ++i)<br class="">+    pt.buffer[i] = i;<br class="">+  return s_global - g_global - pt.y; // breakpoint 1<br class="">+}<br class=""><br class="">Added: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py (added)<br class="">+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,1084 @@<br class="">+#!/usr/bin/env python<br class="">+<br class="">+import binascii<br class="">+import json<br class="">+import optparse<br class="">+import os<br class="">+import pprint<br class="">+import socket<br class="">+import string<br class="">+import subprocess<br class="">+import sys<br class="">+import threading<br class="">+<br class="">+<br class="">+def dump_memory(base_addr, data, num_per_line, outfile):<br class="">+<br class="">+    data_len = len(data)<br class="">+    hex_string = binascii.hexlify(data)<br class="">+    addr = base_addr<br class="">+    ascii_str = ''<br class="">+    i = 0<br class="">+    while i < data_len:<br class="">+        outfile.write('0x%8.8x: ' % (addr + i))<br class="">+        bytes_left = data_len - i<br class="">+        if bytes_left >= num_per_line:<br class="">+            curr_data_len = num_per_line<br class="">+        else:<br class="">+            curr_data_len = bytes_left<br class="">+        hex_start_idx = i * 2<br class="">+        hex_end_idx = hex_start_idx + curr_data_len * 2<br class="">+        curr_hex_str = hex_string[hex_start_idx:hex_end_idx]<br class="">+        # 'curr_hex_str' now contains the hex byte string for the<br class="">+        # current line with no spaces between bytes<br class="">+        t = iter(curr_hex_str)<br class="">+        # Print hex bytes separated by space<br class="">+        outfile.write(' '.join(a + b for a, b in zip(t, t)))<br class="">+        # Print two spaces<br class="">+        outfile.write('  ')<br class="">+        # Calculate ASCII string for bytes into 'ascii_str'<br class="">+        ascii_str = ''<br class="">+        for j in range(i, i + curr_data_len):<br class="">+            ch = data[j]<br class="">+            if ch in string.printable and ch not in string.whitespace:<br class="">+                ascii_str += '%c' % (ch)<br class="">+            else:<br class="">+                ascii_str += '.'<br class="">+        # Print ASCII representation and newline<br class="">+        outfile.write(ascii_str)<br class="">+        i = i + curr_data_len<br class="">+        outfile.write('\n')<br class="">+<br class="">+<br class="">+def read_packet(f, verbose=False, trace_file=None):<br class="">+    '''Decode a JSON packet that starts with the content length and is<br class="">+       followed by the JSON bytes from a file 'f'<br class="">+    '''<br class="">+    line = f.readline()<br class="">+    if len(line) == 0:<br class="">+        return None<br class="">+<br class="">+    # Watch for line that starts with the prefix<br class="">+    prefix = 'Content-Length: '<br class="">+    if line.startswith(prefix):<br class="">+        # Decode length of JSON bytes<br class="">+        if verbose:<br class="">+            print('content: "%s"' % (line))<br class="">+        length = int(line[len(prefix):])<br class="">+        if verbose:<br class="">+            print('length: "%u"' % (length))<br class="">+        # Skip empty line<br class="">+        line = f.readline()<br class="">+        if verbose:<br class="">+            print('empty: "%s"' % (line))<br class="">+        # Read JSON bytes<br class="">+        json_str = f.read(length)<br class="">+        if verbose:<br class="">+            print('json: "%s"' % (json_str))<br class="">+        if trace_file:<br class="">+            trace_file.write('from adaptor:\n%s\n' % (json_str))<br class="">+        # Decode the JSON bytes into a python dictionary<br class="">+        return json.loads(json_str)<br class="">+<br class="">+    return None<br class="">+<br class="">+<br class="">+def packet_type_is(packet, packet_type):<br class="">+    return 'type' in packet and packet['type'] == packet_type<br class="">+<br class="">+<br class="">+def read_packet_thread(vs_comm):<br class="">+    done = False<br class="">+    while not done:<br class="">+        packet = read_packet(vs_comm.recv, trace_file=vs_comm.trace_file)<br class="">+        if packet:<br class="">+            done = not vs_comm.handle_recv_packet(packet)<br class="">+        else:<br class="">+            done = True<br class="">+<br class="">+<br class="">+class DebugCommunication(object):<br class="">+<br class="">+    def __init__(self, recv, send):<br class="">+        self.trace_file = None<br class="">+        self.send = send<br class="">+        self.recv = recv<br class="">+        self.recv_packets = []<br class="">+        self.recv_condition = threading.Condition()<br class="">+        self.recv_thread = threading.Thread(target=read_packet_thread,<br class="">+                                            args=(self,))<br class="">+        self.process_event_body = None<br class="">+        self.exit_status = None<br class="">+        self.initialize_body = None<br class="">+        self.thread_stop_reasons = {}<br class="">+        self.sequence = 1<br class="">+        self.threads = None<br class="">+        self.recv_thread.start()<br class="">+        self.output_condition = threading.Condition()<br class="">+        self.output = {}<br class="">+        self.configuration_done_sent = False<br class="">+        self.frame_scopes = {}<br class="">+<br class="">+    @classmethod<br class="">+    def encode_content(cls, s):<br class="">+        return "Content-Length: %u\r\n\r\n%s" % (len(s), s)<br class="">+<br class="">+    @classmethod<br class="">+    def validate_response(cls, command, response):<br class="">+        if command['command'] != response['command']:<br class="">+            raise ValueError('command mismatch in response')<br class="">+        if command['seq'] != response['request_seq']:<br class="">+            raise ValueError('seq mismatch in response')<br class="">+<br class="">+    def get_output(self, category, timeout=0.0, clear=True):<br class="">+        self.output_condition.acquire()<br class="">+        output = None<br class="">+        if category in self.output:<br class="">+            output = self.output[category]<br class="">+            if clear:<br class="">+                del self.output[category]<br class="">+        elif timeout != 0.0:<br class="">+            self.output_condition.wait(timeout)<br class="">+            if category in self.output:<br class="">+                output = self.output[category]<br class="">+                if clear:<br class="">+                    del self.output[category]<br class="">+        self.output_condition.release()<br class="">+        return output<br class="">+<br class="">+    def handle_recv_packet(self, packet):<br class="">+        '''Called by the read thread that is waiting for all incoming packets<br class="">+           to store the incoming packet in "self.recv_packets" in a thread safe<br class="">+           way. This function will then signal the "self.recv_condition" to<br class="">+           indicate a new packet is available. Returns True if the caller<br class="">+           should keep calling this function for more packets.<br class="">+        '''<br class="">+        # Check the packet to see if is an event packet<br class="">+        keepGoing = True<br class="">+        packet_type = packet['type']<br class="">+        if packet_type == 'event':<br class="">+            event = packet['event']<br class="">+            body = None<br class="">+            if 'body' in packet:<br class="">+                body = packet['body']<br class="">+            # Handle the event packet and cache information from these packets<br class="">+            # as they come in<br class="">+            if event == 'output':<br class="">+                # Store any output we receive so clients can retrieve it later.<br class="">+                category = body['category']<br class="">+                output = body['output']<br class="">+                self.output_condition.acquire()<br class="">+                if category in self.output:<br class="">+                    self.output[category] += output<br class="">+                else:<br class="">+                    self.output[category] = output<br class="">+                self.output_condition.notify()<br class="">+                self.output_condition.release()<br class="">+                # no need to add 'output' packets to our packets list<br class="">+                return keepGoing<br class="">+            elif event == 'process':<br class="">+                # When a new process is attached or launched, remember the<br class="">+                # details that are available in the body of the event<br class="">+                self.process_event_body = body<br class="">+            elif event == 'stopped':<br class="">+                # Each thread that stops with a reason will send a<br class="">+                # 'stopped' event. We need to remember the thread stop<br class="">+                # reasons since the 'threads' command doesn't return<br class="">+                # that information.<br class="">+                self._process_stopped()<br class="">+                tid = body['threadId']<br class="">+                self.thread_stop_reasons[tid] = body<br class="">+        elif packet_type == 'response':<br class="">+            if packet['command'] == 'disconnect':<br class="">+                keepGoing = False<br class="">+        self.recv_condition.acquire()<br class="">+        self.recv_packets.append(packet)<br class="">+        self.recv_condition.notify()<br class="">+        self.recv_condition.release()<br class="">+        return keepGoing<br class="">+<br class="">+    def send_packet(self, command_dict, set_sequence=True):<br class="">+        '''Take the "command_dict" python dictionary and encode it as a JSON<br class="">+           string and send the contents as a packet to the VSCode debug<br class="">+           adaptor'''<br class="">+        # Set the sequence ID for this command automatically<br class="">+        if set_sequence:<br class="">+            command_dict['seq'] = self.sequence<br class="">+            self.sequence += 1<br class="">+        # Encode our command dictionary as a JSON string<br class="">+        json_str = json.dumps(command_dict, separators=(',', ':'))<br class="">+        if self.trace_file:<br class="">+            self.trace_file.write('to adaptor:\n%s\n' % (json_str))<br class="">+        length = len(json_str)<br class="">+        if length > 0:<br class="">+            # Send the encoded JSON packet and flush the 'send' file<br class="">+            self.send.write(self.encode_content(json_str))<br class="">+            self.send.flush()<br class="">+<br class="">+    def recv_packet(self, filter_type=None, filter_event=None, timeout=None):<br class="">+        '''Get a JSON packet from the VSCode debug adaptor. This function<br class="">+           assumes a thread that reads packets is running and will deliver<br class="">+           any received packets by calling handle_recv_packet(...). This<br class="">+           function will wait for the packet to arrive and return it when<br class="">+           it does.'''<br class="">+        while True:<br class="">+            self.recv_condition.acquire()<br class="">+            packet = None<br class="">+            while True:<br class="">+                for (i, curr_packet) in enumerate(self.recv_packets):<br class="">+                    packet_type = curr_packet['type']<br class="">+                    if filter_type is None or packet_type in filter_type:<br class="">+                        if (filter_event is None or<br class="">+                            (packet_type == 'event' and<br class="">+                             curr_packet['event'] in filter_event)):<br class="">+                            packet = self.recv_packets.pop(i)<br class="">+                            break<br class="">+                if packet:<br class="">+                    break<br class="">+                # Sleep until packet is received<br class="">+                len_before = len(self.recv_packets)<br class="">+                self.recv_condition.wait(timeout)<br class="">+                len_after = len(self.recv_packets)<br class="">+                if len_before == len_after:<br class="">+                    return None  # Timed out<br class="">+            self.recv_condition.release()<br class="">+            return packet<br class="">+<br class="">+        return None<br class="">+<br class="">+    def send_recv(self, command):<br class="">+        '''Send a command python dictionary as JSON and receive the JSON<br class="">+           response. Validates that the response is the correct sequence and<br class="">+           command in the reply. Any events that are received are added to the<br class="">+           events list in this object'''<br class="">+        self.send_packet(command)<br class="">+        done = False<br class="">+        while not done:<br class="">+            response = self.recv_packet(filter_type='response')<br class="">+            if response is None:<br class="">+                desc = 'no response for "%s"' % (command['command'])<br class="">+                raise ValueError(desc)<br class="">+            self.validate_response(command, response)<br class="">+            return response<br class="">+        return None<br class="">+<br class="">+    def wait_for_event(self, filter=None, timeout=None):<br class="">+        while True:<br class="">+            return self.recv_packet(filter_type='event', filter_event=filter,<br class="">+                                    timeout=timeout)<br class="">+        return None<br class="">+<br class="">+    def wait_for_stopped(self, timeout=None):<br class="">+        stopped_events = []<br class="">+        stopped_event = self.wait_for_event(filter=['stopped', 'exited'],<br class="">+                                            timeout=timeout)<br class="">+        exited = False<br class="">+        while stopped_event:<br class="">+            stopped_events.append(stopped_event)<br class="">+            # If we exited, then we are done<br class="">+            if stopped_event['event'] == 'exited':<br class="">+                self.exit_status = stopped_event['body']['exitCode']<br class="">+                exited = True<br class="">+                break<br class="">+            # Otherwise we stopped and there might be one or more 'stopped'<br class="">+            # events for each thread that stopped with a reason, so keep<br class="">+            # checking for more 'stopped' events and return all of them<br class="">+            stopped_event = self.wait_for_event(filter='stopped', timeout=0.25)<br class="">+        if exited:<br class="">+            self.threads = []<br class="">+        return stopped_events<br class="">+<br class="">+    def wait_for_exited(self):<br class="">+        event_dict = self.wait_for_event('exited')<br class="">+        if event_dict is None:<br class="">+            raise ValueError("didn't get stopped event")<br class="">+        return event_dict<br class="">+<br class="">+    def get_initialize_value(self, key):<br class="">+        '''Get a value for the given key if it there is a key/value pair in<br class="">+           the "initialize" request response body.<br class="">+        '''<br class="">+        if self.initialize_body and key in self.initialize_body:<br class="">+            return self.initialize_body[key]<br class="">+        return None<br class="">+<br class="">+    def get_threads(self):<br class="">+        if self.threads is None:<br class="">+            self.request_threads()<br class="">+        return self.threads<br class="">+<br class="">+    def get_thread_id(self, threadIndex=0):<br class="">+        '''Utility function to get the first thread ID in the thread list.<br class="">+           If the thread list is empty, then fetch the threads.<br class="">+        '''<br class="">+        if self.threads is None:<br class="">+            self.request_threads()<br class="">+        if self.threads and threadIndex < len(self.threads):<br class="">+            return self.threads[threadIndex]['id']<br class="">+        return None<br class="">+<br class="">+    def get_stackFrame(self, frameIndex=0, threadId=None):<br class="">+        '''Get a single "StackFrame" object from a "stackTrace" request and<br class="">+           return the "StackFrame as a python dictionary, or None on failure<br class="">+        '''<br class="">+        if threadId is None:<br class="">+            threadId = self.get_thread_id()<br class="">+        if threadId is None:<br class="">+            print('invalid threadId')<br class="">+            return None<br class="">+        response = self.request_stackTrace(threadId, startFrame=frameIndex,<br class="">+                                           levels=1)<br class="">+        if response:<br class="">+            return response['body']['stackFrames'][0]<br class="">+        print('invalid response')<br class="">+        return None<br class="">+<br class="">+    def get_scope_variables(self, scope_name, frameIndex=0, threadId=None):<br class="">+        stackFrame = self.get_stackFrame(frameIndex=frameIndex,<br class="">+                                         threadId=threadId)<br class="">+        if stackFrame is None:<br class="">+            return []<br class="">+        frameId = stackFrame['id']<br class="">+        if frameId in self.frame_scopes:<br class="">+            frame_scopes = self.frame_scopes[frameId]<br class="">+        else:<br class="">+            scopes_response = self.request_scopes(frameId)<br class="">+            frame_scopes = scopes_response['body']['scopes']<br class="">+            self.frame_scopes[frameId] = frame_scopes<br class="">+        for scope in frame_scopes:<br class="">+            if scope['name'] == scope_name:<br class="">+                varRef = scope['variablesReference']<br class="">+                variables_response = self.request_variables(varRef)<br class="">+                if variables_response:<br class="">+                    if 'body' in variables_response:<br class="">+                        body = variables_response['body']<br class="">+                        if 'variables' in body:<br class="">+                            vars = body['variables']<br class="">+                            return vars<br class="">+        return []<br class="">+<br class="">+    def get_global_variables(self, frameIndex=0, threadId=None):<br class="">+        return self.get_scope_variables('Globals', frameIndex=frameIndex,<br class="">+                                        threadId=threadId)<br class="">+<br class="">+    def get_local_variables(self, frameIndex=0, threadId=None):<br class="">+        return self.get_scope_variables('Locals', frameIndex=frameIndex,<br class="">+                                        threadId=threadId)<br class="">+<br class="">+    def get_local_variable(self, name, frameIndex=0, threadId=None):<br class="">+        locals = self.get_local_variables(frameIndex=frameIndex,<br class="">+                                          threadId=threadId)<br class="">+        for local in locals:<br class="">+            if 'name' in local and local['name'] == name:<br class="">+                return local<br class="">+        return None<br class="">+<br class="">+    def get_local_variable_value(self, name, frameIndex=0, threadId=None):<br class="">+        variable = self.get_local_variable(name, frameIndex=frameIndex,<br class="">+                                           threadId=threadId)<br class="">+        if variable and 'value' in variable:<br class="">+            return variable['value']<br class="">+        return None<br class="">+<br class="">+    def replay_packets(self, replay_file_path):<br class="">+        f = open(replay_file_path, 'r')<br class="">+        mode = 'invalid'<br class="">+        set_sequence = False<br class="">+        command_dict = None<br class="">+        while mode != 'eof':<br class="">+            if mode == 'invalid':<br class="">+                line = f.readline()<br class="">+                if line.startswith('to adapter:'):<br class="">+                    mode = 'send'<br class="">+                elif line.startswith('from adapter:'):<br class="">+                    mode = 'recv'<br class="">+            elif mode == 'send':<br class="">+                command_dict = read_packet(f)<br class="">+                # Skip the end of line that follows the JSON<br class="">+                f.readline()<br class="">+                if command_dict is None:<br class="">+                    raise ValueError('decode packet failed from replay file')<br class="">+                print('Sending:')<br class="">+                pprint.PrettyPrinter(indent=2).pprint(command_dict)<br class="">+                # raw_input('Press ENTER to send:')<br class="">+                self.send_packet(command_dict, set_sequence)<br class="">+                mode = 'invalid'<br class="">+            elif mode == 'recv':<br class="">+                print('Replay response:')<br class="">+                replay_response = read_packet(f)<br class="">+                # Skip the end of line that follows the JSON<br class="">+                f.readline()<br class="">+                pprint.PrettyPrinter(indent=2).pprint(replay_response)<br class="">+                actual_response = self.recv_packet()<br class="">+                if actual_response:<br class="">+                    type = actual_response['type']<br class="">+                    print('Actual response:')<br class="">+                    if type == 'response':<br class="">+                        self.validate_response(command_dict, actual_response)<br class="">+                    pprint.PrettyPrinter(indent=2).pprint(actual_response)<br class="">+                else:<br class="">+                    print("error: didn't get a valid response")<br class="">+                mode = 'invalid'<br class="">+<br class="">+    def request_attach(self, program=None, pid=None, waitFor=None, trace=None,<br class="">+                       initCommands=None, preRunCommands=None,<br class="">+                       stopCommands=None, exitCommands=None,<br class="">+                       attachCommands=None):<br class="">+        args_dict = {}<br class="">+        if pid is not None:<br class="">+            args_dict['pid'] = pid<br class="">+        if program is not None:<br class="">+            args_dict['program'] = program<br class="">+        if waitFor is not None:<br class="">+            args_dict['waitFor'] = waitFor<br class="">+        if trace:<br class="">+            args_dict['trace'] = trace<br class="">+        if initCommands:<br class="">+            args_dict['initCommands'] = initCommands<br class="">+        if preRunCommands:<br class="">+            args_dict['preRunCommands'] = preRunCommands<br class="">+        if stopCommands:<br class="">+            args_dict['stopCommands'] = stopCommands<br class="">+        if exitCommands:<br class="">+            args_dict['exitCommands'] = exitCommands<br class="">+        if attachCommands:<br class="">+            args_dict['attachCommands'] = attachCommands<br class="">+        command_dict = {<br class="">+            'command': 'attach',<br class="">+            'type': 'request',<br class="">+            'arguments': args_dict<br class="">+        }<br class="">+        return self.send_recv(command_dict)<br class="">+<br class="">+    def request_configurationDone(self):<br class="">+        command_dict = {<br class="">+            'command': 'configurationDone',<br class="">+            'type': 'request',<br class="">+            'arguments': {}<br class="">+        }<br class="">+        response = self.send_recv(command_dict)<br class="">+        if response:<br class="">+            self.configuration_done_sent = True<br class="">+        return response<br class="">+<br class="">+    def _process_stopped(self):<br class="">+        self.threads = None<br class="">+        self.frame_scopes = {}<br class="">+<br class="">+    def request_continue(self, threadId=None):<br class="">+        if self.exit_status is not None:<br class="">+            raise ValueError('request_continue called after process exited')<br class="">+        # If we have launched or attached, then the first continue is done by<br class="">+        # sending the 'configurationDone' request<br class="">+        if not self.configuration_done_sent:<br class="">+            return self.request_configurationDone()<br class="">+        args_dict = {}<br class="">+        if threadId is None:<br class="">+            threadId = self.get_thread_id()<br class="">+        args_dict['threadId'] = threadId<br class="">+        command_dict = {<br class="">+            'command': 'continue',<br class="">+            'type': 'request',<br class="">+            'arguments': args_dict<br class="">+        }<br class="">+        response = self.send_recv(command_dict)<br class="">+        recv_packets = []<br class="">+        self.recv_condition.acquire()<br class="">+        for event in self.recv_packets:<br class="">+            if event['event'] != 'stopped':<br class="">+                recv_packets.append(event)<br class="">+        self.recv_packets = recv_packets<br class="">+        self.recv_condition.release()<br class="">+        return response<br class="">+<br class="">+    def request_disconnect(self, terminateDebuggee=None):<br class="">+        args_dict = {}<br class="">+        if terminateDebuggee is not None:<br class="">+            if terminateDebuggee:<br class="">+                args_dict['terminateDebuggee'] = True<br class="">+            else:<br class="">+                args_dict['terminateDebuggee'] = False<br class="">+        command_dict = {<br class="">+            'command': 'disconnect',<br class="">+            'type': 'request',<br class="">+            'arguments': args_dict<br class="">+        }<br class="">+        return self.send_recv(command_dict)<br class="">+<br class="">+    def request_evaluate(self, expression, frameIndex=0, threadId=None):<br class="">+        stackFrame = self.get_stackFrame(frameIndex=frameIndex,<br class="">+                                         threadId=threadId)<br class="">+        if stackFrame is None:<br class="">+            return []<br class="">+        args_dict = {<br class="">+            'expression': expression,<br class="">+            'frameId': stackFrame['id'],<br class="">+        }<br class="">+        command_dict = {<br class="">+            'command': 'evaluate',<br class="">+            'type': 'request',<br class="">+            'arguments': args_dict<br class="">+        }<br class="">+        return self.send_recv(command_dict)<br class="">+<br class="">+    def request_initialize(self):<br class="">+        command_dict = {<br class="">+            'command': 'initialize',<br class="">+            'type': 'request',<br class="">+            'arguments': {<br class="">+                'adapterID': 'lldb-native',<br class="">+                'clientID': 'vscode',<br class="">+                'columnsStartAt1': True,<br class="">+                'linesStartAt1': True,<br class="">+                'locale': 'en-us',<br class="">+                'pathFormat': 'path',<br class="">+                'supportsRunInTerminalRequest': True,<br class="">+                'supportsVariablePaging': True,<br class="">+                'supportsVariableType': True<br class="">+            }<br class="">+        }<br class="">+        response = self.send_recv(command_dict)<br class="">+        if response:<br class="">+            if 'body' in response:<br class="">+                self.initialize_body = response['body']<br class="">+        return response<br class="">+<br class="">+    def request_launch(self, program, args=None, cwd=None, env=None,<br class="">+                       stopOnEntry=False, disableASLR=True,<br class="">+                       disableSTDIO=False, shellExpandArguments=False,<br class="">+                       trace=False, initCommands=None, preRunCommands=None,<br class="">+                       stopCommands=None, exitCommands=None, sourcePath=None,<br class="">+                       debuggerRoot=None):<br class="">+        args_dict = {<br class="">+            'program': program<br class="">+        }<br class="">+        if args:<br class="">+            args_dict['args'] = args<br class="">+        if cwd:<br class="">+            args_dict['cwd'] = cwd<br class="">+        if env:<br class="">+            args_dict['env'] = env<br class="">+        if stopOnEntry:<br class="">+            args_dict['stopOnEntry'] = stopOnEntry<br class="">+        if disableASLR:<br class="">+            args_dict['disableASLR'] = disableASLR<br class="">+        if disableSTDIO:<br class="">+            args_dict['disableSTDIO'] = disableSTDIO<br class="">+        if shellExpandArguments:<br class="">+            args_dict['shellExpandArguments'] = shellExpandArguments<br class="">+        if trace:<br class="">+            args_dict['trace'] = trace<br class="">+        if initCommands:<br class="">+            args_dict['initCommands'] = initCommands<br class="">+        if preRunCommands:<br class="">+            args_dict['preRunCommands'] = preRunCommands<br class="">+        if stopCommands:<br class="">+            args_dict['stopCommands'] = stopCommands<br class="">+        if exitCommands:<br class="">+            args_dict['exitCommands'] = exitCommands<br class="">+        if sourcePath:<br class="">+            args_dict['sourcePath'] = sourcePath<br class="">+        if debuggerRoot:<br class="">+            args_dict['debuggerRoot'] = debuggerRoot<br class="">+        command_dict = {<br class="">+            'command': 'launch',<br class="">+            'type': 'request',<br class="">+            'arguments': args_dict<br class="">+        }<br class="">+        response = self.send_recv(command_dict)<br class="">+<br class="">+        # Wait for a 'process' and 'initialized' event in any order<br class="">+        self.wait_for_event(filter=['process', 'initialized'])<br class="">+        self.wait_for_event(filter=['process', 'initialized'])<br class="">+        return response<br class="">+<br class="">+    def request_next(self, threadId):<br class="">+        if self.exit_status is not None:<br class="">+            raise ValueError('request_continue called after process exited')<br class="">+        args_dict = {'threadId': threadId}<br class="">+        command_dict = {<br class="">+            'command': 'next',<br class="">+            'type': 'request',<br class="">+            'arguments': args_dict<br class="">+        }<br class="">+        return self.send_recv(command_dict)<br class="">+<br class="">+    def request_stepIn(self, threadId):<br class="">+        if self.exit_status is not None:<br class="">+            raise ValueError('request_continue called after process exited')<br class="">+        args_dict = {'threadId': threadId}<br class="">+        command_dict = {<br class="">+            'command': 'stepIn',<br class="">+            'type': 'request',<br class="">+            'arguments': args_dict<br class="">+        }<br class="">+        return self.send_recv(command_dict)<br class="">+<br class="">+    def request_stepOut(self, threadId):<br class="">+        if self.exit_status is not None:<br class="">+            raise ValueError('request_continue called after process exited')<br class="">+        args_dict = {'threadId': threadId}<br class="">+        command_dict = {<br class="">+            'command': 'stepOut',<br class="">+            'type': 'request',<br class="">+            'arguments': args_dict<br class="">+        }<br class="">+        return self.send_recv(command_dict)<br class="">+<br class="">+    def request_pause(self, threadId=None):<br class="">+        if self.exit_status is not None:<br class="">+            raise ValueError('request_continue called after process exited')<br class="">+        if threadId is None:<br class="">+            threadId = self.get_thread_id()<br class="">+        args_dict = {'threadId': threadId}<br class="">+        command_dict = {<br class="">+            'command': 'pause',<br class="">+            'type': 'request',<br class="">+            'arguments': args_dict<br class="">+        }<br class="">+        return self.send_recv(command_dict)<br class="">+<br class="">+    def request_scopes(self, frameId):<br class="">+        args_dict = {'frameId': frameId}<br class="">+        command_dict = {<br class="">+            'command': 'scopes',<br class="">+            'type': 'request',<br class="">+            'arguments': args_dict<br class="">+        }<br class="">+        return self.send_recv(command_dict)<br class="">+<br class="">+    def request_setBreakpoints(self, file_path, line_array, condition=None,<br class="">+                               hitCondition=None):<br class="">+        (dir, base) = os.path.split(file_path)<br class="">+        breakpoints = []<br class="">+        for line in line_array:<br class="">+            bp = {'line': line}<br class="">+            if condition is not None:<br class="">+                bp['condition'] = condition<br class="">+            if hitCondition is not None:<br class="">+                bp['hitCondition'] = hitCondition<br class="">+            breakpoints.append(bp)<br class="">+        source_dict = {<br class="">+            'name': base,<br class="">+            'path': file_path<br class="">+        }<br class="">+        args_dict = {<br class="">+            'source': source_dict,<br class="">+            'breakpoints': breakpoints,<br class="">+            'lines': '%s' % (line_array),<br class="">+            'sourceModified': False,<br class="">+        }<br class="">+        command_dict = {<br class="">+            'command': 'setBreakpoints',<br class="">+            'type': 'request',<br class="">+            'arguments': args_dict<br class="">+        }<br class="">+        return self.send_recv(command_dict)<br class="">+<br class="">+    def request_setExceptionBreakpoints(self, filters):<br class="">+        args_dict = {'filters': filters}<br class="">+        command_dict = {<br class="">+            'command': 'setExceptionBreakpoints',<br class="">+            'type': 'request',<br class="">+            'arguments': args_dict<br class="">+        }<br class="">+        return self.send_recv(command_dict)<br class="">+<br class="">+    def request_setFunctionBreakpoints(self, names, condition=None,<br class="">+                                       hitCondition=None):<br class="">+        breakpoints = []<br class="">+        for name in names:<br class="">+            bp = {'name': name}<br class="">+            if condition is not None:<br class="">+                bp['condition'] = condition<br class="">+            if hitCondition is not None:<br class="">+                bp['hitCondition'] = hitCondition<br class="">+            breakpoints.append(bp)<br class="">+        args_dict = {'breakpoints': breakpoints}<br class="">+        command_dict = {<br class="">+            'command': 'setFunctionBreakpoints',<br class="">+            'type': 'request',<br class="">+            'arguments': args_dict<br class="">+        }<br class="">+        return self.send_recv(command_dict)<br class="">+<br class="">+    def request_stackTrace(self, threadId=None, startFrame=None, levels=None,<br class="">+                           dump=False):<br class="">+        if threadId is None:<br class="">+            threadId = self.get_thread_id()<br class="">+        args_dict = {'threadId': threadId}<br class="">+        if startFrame is not None:<br class="">+            args_dict['startFrame'] = startFrame<br class="">+        if levels is not None:<br class="">+            args_dict['levels'] = levels<br class="">+        command_dict = {<br class="">+            'command': 'stackTrace',<br class="">+            'type': 'request',<br class="">+            'arguments': args_dict<br class="">+        }<br class="">+        response = self.send_recv(command_dict)<br class="">+        if dump:<br class="">+            for (idx, frame) in enumerate(response['body']['stackFrames']):<br class="">+                name = frame['name']<br class="">+                if 'line' in frame and 'source' in frame:<br class="">+                    source = frame['source']<br class="">+                    if 'sourceReference' not in source:<br class="">+                        if 'name' in source:<br class="">+                            source_name = source['name']<br class="">+                            line = frame['line']<br class="">+                            print("[%3u] %s @ %s:%u" % (idx, name, source_name,<br class="">+                                                        line))<br class="">+                            continue<br class="">+                print("[%3u] %s" % (idx, name))<br class="">+        return response<br class="">+<br class="">+    def request_threads(self):<br class="">+        '''Request a list of all threads and combine any information from any<br class="">+           "stopped" events since those contain more information about why a<br class="">+           thread actually stopped. Returns an array of thread dictionaries<br class="">+           with information about all threads'''<br class="">+        command_dict = {<br class="">+            'command': 'threads',<br class="">+            'type': 'request',<br class="">+            'arguments': {}<br class="">+        }<br class="">+        response = self.send_recv(command_dict)<br class="">+        body = response['body']<br class="">+        # Fill in "self.threads" correctly so that clients that call<br class="">+        # self.get_threads() or self.get_thread_id(...) can get information<br class="">+        # on threads when the process is stopped.<br class="">+        if 'threads' in body:<br class="">+            self.threads = body['threads']<br class="">+            for thread in self.threads:<br class="">+                # Copy the thread dictionary so we can add key/value pairs to<br class="">+                # it without affecfting the original info from the "threads"<br class="">+                # command.<br class="">+                tid = thread['id']<br class="">+                if tid in self.thread_stop_reasons:<br class="">+                    thread_stop_info = self.thread_stop_reasons[tid]<br class="">+                    copy_keys = ['reason', 'description', 'text']<br class="">+                    for key in copy_keys:<br class="">+                        if key in thread_stop_info:<br class="">+                            thread[key] = thread_stop_info[key]<br class="">+        else:<br class="">+            self.threads = None<br class="">+        return response<br class="">+<br class="">+    def request_variables(self, variablesReference, start=None, count=None):<br class="">+        args_dict = {'variablesReference': variablesReference}<br class="">+        if start is not None:<br class="">+            args_dict['start'] = start<br class="">+        if count is not None:<br class="">+            args_dict['count'] = count<br class="">+        command_dict = {<br class="">+            'command': 'variables',<br class="">+            'type': 'request',<br class="">+            'arguments': args_dict<br class="">+        }<br class="">+        return self.send_recv(command_dict)<br class="">+<br class="">+    def request_setVariable(self, containingVarRef, name, value, id=None):<br class="">+        args_dict = {<br class="">+            'variablesReference': containingVarRef,<br class="">+            'name': name,<br class="">+            'value': str(value)<br class="">+        }<br class="">+        if id is not None:<br class="">+            args_dict['id'] = id<br class="">+        command_dict = {<br class="">+            'command': 'setVariable',<br class="">+            'type': 'request',<br class="">+            'arguments': args_dict<br class="">+        }<br class="">+        return self.send_recv(command_dict)<br class="">+<br class="">+    def request_testGetTargetBreakpoints(self):<br class="">+        '''A request packet used in the LLDB test suite to get all currently<br class="">+           set breakpoint infos for all breakpoints currently set in the<br class="">+           target.<br class="">+        '''<br class="">+        command_dict = {<br class="">+            'command': '_testGetTargetBreakpoints',<br class="">+            'type': 'request',<br class="">+            'arguments': {}<br class="">+        }<br class="">+        return self.send_recv(command_dict)<br class="">+<br class="">+    def terminate(self):<br class="">+        self.send.close()<br class="">+        # self.recv.close()<br class="">+<br class="">+<br class="">+class DebugAdaptor(DebugCommunication):<br class="">+    def __init__(self, executable=None, port=None):<br class="">+        self.process = None<br class="">+        if executable is not None:<br class="">+            self.process = subprocess.Popen([executable],<br class="">+                                            stdin=subprocess.PIPE,<br class="">+                                            stdout=subprocess.PIPE,<br class="">+                                            stderr=subprocess.PIPE)<br class="">+            DebugCommunication.__init__(self, self.process.stdout,<br class="">+                                        self.process.stdin)<br class="">+        elif port is not None:<br class="">+            s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<br class="">+            s.connect(('127.0.0.1', port))<br class="">+            DebugCommunication.__init__(self, s.makefile('r'), s.makefile('w'))<br class="">+<br class="">+    def get_pid(self):<br class="">+        if self.process:<br class="">+            return self.process.pid<br class="">+        return -1<br class="">+<br class="">+    def terminate(self):<br class="">+        super(DebugAdaptor, self).terminate()<br class="">+        if self.process is not None:<br class="">+            self.process.terminate()<br class="">+            self.process.wait()<br class="">+            self.process = None<br class="">+<br class="">+<br class="">+def attach_options_specified(options):<br class="">+    if options.pid is not None:<br class="">+        return True<br class="">+    if options.waitFor:<br class="">+        return True<br class="">+    if options.attach:<br class="">+        return True<br class="">+    if options.attachCmds:<br class="">+        return True<br class="">+    return False<br class="">+<br class="">+<br class="">+def run_vscode(dbg, args, options):<br class="">+    dbg.request_initialize()<br class="">+    if attach_options_specified(options):<br class="">+        response = dbg.request_attach(program=options.program,<br class="">+                                      pid=options.pid,<br class="">+                                      waitFor=options.waitFor,<br class="">+                                      attachCommands=options.attachCmds,<br class="">+                                      initCommands=options.initCmds,<br class="">+                                      preRunCommands=options.preRunCmds,<br class="">+                                      stopCommands=options.stopCmds,<br class="">+                                      exitCommands=options.exitCmds)<br class="">+    else:<br class="">+        response = dbg.request_launch(options.program,<br class="">+                                      args=args,<br class="">+                                      env=options.envs,<br class="">+                                      cwd=options.workingDir,<br class="">+                                      debuggerRoot=options.debuggerRoot,<br class="">+                                      sourcePath=options.sourcePath,<br class="">+                                      initCommands=options.initCmds,<br class="">+                                      preRunCommands=options.preRunCmds,<br class="">+                                      stopCommands=options.stopCmds,<br class="">+                                      exitCommands=options.exitCmds)<br class="">+<br class="">+    if response['success']:<br class="">+        if options.sourceBreakpoints:<br class="">+            source_to_lines = {}<br class="">+            for file_line in options.sourceBreakpoints:<br class="">+                (path, line) = file_line.split(':')<br class="">+                if len(path) == 0 or len(line) == 0:<br class="">+                    print('error: invalid source with line "%s"' %<br class="">+                          (file_line))<br class="">+<br class="">+                else:<br class="">+                    if path in source_to_lines:<br class="">+                        source_to_lines[path].append(int(line))<br class="">+                    else:<br class="">+                        source_to_lines[path] = [int(line)]<br class="">+            for source in source_to_lines:<br class="">+                dbg.request_setBreakpoints(source, source_to_lines[source])<br class="">+        if options.funcBreakpoints:<br class="">+            dbg.request_setFunctionBreakpoints(options.funcBreakpoints)<br class="">+        dbg.request_configurationDone()<br class="">+        dbg.wait_for_stopped()<br class="">+    else:<br class="">+        if 'message' in response:<br class="">+            print(response['message'])<br class="">+    dbg.request_disconnect(terminateDebuggee=True)<br class="">+<br class="">+<br class="">+def main():<br class="">+    parser = optparse.OptionParser(<br class="">+        description=('A testing framework for the Visual Studio Code Debug '<br class="">+                     'Adaptor protocol'))<br class="">+<br class="">+    parser.add_option(<br class="">+        '--vscode',<br class="">+        type='string',<br class="">+        dest='vscode_path',<br class="">+        help=('The path to the a command line program that implements the '<br class="">+              'Visual Studio Code Debug Adaptor protocol.'),<br class="">+        default=None)<br class="">+<br class="">+    parser.add_option(<br class="">+        '--program',<br class="">+        type='string',<br class="">+        dest='program',<br class="">+        help='The path to the program to debug.',<br class="">+        default=None)<br class="">+<br class="">+    parser.add_option(<br class="">+        '--workingDir',<br class="">+        type='string',<br class="">+        dest='workingDir',<br class="">+        default=None,<br class="">+        help='Set the working directory for the process we launch.')<br class="">+<br class="">+    parser.add_option(<br class="">+        '--sourcePath',<br class="">+        type='string',<br class="">+        dest='sourcePath',<br class="">+        default=None,<br class="">+        help=('Set the relative source root for any debug info that has '<br class="">+              'relative paths in it.'))<br class="">+<br class="">+    parser.add_option(<br class="">+        '--debuggerRoot',<br class="">+        type='string',<br class="">+        dest='debuggerRoot',<br class="">+        default=None,<br class="">+        help=('Set the working directory for lldb-vscode for any object files '<br class="">+              'with relative paths in the Mach-o debug map.'))<br class="">+<br class="">+    parser.add_option(<br class="">+        '-r', '--replay',<br class="">+        type='string',<br class="">+        dest='replay',<br class="">+        help=('Specify a file containing a packet log to replay with the '<br class="">+              'current Visual Studio Code Debug Adaptor executable.'),<br class="">+        default=None)<br class="">+<br class="">+    parser.add_option(<br class="">+        '-g', '--debug',<br class="">+        action='store_true',<br class="">+        dest='debug',<br class="">+        default=False,<br class="">+        help='Pause waiting for a debugger to attach to the debug adaptor')<br class="">+<br class="">+    parser.add_option(<br class="">+        '--port',<br class="">+        type='int',<br class="">+        dest='port',<br class="">+        help="Attach a socket to a port instead of using STDIN for VSCode",<br class="">+        default=None)<br class="">+<br class="">+    parser.add_option(<br class="">+        '--pid',<br class="">+        type='int',<br class="">+        dest='pid',<br class="">+        help="The process ID to attach to",<br class="">+        default=None)<br class="">+<br class="">+    parser.add_option(<br class="">+        '--attach',<br class="">+        action='store_true',<br class="">+        dest='attach',<br class="">+        default=False,<br class="">+        help=('Specify this option to attach to a process by name. The '<br class="">+              'process name is the basanme of the executable specified with '<br class="">+              'the --program option.'))<br class="">+<br class="">+    parser.add_option(<br class="">+        '-f', '--function-bp',<br class="">+        type='string',<br class="">+        action='append',<br class="">+        dest='funcBreakpoints',<br class="">+        help=('Specify the name of a function to break at. '<br class="">+              'Can be specified more than once.'),<br class="">+        default=[])<br class="">+<br class="">+    parser.add_option(<br class="">+        '-s', '--source-bp',<br class="">+        type='string',<br class="">+        action='append',<br class="">+        dest='sourceBreakpoints',<br class="">+        default=[],<br class="">+        help=('Specify source breakpoints to set in the format of '<br class="">+              '<source>:<line>. '<br class="">+              'Can be specified more than once.'))<br class="">+<br class="">+    parser.add_option(<br class="">+        '--attachCommand',<br class="">+        type='string',<br class="">+        action='append',<br class="">+        dest='attachCmds',<br class="">+        default=[],<br class="">+        help=('Specify a LLDB command that will attach to a process. '<br class="">+              'Can be specified more than once.'))<br class="">+<br class="">+    parser.add_option(<br class="">+        '--initCommand',<br class="">+        type='string',<br class="">+        action='append',<br class="">+        dest='initCmds',<br class="">+        default=[],<br class="">+        help=('Specify a LLDB command that will be executed before the target '<br class="">+              'is created. Can be specified more than once.'))<br class="">+<br class="">+    parser.add_option(<br class="">+        '--preRunCommand',<br class="">+        type='string',<br class="">+        action='append',<br class="">+        dest='preRunCmds',<br class="">+        default=[],<br class="">+        help=('Specify a LLDB command that will be executed after the target '<br class="">+              'has been created. Can be specified more than once.'))<br class="">+<br class="">+    parser.add_option(<br class="">+        '--stopCommand',<br class="">+        type='string',<br class="">+        action='append',<br class="">+        dest='stopCmds',<br class="">+        default=[],<br class="">+        help=('Specify a LLDB command that will be executed each time the'<br class="">+              'process stops. Can be specified more than once.'))<br class="">+<br class="">+    parser.add_option(<br class="">+        '--exitCommand',<br class="">+        type='string',<br class="">+        action='append',<br class="">+        dest='exitCmds',<br class="">+        default=[],<br class="">+        help=('Specify a LLDB command that will be executed when the process '<br class="">+              'exits. Can be specified more than once.'))<br class="">+<br class="">+    parser.add_option(<br class="">+        '--env',<br class="">+        type='string',<br class="">+        action='append',<br class="">+        dest='envs',<br class="">+        default=[],<br class="">+        help=('Specify environment variables to pass to the launched '<br class="">+              'process.'))<br class="">+<br class="">+    parser.add_option(<br class="">+        '--waitFor',<br class="">+        action='store_true',<br class="">+        dest='waitFor',<br class="">+        default=False,<br class="">+        help=('Wait for the next process to be launched whose name matches '<br class="">+              'the basename of the program specified with the --program '<br class="">+              'option'))<br class="">+<br class="">+    (options, args) = parser.parse_args(sys.argv[1:])<br class="">+<br class="">+    if options.vscode_path is None and options.port is None:<br class="">+        print('error: must either specify a path to a Visual Studio Code '<br class="">+              'Debug Adaptor vscode executable path using the --vscode '<br class="">+              'option, or a port to attach to for an existing lldb-vscode '<br class="">+              'using the --port option')<br class="">+        return<br class="">+    dbg = DebugAdaptor(executable=options.vscode_path, port=options.port)<br class="">+    if options.debug:<br class="">+        raw_input('Waiting for debugger to attach pid "%i"' % (<br class="">+                  dbg.get_pid()))<br class="">+    if options.replay:<br class="">+        dbg.replay_packets(options.replay)<br class="">+    else:<br class="">+        run_vscode(dbg, args, options)<br class="">+    dbg.terminate()<br class="">+<br class="">+<br class="">+if __name__ == '__main__':<br class="">+    main()<br class=""><br class="">Modified: lldb/trunk/tools/CMakeLists.txt<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/CMakeLists.txt?rev=339911&r1=339910&r2=339911&view=diff" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/CMakeLists.txt?rev=339911&r1=339910&r2=339911&view=diff</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/CMakeLists.txt (original)<br class="">+++ lldb/trunk/tools/CMakeLists.txt Thu Aug 16 10:59:38 2018<br class="">@@ -5,6 +5,7 @@ endif()<br class=""> add_subdirectory(argdumper)<br class=""> add_subdirectory(driver)<br class=""> add_subdirectory(lldb-mi)<br class="">+add_subdirectory(lldb-vscode)<br class=""> if (LLDB_CAN_USE_LLDB_SERVER)<br class="">   add_subdirectory(lldb-server)<br class=""> endif()<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/BreakpointBase.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/BreakpointBase.cpp?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/BreakpointBase.cpp?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/BreakpointBase.cpp (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/BreakpointBase.cpp Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,37 @@<br class="">+//===-- BreakpointBase.cpp --------------------------------------*- C++ -*-===//<br class="">+//<br class="">+//                     The LLVM Compiler Infrastructure<br class="">+//<br class="">+// This file is distributed under the University of Illinois Open Source<br class="">+// License. See LICENSE.TXT for details.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+<br class="">+#include "BreakpointBase.h"<br class="">+#include "llvm/ADT/StringExtras.h"<br class="">+<br class="">+using namespace lldb_vscode;<br class="">+<br class="">+BreakpointBase::BreakpointBase(const llvm::json::Object &obj)<br class="">+    : condition(GetString(obj, "condition")),<br class="">+      hitCondition(GetString(obj, "hitCondition")),<br class="">+      logMessage(GetString(obj, "logMessage")) {}<br class="">+<br class="">+void BreakpointBase::SetCondition() { bp.SetCondition(condition.c_str()); }<br class="">+<br class="">+void BreakpointBase::SetHitCondition() {  <br class="">+  uint64_t hitCount = 0;<br class="">+  if (llvm::to_integer(hitCondition, hitCount))<br class="">+    bp.SetIgnoreCount(hitCount - 1);<br class="">+}<br class="">+<br class="">+void BreakpointBase::UpdateBreakpoint(const BreakpointBase &request_bp) {<br class="">+  if (condition != request_bp.condition) {<br class="">+    condition = request_bp.condition;<br class="">+    SetCondition();<br class="">+  }<br class="">+  if (hitCondition != request_bp.hitCondition) {<br class="">+    hitCondition = request_bp.hitCondition;<br class="">+    SetHitCondition();<br class="">+  }<br class="">+}<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/BreakpointBase.h<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/BreakpointBase.h?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/BreakpointBase.h?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/BreakpointBase.h (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/BreakpointBase.h Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,44 @@<br class="">+//===-- BreakpointBase.h ----------------------------------------*- C++ -*-===//<br class="">+//<br class="">+//                     The LLVM Compiler Infrastructure<br class="">+//<br class="">+// This file is distributed under the University of Illinois Open Source<br class="">+// License. See LICENSE.TXT for details.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+<br class="">+#ifndef LLDBVSCODE_BREAKPOINTBASE_H_<br class="">+#define LLDBVSCODE_BREAKPOINTBASE_H_<br class="">+<br class="">+#include "JSONUtils.h"<br class="">+#include "lldb/API/SBBreakpoint.h"<br class="">+#include "llvm/Support/JSON.h"<br class="">+#include <string><br class="">+<br class="">+namespace lldb_vscode {<br class="">+  <br class="">+struct BreakpointBase {<br class="">+<br class="">+  // An optional expression for conditional breakpoints.<br class="">+  std::string condition;<br class="">+  // An optional expression that controls how many hits of the breakpoint are<br class="">+  // ignored. The backend is expected to interpret the expression as needed<br class="">+  std::string hitCondition;<br class="">+  // If this attribute exists and is non-empty, the backend must not 'break'<br class="">+  // (stop) but log the message instead. Expressions within {} are<br class="">+  // interpolated.<br class="">+  std::string logMessage;<br class="">+  // The LLDB breakpoint associated wit this source breakpoint<br class="">+  lldb::SBBreakpoint bp;<br class="">+<br class="">+  BreakpointBase() = default;<br class="">+  BreakpointBase(const llvm::json::Object &obj);<br class="">+<br class="">+  void SetCondition();<br class="">+  void SetHitCondition();<br class="">+  void UpdateBreakpoint(const BreakpointBase &request_bp);<br class="">+};<br class="">+<br class="">+} // namespace lldb_vscode<br class="">+<br class="">+#endif<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/CMakeLists.txt<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/CMakeLists.txt?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/CMakeLists.txt?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/CMakeLists.txt (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/CMakeLists.txt Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,30 @@<br class="">+if ( CMAKE_SYSTEM_NAME MATCHES "Windows" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD" )<br class="">+  add_definitions( -DIMPORT_LIBLLDB )<br class="">+  list(APPEND extra_libs lldbHost)<br class="">+endif ()<br class="">+<br class="">+if (HAVE_LIBPTHREAD)<br class="">+  list(APPEND extra_libs pthread)<br class="">+endif ()<br class="">+<br class="">+# We need to include the llvm components we depend on manually, as liblldb does<br class="">+# not re-export those.<br class="">+set(LLVM_LINK_COMPONENTS Support)<br class="">+add_lldb_tool(lldb-vscode<br class="">+  lldb-vscode.cpp<br class="">+  BreakpointBase.cpp<br class="">+  ExceptionBreakpoint.cpp<br class="">+  FunctionBreakpoint.cpp<br class="">+  JSONUtils.cpp<br class="">+  LLDBUtils.cpp<br class="">+  SourceBreakpoint.cpp<br class="">+  VSCode.cpp<br class="">+<br class="">+  LINK_LIBS<br class="">+    liblldb<br class="">+    ${host_lib}<br class="">+    ${extra_libs}<br class="">+<br class="">+  LINK_COMPONENTS<br class="">+    Support<br class="">+  )<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/ExceptionBreakpoint.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/ExceptionBreakpoint.cpp?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/ExceptionBreakpoint.cpp?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/ExceptionBreakpoint.cpp (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/ExceptionBreakpoint.cpp Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,32 @@<br class="">+//===-- ExceptionBreakpoint.cpp ---------------------------------*- C++ -*-===//<br class="">+//<br class="">+//                     The LLVM Compiler Infrastructure<br class="">+//<br class="">+// This file is distributed under the University of Illinois Open Source<br class="">+// License. See LICENSE.TXT for details.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+<br class="">+#include "ExceptionBreakpoint.h"<br class="">+#include "VSCode.h"<br class="">+<br class="">+namespace lldb_vscode {<br class="">+<br class="">+void ExceptionBreakpoint::SetBreakpoint() {<br class="">+  if (bp.IsValid())<br class="">+    return;<br class="">+  bool catch_value = filter.find("_catch") != std::string::npos;<br class="">+  bool throw_value = filter.find("_throw") != std::string::npos;<br class="">+  bp = g_vsc.target.BreakpointCreateForException(language, catch_value,<br class="">+                                                 throw_value);<br class="">+}<br class="">+<br class="">+void ExceptionBreakpoint::ClearBreakpoint() {<br class="">+  if (!bp.IsValid())<br class="">+    return;<br class="">+  g_vsc.target.BreakpointDelete(bp.GetID());<br class="">+  bp = lldb::SBBreakpoint();<br class="">+}<br class="">+<br class="">+} // namespace lldb_vscode<br class="">+<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/ExceptionBreakpoint.h<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/ExceptionBreakpoint.h?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/ExceptionBreakpoint.h?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/ExceptionBreakpoint.h (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/ExceptionBreakpoint.h Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,38 @@<br class="">+//===-- ExceptionBreakpoint.h -----------------------------------*- C++ -*-===//<br class="">+//<br class="">+//                     The LLVM Compiler Infrastructure<br class="">+//<br class="">+// This file is distributed under the University of Illinois Open Source<br class="">+// License. See LICENSE.TXT for details.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+<br class="">+#ifndef LLDBVSCODE_EXCEPTIONBREAKPOINT_H_<br class="">+#define LLDBVSCODE_EXCEPTIONBREAKPOINT_H_<br class="">+<br class="">+#include <string><br class="">+<br class="">+#include "lldb/API/SBBreakpoint.h"<br class="">+<br class="">+namespace lldb_vscode {<br class="">+<br class="">+struct ExceptionBreakpoint {<br class="">+  std::string filter;<br class="">+  std::string label;<br class="">+  lldb::LanguageType language;<br class="">+  bool default_value;<br class="">+  lldb::SBBreakpoint bp;<br class="">+  ExceptionBreakpoint(std::string f, std::string l, lldb::LanguageType lang) :<br class="">+    filter(std::move(f)),<br class="">+    label(std::move(l)),<br class="">+    language(lang),<br class="">+    default_value(false),<br class="">+    bp() {}<br class="">+<br class="">+  void SetBreakpoint();<br class="">+  void ClearBreakpoint();<br class="">+};<br class="">+<br class="">+} // namespace lldb_vscode<br class="">+<br class="">+#endif<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/FunctionBreakpoint.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/FunctionBreakpoint.cpp?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/FunctionBreakpoint.cpp?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/FunctionBreakpoint.cpp (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/FunctionBreakpoint.cpp Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,28 @@<br class="">+//===-- FunctionBreakpoint.cpp ----------------------------------*- C++ -*-===//<br class="">+//<br class="">+//                     The LLVM Compiler Infrastructure<br class="">+//<br class="">+// This file is distributed under the University of Illinois Open Source<br class="">+// License. See LICENSE.TXT for details.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+<br class="">+#include "FunctionBreakpoint.h"<br class="">+#include "VSCode.h"<br class="">+<br class="">+namespace lldb_vscode {<br class="">+<br class="">+FunctionBreakpoint::FunctionBreakpoint(const llvm::json::Object &obj)<br class="">+    : BreakpointBase(obj), functionName(GetString(obj, "name")) {}<br class="">+<br class="">+void FunctionBreakpoint::SetBreakpoint() {<br class="">+  if (functionName.empty())<br class="">+    return;<br class="">+  bp = g_vsc.target.BreakpointCreateByName(functionName.c_str());<br class="">+  if (!condition.empty())<br class="">+    SetCondition();<br class="">+  if (!hitCondition.empty())<br class="">+    SetHitCondition();<br class="">+}<br class="">+<br class="">+}<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/FunctionBreakpoint.h<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/FunctionBreakpoint.h?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/FunctionBreakpoint.h?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/FunctionBreakpoint.h (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/FunctionBreakpoint.h Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,29 @@<br class="">+//===-- FunctionBreakpoint.h ------------------------------------*- C++ -*-===//<br class="">+//<br class="">+//                     The LLVM Compiler Infrastructure<br class="">+//<br class="">+// This file is distributed under the University of Illinois Open Source<br class="">+// License. See LICENSE.TXT for details.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+<br class="">+#ifndef LLDBVSCODE_FUNCTIONBREAKPOINT_H_<br class="">+#define LLDBVSCODE_FUNCTIONBREAKPOINT_H_<br class="">+<br class="">+#include "BreakpointBase.h"<br class="">+<br class="">+namespace lldb_vscode {<br class="">+<br class="">+struct FunctionBreakpoint : public BreakpointBase {<br class="">+  std::string functionName;<br class="">+<br class="">+  FunctionBreakpoint() = default;<br class="">+  FunctionBreakpoint(const llvm::json::Object &obj);<br class="">+<br class="">+  // Set this breakpoint in LLDB as a new breakpoint<br class="">+  void SetBreakpoint();<br class="">+};<br class="">+<br class="">+} // namespace lldb_vscode<br class="">+<br class="">+#endif<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/JSONUtils.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/JSONUtils.cpp?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/JSONUtils.cpp?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/JSONUtils.cpp (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/JSONUtils.cpp Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,882 @@<br class="">+//===-- JSONUtils.cpp -------------------------------------------*- C++ -*-===//<br class="">+//<br class="">+//                     The LLVM Compiler Infrastructure<br class="">+//<br class="">+// This file is distributed under the University of Illinois Open Source<br class="">+// License. See LICENSE.TXT for details.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+<br class="">+#include "llvm/Support/FormatAdapters.h"<br class="">+<br class="">+#include "lldb/API/SBBreakpoint.h"<br class="">+#include "lldb/API/SBBreakpointLocation.h"<br class="">+#include "lldb/API/SBValue.h"<br class="">+<br class="">+#include "ExceptionBreakpoint.h"<br class="">+#include "JSONUtils.h"<br class="">+#include "LLDBUtils.h"<br class="">+#include "VSCode.h"<br class="">+<br class="">+namespace lldb_vscode {<br class="">+<br class="">+llvm::StringRef GetAsString(const llvm::json::Value &value) {<br class="">+  if (auto s = value.getAsString())<br class="">+    return *s;<br class="">+  return llvm::StringRef();<br class="">+}<br class="">+<br class="">+// Gets a string from a JSON object using the key, or returns an empty string.<br class="">+llvm::StringRef GetString(const llvm::json::Object &obj, llvm::StringRef key) {<br class="">+  if (auto value = obj.getString(key))<br class="">+    return GetAsString(*value);<br class="">+  return llvm::StringRef();<br class="">+}<br class="">+<br class="">+llvm::StringRef GetString(const llvm::json::Object *obj, llvm::StringRef key) {<br class="">+  if (obj == nullptr)<br class="">+    return llvm::StringRef();<br class="">+  return GetString(*obj, key);<br class="">+}<br class="">+<br class="">+// Gets an unsigned integer from a JSON object using the key, or returns the<br class="">+// specified fail value.<br class="">+uint64_t GetUnsigned(const llvm::json::Object &obj, llvm::StringRef key,<br class="">+                     uint64_t fail_value) {<br class="">+  if (auto value = obj.getInteger(key))<br class="">+    return (uint64_t)*value;<br class="">+  return fail_value;<br class="">+}<br class="">+<br class="">+uint64_t GetUnsigned(const llvm::json::Object *obj, llvm::StringRef key,<br class="">+                     uint64_t fail_value) {<br class="">+  if (obj == nullptr)<br class="">+    return fail_value;<br class="">+  return GetUnsigned(*obj, key, fail_value);<br class="">+}<br class="">+<br class="">+bool GetBoolean(const llvm::json::Object &obj, llvm::StringRef key,<br class="">+                bool fail_value) {<br class="">+  if (auto value = obj.getBoolean(key))<br class="">+    return *value;<br class="">+  if (auto value = obj.getInteger(key))<br class="">+    return *value != 0;<br class="">+  return fail_value;<br class="">+}<br class="">+<br class="">+bool GetBoolean(const llvm::json::Object *obj, llvm::StringRef key,<br class="">+                bool fail_value) {<br class="">+  if (obj == nullptr)<br class="">+    return fail_value;<br class="">+  return GetBoolean(*obj, key, fail_value);<br class="">+}<br class="">+<br class="">+int64_t GetSigned(const llvm::json::Object &obj, llvm::StringRef key,<br class="">+                  int64_t fail_value) {<br class="">+  if (auto value = obj.getInteger(key))<br class="">+    return *value;<br class="">+  return fail_value;<br class="">+}<br class="">+<br class="">+int64_t GetSigned(const llvm::json::Object *obj, llvm::StringRef key,<br class="">+                  int64_t fail_value) {<br class="">+  if (obj == nullptr)<br class="">+    return fail_value;<br class="">+  return GetSigned(*obj, key, fail_value);<br class="">+}<br class="">+<br class="">+bool ObjectContainsKey(const llvm::json::Object &obj, llvm::StringRef key) {<br class="">+  if (obj.find(key) != obj.end())<br class="">+    return true;<br class="">+  return false;<br class="">+}<br class="">+<br class="">+std::vector<std::string> GetStrings(const llvm::json::Object *obj,<br class="">+                                    llvm::StringRef key) {<br class="">+  std::vector<std::string> strs;<br class="">+  auto json_array = obj->getArray(key);<br class="">+  if (!json_array)<br class="">+    return strs;<br class="">+  for (const auto &value : *json_array) {<br class="">+    switch (value.kind()) {<br class="">+    case llvm::json::Value::String:<br class="">+      strs.push_back(value.getAsString()->str());<br class="">+      break;<br class="">+    case llvm::json::Value::Number:<br class="">+    case llvm::json::Value::Boolean: {<br class="">+      std::string s;<br class="">+      llvm::raw_string_ostream strm(s);<br class="">+      strm << value;<br class="">+      strs.push_back(strm.str());<br class="">+      break;<br class="">+    }<br class="">+    case llvm::json::Value::Null:<br class="">+    case llvm::json::Value::Object:<br class="">+    case llvm::json::Value::Array:<br class="">+      break;<br class="">+    }<br class="">+  }<br class="">+  return strs;<br class="">+}<br class="">+<br class="">+void SetValueForKey(lldb::SBValue &v, llvm::json::Object &object,<br class="">+                    llvm::StringRef key) {<br class="">+  <br class="">+  llvm::StringRef value = v.GetValue();<br class="">+  llvm::StringRef summary = v.GetSummary();<br class="">+  llvm::StringRef type_name = v.GetType().GetDisplayTypeName();<br class="">+  <br class="">+  std::string result;<br class="">+  llvm::raw_string_ostream strm(result);<br class="">+  if (!value.empty()) {<br class="">+    strm << value;<br class="">+    if (!summary.empty())<br class="">+      strm << ' ' << summary;<br class="">+  } else if (!summary.empty()) {<br class="">+    strm << ' ' << summary;<br class="">+  } else if (!type_name.empty()) {<br class="">+    strm << type_name;<br class="">+    lldb::addr_t address = v.GetLoadAddress();<br class="">+    if (address != LLDB_INVALID_ADDRESS)<br class="">+      strm << " @ " << llvm::format_hex(address, 0);<br class="">+  }<br class="">+  strm.flush();<br class="">+  object.try_emplace(key, result);<br class="">+}<br class="">+<br class="">+void FillResponse(const llvm::json::Object &request,<br class="">+                  llvm::json::Object &response) {<br class="">+  // Fill in all of the needed response fields to a "request" and set "success"<br class="">+  // to true by default.<br class="">+  response.try_emplace("type", "response");<br class="">+  response.try_emplace("seq", (int64_t)0);<br class="">+  response.try_emplace("command", GetString(request, "command"));<br class="">+  const int64_t seq = GetSigned(request, "seq", 0);<br class="">+  response.try_emplace("request_seq", seq);<br class="">+  response.try_emplace("success", true);<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "Scope": {<br class="">+//   "type": "object",<br class="">+//   "description": "A Scope is a named container for variables. Optionally<br class="">+//                   a scope can map to a source or a range within a source.",<br class="">+//   "properties": {<br class="">+//     "name": {<br class="">+//       "type": "string",<br class="">+//       "description": "Name of the scope such as 'Arguments', 'Locals'."<br class="">+//     },<br class="">+//     "variablesReference": {<br class="">+//       "type": "integer",<br class="">+//       "description": "The variables of this scope can be retrieved by<br class="">+//                       passing the value of variablesReference to the<br class="">+//                       VariablesRequest."<br class="">+//     },<br class="">+//     "namedVariables": {<br class="">+//       "type": "integer",<br class="">+//       "description": "The number of named variables in this scope. The<br class="">+//                       client can use this optional information to present<br class="">+//                       the variables in a paged UI and fetch them in chunks."<br class="">+//     },<br class="">+//     "indexedVariables": {<br class="">+//       "type": "integer",<br class="">+//       "description": "The number of indexed variables in this scope. The<br class="">+//                       client can use this optional information to present<br class="">+//                       the variables in a paged UI and fetch them in chunks."<br class="">+//     },<br class="">+//     "expensive": {<br class="">+//       "type": "boolean",<br class="">+//       "description": "If true, the number of variables in this scope is<br class="">+//                       large or expensive to retrieve."<br class="">+//     },<br class="">+//     "source": {<br class="">+//       "$ref": "#/definitions/Source",<br class="">+//       "description": "Optional source for this scope."<br class="">+//     },<br class="">+//     "line": {<br class="">+//       "type": "integer",<br class="">+//       "description": "Optional start line of the range covered by this<br class="">+//                       scope."<br class="">+//     },<br class="">+//     "column": {<br class="">+//       "type": "integer",<br class="">+//       "description": "Optional start column of the range covered by this<br class="">+//                       scope."<br class="">+//     },<br class="">+//     "endLine": {<br class="">+//       "type": "integer",<br class="">+//       "description": "Optional end line of the range covered by this scope."<br class="">+//     },<br class="">+//     "endColumn": {<br class="">+//       "type": "integer",<br class="">+//       "description": "Optional end column of the range covered by this<br class="">+//                       scope."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "name", "variablesReference", "expensive" ]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Value CreateScope(const llvm::StringRef name,<br class="">+                              int64_t variablesReference,<br class="">+                              int64_t namedVariables, bool expensive) {<br class="">+  llvm::json::Object object;<br class="">+  object.try_emplace("name", name.str());<br class="">+  object.try_emplace("variablesReference", variablesReference);<br class="">+  object.try_emplace("expensive", expensive);<br class="">+  object.try_emplace("namedVariables", namedVariables);<br class="">+  return llvm::json::Value(std::move(object));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "Breakpoint": {<br class="">+//   "type": "object",<br class="">+//   "description": "Information about a Breakpoint created in setBreakpoints<br class="">+//                   or setFunctionBreakpoints.",<br class="">+//   "properties": {<br class="">+//     "id": {<br class="">+//       "type": "integer",<br class="">+//       "description": "An optional unique identifier for the breakpoint."<br class="">+//     },<br class="">+//     "verified": {<br class="">+//       "type": "boolean",<br class="">+//       "description": "If true breakpoint could be set (but not necessarily<br class="">+//                       at the desired location)."<br class="">+//     },<br class="">+//     "message": {<br class="">+//       "type": "string",<br class="">+//       "description": "An optional message about the state of the breakpoint.<br class="">+//                       This is shown to the user and can be used to explain<br class="">+//                       why a breakpoint could not be verified."<br class="">+//     },<br class="">+//     "source": {<br class="">+//       "$ref": "#/definitions/Source",<br class="">+//       "description": "The source where the breakpoint is located."<br class="">+//     },<br class="">+//     "line": {<br class="">+//       "type": "integer",<br class="">+//       "description": "The start line of the actual range covered by the<br class="">+//                       breakpoint."<br class="">+//     },<br class="">+//     "column": {<br class="">+//       "type": "integer",<br class="">+//       "description": "An optional start column of the actual range covered<br class="">+//                       by the breakpoint."<br class="">+//     },<br class="">+//     "endLine": {<br class="">+//       "type": "integer",<br class="">+//       "description": "An optional end line of the actual range covered by<br class="">+//                       the breakpoint."<br class="">+//     },<br class="">+//     "endColumn": {<br class="">+//       "type": "integer",<br class="">+//       "description": "An optional end column of the actual range covered by<br class="">+//                       the breakpoint. If no end line is given, then the end<br class="">+//                       column is assumed to be in the start line."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "verified" ]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Value CreateBreakpoint(lldb::SBBreakpointLocation &bp_loc) {<br class="">+  // Each breakpoint location is treated as a separate breakpoint for VS code.<br class="">+  // They don't have the notion of a single breakpoint with multiple locations.<br class="">+  llvm::json::Object object;<br class="">+  if (!bp_loc.IsValid())<br class="">+    return llvm::json::Value(std::move(object));<br class="">+<br class="">+  object.try_emplace("verified", true);<br class="">+  const auto bp_id = bp_loc.GetBreakpoint().GetID();<br class="">+  const auto vs_id = (int64_t)(((int64_t)bp_id << 32) | bp_loc.GetID());<br class="">+  object.try_emplace("id", vs_id);<br class="">+  auto bp_addr = bp_loc.GetAddress();<br class="">+  if (bp_addr.IsValid()) {<br class="">+    auto line_entry = bp_addr.GetLineEntry();<br class="">+    const auto line = line_entry.GetLine();<br class="">+    if (line != UINT32_MAX)<br class="">+      object.try_emplace("line", line);<br class="">+    object.try_emplace("source", CreateSource(line_entry));<br class="">+  }<br class="">+  return llvm::json::Value(std::move(object));<br class="">+}<br class="">+<br class="">+void AppendBreakpoint(lldb::SBBreakpoint &bp, llvm::json::Array &breakpoints) {<br class="">+  if (!bp.IsValid())<br class="">+    return;<br class="">+  const auto num_locations = bp.GetNumLocations();<br class="">+  if (num_locations == 0)<br class="">+    return;<br class="">+  for (size_t i = 0; i < num_locations; ++i) {<br class="">+    auto bp_loc = bp.GetLocationAtIndex(i);<br class="">+    breakpoints.emplace_back(CreateBreakpoint(bp_loc));<br class="">+  }<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "Event": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Server-initiated event.",<br class="">+//     "properties": {<br class="">+//       "type": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "event" ]<br class="">+//       },<br class="">+//       "event": {<br class="">+//         "type": "string",<br class="">+//         "description": "Type of event."<br class="">+//       },<br class="">+//       "body": {<br class="">+//         "type": [ "array", "boolean", "integer", "null", "number" ,<br class="">+//                   "object", "string" ],<br class="">+//         "description": "Event-specific information."<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "type", "event" ]<br class="">+//   }]<br class="">+// },<br class="">+// "ProtocolMessage": {<br class="">+//   "type": "object",<br class="">+//   "description": "Base class of requests, responses, and events.",<br class="">+//   "properties": {<br class="">+//         "seq": {<br class="">+//           "type": "integer",<br class="">+//           "description": "Sequence number."<br class="">+//         },<br class="">+//         "type": {<br class="">+//           "type": "string",<br class="">+//           "description": "Message type.",<br class="">+//           "_enum": [ "request", "response", "event" ]<br class="">+//         }<br class="">+//   },<br class="">+//   "required": [ "seq", "type" ]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Object CreateEvent(const llvm::StringRef event_name) {<br class="">+  llvm::json::Object event;<br class="">+  event.try_emplace("seq", 0);<br class="">+  event.try_emplace("type", "event");<br class="">+  event.try_emplace("event", event_name);<br class="">+  return event;<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "ExceptionBreakpointsFilter": {<br class="">+//   "type": "object",<br class="">+//   "description": "An ExceptionBreakpointsFilter is shown in the UI as an<br class="">+//                   option for configuring how exceptions are dealt with.",<br class="">+//   "properties": {<br class="">+//     "filter": {<br class="">+//       "type": "string",<br class="">+//       "description": "The internal ID of the filter. This value is passed<br class="">+//                       to the setExceptionBreakpoints request."<br class="">+//     },<br class="">+//     "label": {<br class="">+//       "type": "string",<br class="">+//       "description": "The name of the filter. This will be shown in the UI."<br class="">+//     },<br class="">+//     "default": {<br class="">+//       "type": "boolean",<br class="">+//       "description": "Initial value of the filter. If not specified a value<br class="">+//                       'false' is assumed."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "filter", "label" ]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Value<br class="">+CreateExceptionBreakpointFilter(const ExceptionBreakpoint &bp) {<br class="">+  llvm::json::Object object;<br class="">+  object.try_emplace("filter", bp.filter);<br class="">+  object.try_emplace("label", bp.label);<br class="">+  object.try_emplace("default", bp.default_value);<br class="">+  return llvm::json::Value(std::move(object));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "Source": {<br class="">+//   "type": "object",<br class="">+//   "description": "A Source is a descriptor for source code. It is returned<br class="">+//                   from the debug adapter as part of a StackFrame and it is<br class="">+//                   used by clients when specifying breakpoints.",<br class="">+//   "properties": {<br class="">+//     "name": {<br class="">+//       "type": "string",<br class="">+//       "description": "The short name of the source. Every source returned<br class="">+//                       from the debug adapter has a name. When sending a<br class="">+//                       source to the debug adapter this name is optional."<br class="">+//     },<br class="">+//     "path": {<br class="">+//       "type": "string",<br class="">+//       "description": "The path of the source to be shown in the UI. It is<br class="">+//                       only used to locate and load the content of the<br class="">+//                       source if no sourceReference is specified (or its<br class="">+//                       value is 0)."<br class="">+//     },<br class="">+//     "sourceReference": {<br class="">+//       "type": "number",<br class="">+//       "description": "If sourceReference > 0 the contents of the source must<br class="">+//                       be retrieved through the SourceRequest (even if a path<br class="">+//                       is specified). A sourceReference is only valid for a<br class="">+//                       session, so it must not be used to persist a source."<br class="">+//     },<br class="">+//     "presentationHint": {<br class="">+//       "type": "string",<br class="">+//       "description": "An optional hint for how to present the source in the<br class="">+//                       UI. A value of 'deemphasize' can be used to indicate<br class="">+//                       that the source is not available or that it is<br class="">+//                       skipped on stepping.",<br class="">+//       "enum": [ "normal", "emphasize", "deemphasize" ]<br class="">+//     },<br class="">+//     "origin": {<br class="">+//       "type": "string",<br class="">+//       "description": "The (optional) origin of this source: possible values<br class="">+//                       'internal module', 'inlined content from source map',<br class="">+//                       etc."<br class="">+//     },<br class="">+//     "sources": {<br class="">+//       "type": "array",<br class="">+//       "items": {<br class="">+//         "$ref": "#/definitions/Source"<br class="">+//       },<br class="">+//       "description": "An optional list of sources that are related to this<br class="">+//                       source. These may be the source that generated this<br class="">+//                       source."<br class="">+//     },<br class="">+//     "adapterData": {<br class="">+//       "type":["array","boolean","integer","null","number","object","string"],<br class="">+//       "description": "Optional data that a debug adapter might want to loop<br class="">+//                       through the client. The client should leave the data<br class="">+//                       intact and persist it across sessions. The client<br class="">+//                       should not interpret the data."<br class="">+//     },<br class="">+//     "checksums": {<br class="">+//       "type": "array",<br class="">+//       "items": {<br class="">+//         "$ref": "#/definitions/Checksum"<br class="">+//       },<br class="">+//       "description": "The checksums associated with this file."<br class="">+//     }<br class="">+//   }<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Value CreateSource(lldb::SBLineEntry &line_entry) {<br class="">+  llvm::json::Object object;<br class="">+  lldb::SBFileSpec file = line_entry.GetFileSpec();<br class="">+  if (file.IsValid()) {<br class="">+    const char *name = file.GetFilename();<br class="">+    if (name)<br class="">+      object.try_emplace("name", name);<br class="">+    char path[PATH_MAX] = "";<br class="">+    file.GetPath(path, sizeof(path));<br class="">+    if (path[0]) {<br class="">+      object.try_emplace("path", std::string(path));<br class="">+    }<br class="">+  }<br class="">+  return llvm::json::Value(std::move(object));<br class="">+}<br class="">+<br class="">+llvm::json::Value CreateSource(lldb::SBFrame &frame, int64_t &disasm_line) {<br class="">+  disasm_line = 0;<br class="">+  auto line_entry = frame.GetLineEntry();<br class="">+  if (line_entry.GetFileSpec().IsValid())<br class="">+    return CreateSource(line_entry);<br class="">+<br class="">+  llvm::json::Object object;<br class="">+  const auto pc = frame.GetPC();<br class="">+<br class="">+  lldb::SBInstructionList insts;<br class="">+  lldb::SBFunction function = frame.GetFunction();<br class="">+  lldb::addr_t low_pc = LLDB_INVALID_ADDRESS;<br class="">+  if (function.IsValid()) {<br class="">+    low_pc = function.GetStartAddress().GetLoadAddress(g_vsc.target);<br class="">+    auto addr_srcref = g_vsc.addr_to_source_ref.find(low_pc);<br class="">+    if (addr_srcref != g_vsc.addr_to_source_ref.end()) {<br class="">+      // We have this disassembly cached already, return the existing<br class="">+      // sourceReference<br class="">+      object.try_emplace("sourceReference", addr_srcref->second);<br class="">+      disasm_line = g_vsc.GetLineForPC(addr_srcref->second, pc);<br class="">+    } else {<br class="">+      insts = function.GetInstructions(g_vsc.target);<br class="">+    }<br class="">+  } else {<br class="">+    lldb::SBSymbol symbol = frame.GetSymbol();<br class="">+    if (symbol.IsValid()) {<br class="">+      low_pc = symbol.GetStartAddress().GetLoadAddress(g_vsc.target);<br class="">+      auto addr_srcref = g_vsc.addr_to_source_ref.find(low_pc);<br class="">+      if (addr_srcref != g_vsc.addr_to_source_ref.end()) {<br class="">+        // We have this disassembly cached already, return the existing<br class="">+        // sourceReference<br class="">+        object.try_emplace("sourceReference", addr_srcref->second);<br class="">+        disasm_line = g_vsc.GetLineForPC(addr_srcref->second, pc);<br class="">+      } else {<br class="">+        insts = symbol.GetInstructions(g_vsc.target);<br class="">+      }<br class="">+    }<br class="">+  }<br class="">+  const auto num_insts = insts.GetSize();<br class="">+  if (low_pc != LLDB_INVALID_ADDRESS && num_insts > 0) {<br class="">+    object.try_emplace("name", frame.GetFunctionName());<br class="">+    SourceReference source;<br class="">+    llvm::raw_string_ostream src_strm(source.content);<br class="">+    std::string line;<br class="">+    for (size_t i = 0; i < num_insts; ++i) {<br class="">+      lldb::SBInstruction inst = insts.GetInstructionAtIndex(i);<br class="">+      const auto inst_addr = inst.GetAddress().GetLoadAddress(g_vsc.target);<br class="">+      const char *m = inst.GetMnemonic(g_vsc.target);<br class="">+      const char *o = inst.GetOperands(g_vsc.target);<br class="">+      const char *c = inst.GetComment(g_vsc.target);<br class="">+      if (pc == inst_addr)<br class="">+        disasm_line = i + 1;<br class="">+      const auto inst_offset = inst_addr - low_pc;<br class="">+      int spaces = 0;<br class="">+      if (inst_offset < 10)<br class="">+        spaces = 3;<br class="">+      else if (inst_offset < 100)<br class="">+        spaces = 2;<br class="">+      else if (inst_offset < 1000)<br class="">+        spaces = 1;<br class="">+      line.clear();<br class="">+      llvm::raw_string_ostream line_strm(line);<br class="">+      line_strm << llvm::formatv("{0:X+}: <{1}> {2} {3,12} {4}", inst_addr,<br class="">+                                 inst_offset, llvm::fmt_repeat(' ', spaces),<br class="">+                                 m, o);<br class="">+      const uint32_t comment_row = 60;<br class="">+      // If there is a comment append it starting at column 60<br class="">+      if (c && c[0]) {<br class="">+        if (line.size() < comment_row)<br class="">+          line_strm.indent(comment_row - line_strm.str().size());<br class="">+        line_strm << " # " << c;<br class="">+      }<br class="">+      src_strm << line_strm.str() << "\n";<br class="">+      source.addr_to_line[inst_addr] = i + 1;<br class="">+    }<br class="">+    // Flush the source stream<br class="">+    src_strm.str();<br class="">+    auto sourceReference = VSCode::GetNextSourceReference();<br class="">+    g_vsc.source_map[sourceReference] = std::move(source);<br class="">+    g_vsc.addr_to_source_ref[low_pc] = sourceReference;<br class="">+    object.try_emplace("sourceReference", sourceReference);<br class="">+  }<br class="">+  return llvm::json::Value(std::move(object));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "StackFrame": {<br class="">+//   "type": "object",<br class="">+//   "description": "A Stackframe contains the source location.",<br class="">+//   "properties": {<br class="">+//     "id": {<br class="">+//       "type": "integer",<br class="">+//       "description": "An identifier for the stack frame. It must be unique<br class="">+//                       across all threads. This id can be used to retrieve<br class="">+//                       the scopes of the frame with the 'scopesRequest' or<br class="">+//                       to restart the execution of a stackframe."<br class="">+//     },<br class="">+//     "name": {<br class="">+//       "type": "string",<br class="">+//       "description": "The name of the stack frame, typically a method name."<br class="">+//     },<br class="">+//     "source": {<br class="">+//       "$ref": "#/definitions/Source",<br class="">+//       "description": "The optional source of the frame."<br class="">+//     },<br class="">+//     "line": {<br class="">+//       "type": "integer",<br class="">+//       "description": "The line within the file of the frame. If source is<br class="">+//                       null or doesn't exist, line is 0 and must be ignored."<br class="">+//     },<br class="">+//     "column": {<br class="">+//       "type": "integer",<br class="">+//       "description": "The column within the line. If source is null or<br class="">+//                       doesn't exist, column is 0 and must be ignored."<br class="">+//     },<br class="">+//     "endLine": {<br class="">+//       "type": "integer",<br class="">+//       "description": "An optional end line of the range covered by the<br class="">+//                       stack frame."<br class="">+//     },<br class="">+//     "endColumn": {<br class="">+//       "type": "integer",<br class="">+//       "description": "An optional end column of the range covered by the<br class="">+//                       stack frame."<br class="">+//     },<br class="">+//     "moduleId": {<br class="">+//       "type": ["integer", "string"],<br class="">+//       "description": "The module associated with this frame, if any."<br class="">+//     },<br class="">+//     "presentationHint": {<br class="">+//       "type": "string",<br class="">+//       "enum": [ "normal", "label", "subtle" ],<br class="">+//       "description": "An optional hint for how to present this frame in<br class="">+//                       the UI. A value of 'label' can be used to indicate<br class="">+//                       that the frame is an artificial frame that is used<br class="">+//                       as a visual label or separator. A value of 'subtle'<br class="">+//                       can be used to change the appearance of a frame in<br class="">+//                       a 'subtle' way."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "id", "name", "line", "column" ]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Value CreateStackFrame(lldb::SBFrame &frame) {<br class="">+  llvm::json::Object object;<br class="">+  int64_t frame_id = MakeVSCodeFrameID(frame);<br class="">+  object.try_emplace("id", frame_id);<br class="">+  object.try_emplace("name", frame.GetFunctionName());<br class="">+  int64_t disasm_line = 0;<br class="">+  object.try_emplace("source", CreateSource(frame, disasm_line));<br class="">+<br class="">+  auto line_entry = frame.GetLineEntry();<br class="">+  if (disasm_line > 0) {<br class="">+    object.try_emplace("line", disasm_line);<br class="">+  } else {<br class="">+    auto line = line_entry.GetLine();<br class="">+    if (line == UINT32_MAX)<br class="">+      line = 0;<br class="">+    object.try_emplace("line", line);<br class="">+  }<br class="">+  object.try_emplace("column", line_entry.GetColumn());<br class="">+  return llvm::json::Value(std::move(object));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "Thread": {<br class="">+//   "type": "object",<br class="">+//   "description": "A Thread",<br class="">+//   "properties": {<br class="">+//     "id": {<br class="">+//       "type": "integer",<br class="">+//       "description": "Unique identifier for the thread."<br class="">+//     },<br class="">+//     "name": {<br class="">+//       "type": "string",<br class="">+//       "description": "A name of the thread."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "id", "name" ]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Value CreateThread(lldb::SBThread &thread) {<br class="">+  llvm::json::Object object;<br class="">+  object.try_emplace("id", (int64_t)thread.GetThreadID());<br class="">+  char thread_str[64];<br class="">+  snprintf(thread_str, sizeof(thread_str), "Thread #%u", thread.GetIndexID());<br class="">+  const char *name = thread.GetName();<br class="">+  if (name) {<br class="">+    std::string thread_with_name(thread_str);<br class="">+    thread_with_name += ' ';<br class="">+    thread_with_name += name;<br class="">+    object.try_emplace("name", thread_with_name);<br class="">+  } else {<br class="">+    object.try_emplace("name", std::string(thread_str));<br class="">+  }<br class="">+  return llvm::json::Value(std::move(object));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "StoppedEvent": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Event" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Event message for 'stopped' event type. The event<br class="">+//                     indicates that the execution of the debuggee has stopped<br class="">+//                     due to some condition. This can be caused by a break<br class="">+//                     point previously set, a stepping action has completed,<br class="">+//                     by executing a debugger statement etc.",<br class="">+//     "properties": {<br class="">+//       "event": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "stopped" ]<br class="">+//       },<br class="">+//       "body": {<br class="">+//         "type": "object",<br class="">+//         "properties": {<br class="">+//           "reason": {<br class="">+//             "type": "string",<br class="">+//             "description": "The reason for the event. For backward<br class="">+//                             compatibility this string is shown in the UI if<br class="">+//                             the 'description' attribute is missing (but it<br class="">+//                             must not be translated).",<br class="">+//             "_enum": [ "step", "breakpoint", "exception", "pause", "entry" ]<br class="">+//           },<br class="">+//           "description": {<br class="">+//             "type": "string",<br class="">+//             "description": "The full reason for the event, e.g. 'Paused<br class="">+//                             on exception'. This string is shown in the UI<br class="">+//                             as is."<br class="">+//           },<br class="">+//           "threadId": {<br class="">+//             "type": "integer",<br class="">+//             "description": "The thread which was stopped."<br class="">+//           },<br class="">+//           "text": {<br class="">+//             "type": "string",<br class="">+//             "description": "Additional information. E.g. if reason is<br class="">+//                             'exception', text contains the exception name.<br class="">+//                             This string is shown in the UI."<br class="">+//           },<br class="">+//           "allThreadsStopped": {<br class="">+//             "type": "boolean",<br class="">+//             "description": "If allThreadsStopped is true, a debug adapter<br class="">+//                             can announce that all threads have stopped.<br class="">+//                             The client should use this information to<br class="">+//                             enable that all threads can be expanded to<br class="">+//                             access their stacktraces. If the attribute<br class="">+//                             is missing or false, only the thread with the<br class="">+//                             given threadId can be expanded."<br class="">+//           }<br class="">+//         },<br class="">+//         "required": [ "reason" ]<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "event", "body" ]<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Value CreateThreadStopped(lldb::SBThread &thread,<br class="">+                                      uint32_t stop_id) {<br class="">+  llvm::json::Object event(CreateEvent("stopped"));<br class="">+  llvm::json::Object body;<br class="">+  switch (thread.GetStopReason()) {<br class="">+  case lldb::eStopReasonTrace:<br class="">+  case lldb::eStopReasonPlanComplete:<br class="">+    body.try_emplace("reason", "step");<br class="">+    break;<br class="">+  case lldb::eStopReasonBreakpoint: {<br class="">+    ExceptionBreakpoint *exc_bp = g_vsc.GetExceptionBPFromStopReason(thread);<br class="">+    if (exc_bp) {<br class="">+      body.try_emplace("reason", "exception");<br class="">+      body.try_emplace("description", exc_bp->label);<br class="">+    } else {<br class="">+      body.try_emplace("reason", "breakpoint");<br class="">+    }<br class="">+  } break;<br class="">+  case lldb::eStopReasonWatchpoint:<br class="">+  case lldb::eStopReasonInstrumentation:<br class="">+    body.try_emplace("reason", "breakpoint");<br class="">+    break;<br class="">+  case lldb::eStopReasonSignal:<br class="">+    body.try_emplace("reason", "exception");<br class="">+    break;<br class="">+  case lldb::eStopReasonException:<br class="">+    body.try_emplace("reason", "exception");<br class="">+    break;<br class="">+  case lldb::eStopReasonExec:<br class="">+    body.try_emplace("reason", "entry");<br class="">+    break;<br class="">+  case lldb::eStopReasonThreadExiting:<br class="">+  case lldb::eStopReasonInvalid:<br class="">+  case lldb::eStopReasonNone:<br class="">+    break;<br class="">+  }<br class="">+  if (stop_id == 0)<br class="">+    body.try_emplace("reason", "entry");<br class="">+  const lldb::tid_t tid = thread.GetThreadID();<br class="">+  body.try_emplace("threadId", (int64_t)tid);<br class="">+  // If no description has been set, then set it to the default thread stopped<br class="">+  // description. If we have breakpoints that get hit and shouldn't be reported<br class="">+  // as breakpoints, then they will set the description above.<br class="">+  if (ObjectContainsKey(body, "description")) {<br class="">+    char description[1024];<br class="">+    if (thread.GetStopDescription(description, sizeof(description))) {<br class="">+      body.try_emplace("description", std::string(description));<br class="">+    }<br class="">+  }<br class="">+  if (tid == g_vsc.focus_tid) {<br class="">+    body.try_emplace("threadCausedFocus", true);<br class="">+  }<br class="">+  body.try_emplace("preserveFocusHint", tid != g_vsc.focus_tid);<br class="">+  body.try_emplace("allThreadsStopped", true);<br class="">+  event.try_emplace("body", std::move(body));<br class="">+  return llvm::json::Value(std::move(event));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "Variable": {<br class="">+//   "type": "object",<br class="">+//   "description": "A Variable is a name/value pair. Optionally a variable<br class="">+//                   can have a 'type' that is shown if space permits or when<br class="">+//                   hovering over the variable's name. An optional 'kind' is<br class="">+//                   used to render additional properties of the variable,<br class="">+//                   e.g. different icons can be used to indicate that a<br class="">+//                   variable is public or private. If the value is<br class="">+//                   structured (has children), a handle is provided to<br class="">+//                   retrieve the children with the VariablesRequest. If<br class="">+//                   the number of named or indexed children is large, the<br class="">+//                   numbers should be returned via the optional<br class="">+//                   'namedVariables' and 'indexedVariables' attributes. The<br class="">+//                   client can use this optional information to present the<br class="">+//                   children in a paged UI and fetch them in chunks.",<br class="">+//   "properties": {<br class="">+//     "name": {<br class="">+//       "type": "string",<br class="">+//       "description": "The variable's name."<br class="">+//     },<br class="">+//     "value": {<br class="">+//       "type": "string",<br class="">+//       "description": "The variable's value. This can be a multi-line text,<br class="">+//                       e.g. for a function the body of a function."<br class="">+//     },<br class="">+//     "type": {<br class="">+//       "type": "string",<br class="">+//       "description": "The type of the variable's value. Typically shown in<br class="">+//                       the UI when hovering over the value."<br class="">+//     },<br class="">+//     "presentationHint": {<br class="">+//       "$ref": "#/definitions/VariablePresentationHint",<br class="">+//       "description": "Properties of a variable that can be used to determine<br class="">+//                       how to render the variable in the UI."<br class="">+//     },<br class="">+//     "evaluateName": {<br class="">+//       "type": "string",<br class="">+//       "description": "Optional evaluatable name of this variable which can<br class="">+//                       be passed to the 'EvaluateRequest' to fetch the<br class="">+//                       variable's value."<br class="">+//     },<br class="">+//     "variablesReference": {<br class="">+//       "type": "integer",<br class="">+//       "description": "If variablesReference is > 0, the variable is<br class="">+//                       structured and its children can be retrieved by<br class="">+//                       passing variablesReference to the VariablesRequest."<br class="">+//     },<br class="">+//     "namedVariables": {<br class="">+//       "type": "integer",<br class="">+//       "description": "The number of named child variables. The client can<br class="">+//                       use this optional information to present the children<br class="">+//                       in a paged UI and fetch them in chunks."<br class="">+//     },<br class="">+//     "indexedVariables": {<br class="">+//       "type": "integer",<br class="">+//       "description": "The number of indexed child variables. The client<br class="">+//                       can use this optional information to present the<br class="">+//                       children in a paged UI and fetch them in chunks."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "name", "value", "variablesReference" ]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Value CreateVariable(lldb::SBValue v, int64_t variablesReference,<br class="">+                                 int64_t varID, bool format_hex) {<br class="">+  llvm::json::Object object;<br class="">+  auto name = v.GetName();<br class="">+  object.try_emplace("name", name ? name : "<null>");<br class="">+  if (format_hex)<br class="">+    v.SetFormat(lldb::eFormatHex);<br class="">+  SetValueForKey(v, object, "value");<br class="">+  auto type_cstr = v.GetType().GetDisplayTypeName();<br class="">+  object.try_emplace("type", type_cstr ? type_cstr : NO_TYPENAME);<br class="">+  if (varID != INT64_MAX)<br class="">+    object.try_emplace("id", varID);<br class="">+  if (v.MightHaveChildren())<br class="">+    object.try_emplace("variablesReference", variablesReference);<br class="">+  else<br class="">+    object.try_emplace("variablesReference", (int64_t)0);<br class="">+  lldb::SBStream evaluateStream;<br class="">+  v.GetExpressionPath(evaluateStream);<br class="">+  const char *evaluateName = evaluateStream.GetData();<br class="">+  if (evaluateName && evaluateName[0])<br class="">+    object.try_emplace("evaluateName", std::string(evaluateName));<br class="">+  return llvm::json::Value(std::move(object));<br class="">+}<br class="">+<br class="">+} // namespace lldb_vscode<br class="">+<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/JSONUtils.h<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/JSONUtils.h?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/JSONUtils.h?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/JSONUtils.h (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/JSONUtils.h Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,421 @@<br class="">+//===-- JSONUtils.h ---------------------------------------------*- C++ -*-===//<br class="">+//<br class="">+//                     The LLVM Compiler Infrastructure<br class="">+//<br class="">+// This file is distributed under the University of Illinois Open Source<br class="">+// License. See LICENSE.TXT for details.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+<br class="">+#ifndef LLDBVSCODE_JSONUTILS_H_<br class="">+#define LLDBVSCODE_JSONUTILS_H_<br class="">+<br class="">+#include <stdint.h><br class="">+#include "llvm/ADT/StringRef.h"<br class="">+#include "llvm/Support/JSON.h"<br class="">+#include "VSCodeForward.h"<br class="">+<br class="">+namespace lldb_vscode {<br class="">+  <br class="">+//------------------------------------------------------------------<br class="">+/// Extract simple values as a string.<br class="">+///<br class="">+/// @param[in] value<br class="">+///     A JSON value to extract the string from.<br class="">+///<br class="">+/// @return<br class="">+///     A llvm::StringRef that contains the string value, or an empty<br class="">+///     string if \a value isn't a string.<br class="">+//------------------------------------------------------------------<br class="">+llvm::StringRef GetAsString(const llvm::json::Value &value);<br class="">+<br class="">+//------------------------------------------------------------------<br class="">+/// Extract the string value for the specified key from the<br class="">+/// specified object.<br class="">+///<br class="">+/// @param[in] obj<br class="">+///     A JSON object that we will attempt to extract the value from<br class="">+///<br class="">+/// @param[in] key<br class="">+///     The key to use when extracting the value<br class="">+///<br class="">+/// @return<br class="">+///     A llvm::StringRef that contains the string value for the<br class="">+///     specified \a key, or an empty string if there is no key that<br class="">+///     matches or if the value is not a string.<br class="">+//------------------------------------------------------------------<br class="">+llvm::StringRef GetString(const llvm::json::Object &obj, llvm::StringRef key);<br class="">+llvm::StringRef GetString(const llvm::json::Object *obj, llvm::StringRef key);<br class="">+<br class="">+//------------------------------------------------------------------<br class="">+/// Extract the unsigned integer value for the specified key from<br class="">+/// the specified object.<br class="">+///<br class="">+/// @param[in] obj<br class="">+///     A JSON object that we will attempt to extract the value from<br class="">+///<br class="">+/// @param[in] key<br class="">+///     The key to use when extracting the value<br class="">+///<br class="">+/// @return<br class="">+///     The unsigned integer value for the specified \a key, or<br class="">+///     \a fail_value  if there is no key that matches or if the<br class="">+///     value is not an integer.<br class="">+//------------------------------------------------------------------<br class="">+uint64_t GetUnsigned(const llvm::json::Object &obj, llvm::StringRef key,<br class="">+                     uint64_t fail_value);<br class="">+uint64_t GetUnsigned(const llvm::json::Object *obj, llvm::StringRef key,<br class="">+                     uint64_t fail_value);<br class="">+<br class="">+//------------------------------------------------------------------<br class="">+/// Extract the boolean value for the specified key from the<br class="">+/// specified object.<br class="">+///<br class="">+/// @param[in] obj<br class="">+///     A JSON object that we will attempt to extract the value from<br class="">+///<br class="">+/// @param[in] key<br class="">+///     The key to use when extracting the value<br class="">+///<br class="">+/// @return<br class="">+///     The boolean value for the specified \a key, or \a fail_value<br class="">+///     if there is no key that matches or if the value is not a<br class="">+///     boolean value of an integer.<br class="">+//------------------------------------------------------------------<br class="">+bool GetBoolean(const llvm::json::Object &obj, llvm::StringRef key,<br class="">+                bool fail_value);<br class="">+bool GetBoolean(const llvm::json::Object *obj, llvm::StringRef key,<br class="">+                bool fail_value);<br class="">+<br class="">+//------------------------------------------------------------------<br class="">+/// Extract the signed integer for the specified key from the<br class="">+/// specified object.<br class="">+///<br class="">+/// @param[in] obj<br class="">+///     A JSON object that we will attempt to extract the value from<br class="">+///<br class="">+/// @param[in] key<br class="">+///     The key to use when extracting the value<br class="">+///<br class="">+/// @return<br class="">+///     The signed integer value for the specified \a key, or<br class="">+///     \a fail_value if there is no key that matches or if the<br class="">+///     value is not an integer.<br class="">+//------------------------------------------------------------------<br class="">+int64_t GetSigned(const llvm::json::Object &obj, llvm::StringRef key,<br class="">+                  int64_t fail_value);<br class="">+int64_t GetSigned(const llvm::json::Object *obj, llvm::StringRef key,<br class="">+                  int64_t fail_value);<br class="">+<br class="">+//------------------------------------------------------------------<br class="">+/// Check if the specified key exists in the specified object.<br class="">+///<br class="">+/// @param[in] obj<br class="">+///     A JSON object that we will attempt to extract the value from<br class="">+///<br class="">+/// @param[in] key<br class="">+///     The key to check for<br class="">+///<br class="">+/// @return<br class="">+///     \b True if the key exists in the \a obj, \b False otherwise.<br class="">+//------------------------------------------------------------------<br class="">+bool ObjectContainsKey(const llvm::json::Object &obj, llvm::StringRef key);<br class="">+<br class="">+//------------------------------------------------------------------<br class="">+/// Extract an array of strings for the specified key from an object.<br class="">+///<br class="">+/// String values in the array will be extracted without any quotes<br class="">+/// around them. Numbers and Booleans will be converted into<br class="">+/// strings. Any NULL, array or objects values in the array will be<br class="">+/// ignored.<br class="">+///<br class="">+/// @param[in] obj<br class="">+///     A JSON object that we will attempt to extract the array from<br class="">+///<br class="">+/// @param[in] key<br class="">+///     The key to use when extracting the value<br class="">+///<br class="">+/// @return<br class="">+///     An array of string values for the specified \a key, or<br class="">+///     \a fail_value if there is no key that matches or if the<br class="">+///     value is not an array or all items in the array are not<br class="">+///     strings, numbers or booleans.<br class="">+//------------------------------------------------------------------<br class="">+std::vector<std::string> GetStrings(const llvm::json::Object *obj,<br class="">+                                    llvm::StringRef key);<br class="">+<br class="">+//------------------------------------------------------------------<br class="">+/// Fill a response object given the request object.<br class="">+///<br class="">+/// The \a response object will get its "type" set to "response",<br class="">+/// the "seq" set to zero, "response_seq" set to the "seq" value from<br class="">+/// \a request, "command" set to the "command" from \a request,<br class="">+/// and "success" set to true.<br class="">+///<br class="">+/// @param[in] request<br class="">+///     The request object received from a call to VSCode::ReadJSON().<br class="">+///<br class="">+/// @param[in,out] response<br class="">+///     An empty llvm::json::Object object that will be filled<br class="">+///     in as noted in description.<br class="">+//------------------------------------------------------------------<br class="">+void FillResponse(const llvm::json::Object &request,<br class="">+                  llvm::json::Object &response);<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+/// Emplace the string value from an SBValue into the supplied object<br class="">+/// using \a key as the key that will contain the value.<br class="">+///<br class="">+/// The value is what we will display in VS Code. Some SBValue objects<br class="">+/// can have a value and/or a summary. If a value has both, we<br class="">+/// combine the value and the summary into one string. If we only have a<br class="">+/// value or summary, then that is considered the value. If there is<br class="">+/// no value and no summary then the value is the type name followed by<br class="">+/// the address of the type if it has an address.<br class="">+///<br class="">+///<br class="">+/// @param[in] v<br class="">+///     A lldb::SBValue object to extract the string value from<br class="">+///<br class="">+///<br class="">+/// @param[in] object<br class="">+///     The object to place the value object into<br class="">+///<br class="">+///<br class="">+/// @param[in] key<br class="">+///     The key name to use when inserting the value object we create<br class="">+//----------------------------------------------------------------------<br class="">+void SetValueForKey(lldb::SBValue &v, llvm::json::Object &object,<br class="">+                    llvm::StringRef key);<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+/// Converts \a bp to a JSON value and appends all locations to the<br class="">+/// \a breakpoints array.<br class="">+///<br class="">+/// @param[in] bp<br class="">+///     A LLDB breakpoint object which will get all locations extracted<br class="">+///     and converted into a JSON objects in the \a breakpoints array<br class="">+///<br class="">+/// @param[in] breakpoints<br class="">+///     A JSON array that will get a llvm::json::Value for \a bp<br class="">+///     appended to it.<br class="">+//----------------------------------------------------------------------<br class="">+void AppendBreakpoint(lldb::SBBreakpoint &bp, llvm::json::Array &breakpoints);<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+/// Converts breakpoint location to a Visual Studio Code "Breakpoint"<br class="">+/// JSON object and appends it to the \a breakpoints array.<br class="">+///<br class="">+/// @param[in] bp_loc<br class="">+///     A LLDB breakpoint location object to convert into a JSON value<br class="">+///<br class="">+/// @return<br class="">+///     A "Breakpoint" JSON object with that follows the formal JSON<br class="">+///     definition outlined by Microsoft.<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Value CreateBreakpoint(lldb::SBBreakpointLocation &bp_loc);<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+/// Create a "Event" JSON object using \a event_name as the event name<br class="">+///<br class="">+/// @param[in] event_name<br class="">+///     The string value to use for the "event" key in the JSON object.<br class="">+///<br class="">+/// @return<br class="">+///     A "Event" JSON object with that follows the formal JSON<br class="">+///     definition outlined by Microsoft.<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Object CreateEvent(const llvm::StringRef event_name);<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+/// Create a "ExceptionBreakpointsFilter" JSON object as described in<br class="">+/// the Visual Studio Code debug adaptor definition.<br class="">+///<br class="">+/// @param[in] bp<br class="">+///     The exception breakppoint object to use<br class="">+///<br class="">+/// @return<br class="">+///     A "ExceptionBreakpointsFilter" JSON object with that follows<br class="">+///     the formal JSON definition outlined by Microsoft.<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Value<br class="">+CreateExceptionBreakpointFilter(const ExceptionBreakpoint &bp);<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+/// Create a "Scope" JSON object as described in the Visual Studio Code<br class="">+/// debug adaptor definition.<br class="">+///<br class="">+/// @param[in] name<br class="">+///     The value to place into the "name" key<br class="">+//<br class="">+/// @param[in] variablesReference<br class="">+///     The value to place into the "variablesReference" key<br class="">+//<br class="">+/// @param[in] namedVariables<br class="">+///     The value to place into the "namedVariables" key<br class="">+//<br class="">+/// @param[in] expensive<br class="">+///     The value to place into the "expensive" key<br class="">+///<br class="">+/// @return<br class="">+///     A "Scope" JSON object with that follows the formal JSON<br class="">+///     definition outlined by Microsoft.<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Value CreateScope(const llvm::StringRef name,<br class="">+                              int64_t variablesReference,<br class="">+                              int64_t namedVariables, bool expensive);<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+/// Create a "Source" JSON object as described in the Visual Studio Code<br class="">+/// debug adaptor definition.<br class="">+///<br class="">+/// @param[in] line_entry<br class="">+///     The LLDB line table to use when populating out the "Source"<br class="">+///     object<br class="">+///<br class="">+/// @return<br class="">+///     A "Source" JSON object with that follows the formal JSON<br class="">+///     definition outlined by Microsoft.<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Value CreateSource(lldb::SBLineEntry &line_entry);<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+/// Create a "Source" object for a given frame.<br class="">+///<br class="">+/// When there is no source file information for a stack frame, we will<br class="">+/// create disassembly for a function and store a permanent<br class="">+/// "sourceReference" that contains the textual disassembly for a<br class="">+/// function along with address to line information. The "Source" object<br class="">+/// that is created will contain a "sourceReference" that the VSCode<br class="">+/// protocol can later fetch as text in order to display disassembly.<br class="">+/// The PC will be extracted from the frame and the disassembly line<br class="">+/// within the source referred to by "sourceReference" will be filled<br class="">+/// in.<br class="">+///<br class="">+/// @param[in] frame<br class="">+///     The LLDB stack frame to use when populating out the "Source"<br class="">+///     object.<br class="">+///<br class="">+/// @param[out] disasm_line<br class="">+///     The line within the "sourceReference" file that the PC from<br class="">+///     \a frame matches.<br class="">+///<br class="">+/// @return<br class="">+///     A "Source" JSON object with that follows the formal JSON<br class="">+///     definition outlined by Microsoft.<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Value CreateSource(lldb::SBFrame &frame, int64_t &disasm_line);<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+/// Create a "StackFrame" object for a LLDB frame object.<br class="">+///<br class="">+/// This function will fill in the following keys in the returned<br class="">+/// object:<br class="">+///   "id" - the stack frame ID as an integer<br class="">+///   "name" - the function name as a string<br class="">+///   "source" - source file information as a "Source" VSCode object<br class="">+///   "line" - the source file line number as an integer<br class="">+///   "column" - the source file column number as an integer<br class="">+///<br class="">+/// @param[in] frame<br class="">+///     The LLDB stack frame to use when populating out the "StackFrame"<br class="">+///     object.<br class="">+///<br class="">+/// @return<br class="">+///     A "StackFrame" JSON object with that follows the formal JSON<br class="">+///     definition outlined by Microsoft.<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Value CreateStackFrame(lldb::SBFrame &frame);<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+/// Create a "Thread" object for a LLDB thread object.<br class="">+///<br class="">+/// This function will fill in the following keys in the returned<br class="">+/// object:<br class="">+///   "id" - the thread ID as an integer<br class="">+///   "name" - the thread name as a string which combines the LLDB<br class="">+///            thread index ID along with the string name of the thread<br class="">+///            from the OS if it has a name.<br class="">+///<br class="">+/// @param[in] thread<br class="">+///     The LLDB thread to use when populating out the "Thread"<br class="">+///     object.<br class="">+///<br class="">+/// @return<br class="">+///     A "Thread" JSON object with that follows the formal JSON<br class="">+///     definition outlined by Microsoft.<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Value CreateThread(lldb::SBThread &thread);<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+/// Create a "StoppedEvent" object for a LLDB thread object.<br class="">+///<br class="">+/// This function will fill in the following keys in the returned<br class="">+/// object's "body" object:<br class="">+///   "reason" - With a valid stop reason enumeration string value<br class="">+///              that Microsoft specifies<br class="">+///   "threadId" - The thread ID as an integer<br class="">+///   "description" - a stop description (like "breakpoint 12.3") as a<br class="">+///                   string<br class="">+///   "preserveFocusHint" - a boolean value that states if this thread<br class="">+///                         should keep the focus in the GUI.<br class="">+///   "allThreadsStopped" - set to True to indicate that all threads<br class="">+///                         stop when any thread stops.<br class="">+///<br class="">+/// @param[in] thread<br class="">+///     The LLDB thread to use when populating out the "StoppedEvent"<br class="">+///     object.<br class="">+///<br class="">+/// @return<br class="">+///     A "StoppedEvent" JSON object with that follows the formal JSON<br class="">+///     definition outlined by Microsoft.<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Value CreateThreadStopped(lldb::SBThread &thread, uint32_t stop_id);<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+/// Create a "Variable" object for a LLDB thread object.<br class="">+///<br class="">+/// This function will fill in the following keys in the returned<br class="">+/// object:<br class="">+///   "name" - the name of the variable<br class="">+///   "value" - the value of the variable as a string<br class="">+///   "type" - the typename of the varaible as a string<br class="">+///   "id" - a unique identifier for a value in case there are multiple<br class="">+///          variables with the same name. Other parts of the VSCode<br class="">+///          protocol refer to values by name so this can help<br class="">+///          disambiguate such cases if a IDE passes this "id" value<br class="">+///          back down.<br class="">+///   "variablesReference" - Zero if the variable has no children,<br class="">+///          non-zero integer otherwise which can be used to expand<br class="">+///          the variable.<br class="">+///   "evaluateName" - The name of the variable to use in expressions<br class="">+///                    as a string.<br class="">+///<br class="">+/// @param[in] v<br class="">+///     The LLDB value to use when populating out the "Variable"<br class="">+///     object.<br class="">+///<br class="">+/// @param[in] variablesReference<br class="">+///     The variable reference. Zero if this value isn't structured<br class="">+///     and has no children, non-zero if it does have children and<br class="">+///     might be asked to expand itself.<br class="">+///<br class="">+/// @param[in] varID<br class="">+///     A unique variable indentifier to help in properly identifying<br class="">+///     variables with the same name. This is an extension to the<br class="">+///     VS protocol.<br class="">+///<br class="">+/// @param[in] format_hex<br class="">+///     It set to true the variable will be formatted as hex in<br class="">+///     the "value" key value pair for the value of the variable.<br class="">+///<br class="">+/// @return<br class="">+///     A "Variable" JSON object with that follows the formal JSON<br class="">+///     definition outlined by Microsoft.<br class="">+//----------------------------------------------------------------------<br class="">+llvm::json::Value CreateVariable(lldb::SBValue v, int64_t variablesReference,<br class="">+                                 int64_t varID, bool format_hex);<br class="">+<br class="">+} // namespace lldb_vscode<br class="">+<br class="">+#endif<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/LLDBUtils.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/LLDBUtils.cpp?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/LLDBUtils.cpp?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/LLDBUtils.cpp (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/LLDBUtils.cpp Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,73 @@<br class="">+//===-- LLDBUtils.cpp -------------------------------------------*- C++ -*-===//<br class="">+//<br class="">+//                     The LLVM Compiler Infrastructure<br class="">+//<br class="">+// This file is distributed under the University of Illinois Open Source<br class="">+// License. See LICENSE.TXT for details.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+<br class="">+#include "LLDBUtils.h"<br class="">+#include "VSCode.h"<br class="">+<br class="">+namespace lldb_vscode {<br class="">+<br class="">+void RunLLDBCommands(llvm::StringRef prefix,<br class="">+                     const llvm::ArrayRef<std::string> &commands,<br class="">+                     llvm::raw_ostream &strm) {<br class="">+  if (commands.empty())<br class="">+    return;<br class="">+  lldb::SBCommandInterpreter interp = g_vsc.debugger.GetCommandInterpreter();<br class="">+  if (!prefix.empty())<br class="">+    strm << prefix << "\n";<br class="">+  for (const auto &command : commands) {<br class="">+    lldb::SBCommandReturnObject result;<br class="">+    strm << "(lldb) " << command << "\n";<br class="">+    interp.HandleCommand(command.c_str(), result);<br class="">+    auto output_len = result.GetOutputSize();<br class="">+    if (output_len) {<br class="">+      const char *output = result.GetOutput();<br class="">+      strm << output;<br class="">+    }<br class="">+    auto error_len = result.GetErrorSize();<br class="">+    if (error_len) {<br class="">+      const char *error = result.GetError();<br class="">+      strm << error;<br class="">+    }<br class="">+  }<br class="">+}<br class="">+<br class="">+std::string RunLLDBCommands(llvm::StringRef prefix,<br class="">+                            const llvm::ArrayRef<std::string> &commands) {<br class="">+  std::string s;<br class="">+  llvm::raw_string_ostream strm(s);<br class="">+  RunLLDBCommands(prefix, commands, strm);<br class="">+  strm.flush();<br class="">+  return s;<br class="">+}<br class="">+<br class="">+bool ThreadHasStopReason(lldb::SBThread &thread) {<br class="">+  switch (thread.GetStopReason()) {<br class="">+  case lldb::eStopReasonTrace:<br class="">+  case lldb::eStopReasonPlanComplete:<br class="">+  case lldb::eStopReasonBreakpoint:<br class="">+  case lldb::eStopReasonWatchpoint:<br class="">+  case lldb::eStopReasonInstrumentation:<br class="">+  case lldb::eStopReasonSignal:<br class="">+  case lldb::eStopReasonException:<br class="">+  case lldb::eStopReasonExec:<br class="">+    return true;<br class="">+  case lldb::eStopReasonThreadExiting:<br class="">+  case lldb::eStopReasonInvalid:<br class="">+  case lldb::eStopReasonNone:<br class="">+    break;<br class="">+  }<br class="">+  return false;<br class="">+}<br class="">+<br class="">+int64_t MakeVSCodeFrameID(lldb::SBFrame &frame) {<br class="">+  return (int64_t)frame.GetThread().GetIndexID() << 32 |<br class="">+         (int64_t)frame.GetFrameID();<br class="">+}<br class="">+<br class="">+} // namespace lldb_vscode<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/LLDBUtils.h<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/LLDBUtils.h?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/LLDBUtils.h?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/LLDBUtils.h (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/LLDBUtils.h Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,94 @@<br class="">+//===-- LLDBUtils.h ---------------------------------------------*- C++ -*-===//<br class="">+//<br class="">+//                     The LLVM Compiler Infrastructure<br class="">+//<br class="">+// This file is distributed under the University of Illinois Open Source<br class="">+// License. See LICENSE.TXT for details.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+<br class="">+#ifndef LLDBVSCODE_LLDBUTILS_H_<br class="">+#define LLDBVSCODE_LLDBUTILS_H_<br class="">+<br class="">+#include "VSCodeForward.h"<br class="">+#include "llvm/ADT/ArrayRef.h"<br class="">+#include "llvm/ADT/StringRef.h"<br class="">+#include "llvm/Support/raw_ostream.h"<br class="">+#include <string><br class="">+#include <vector><br class="">+<br class="">+namespace lldb_vscode {<br class="">+<br class="">+///----------------------------------------------------------------------<br class="">+/// Run a list of LLDB commands in the LLDB command interpreter.<br class="">+///<br class="">+/// All output from every command, including the prompt + the command<br class="">+/// is placed into the "strm" argument.<br class="">+///<br class="">+/// @param[in] prefix<br class="">+///     A string that will be printed into \a strm prior to emitting<br class="">+///     the prmopt + command and command output. Can be NULL.<br class="">+///<br class="">+/// @param[in] commands<br class="">+///     An array of LLDB commands to execute.<br class="">+///<br class="">+/// @param[in] strm<br class="">+///     The stream that will receive the prefix, prompt + command and<br class="">+///     all command output.<br class="">+//----------------------------------------------------------------------<br class="">+void RunLLDBCommands(llvm::StringRef prefix,<br class="">+                     const llvm::ArrayRef<std::string> &commands,<br class="">+                     llvm::raw_ostream &strm);<br class="">+<br class="">+///----------------------------------------------------------------------<br class="">+/// Run a list of LLDB commands in the LLDB command interpreter.<br class="">+///<br class="">+/// All output from every command, including the prompt + the command<br class="">+/// is returned in the std::string return value.<br class="">+///<br class="">+/// @param[in] prefix<br class="">+///     A string that will be printed into \a strm prior to emitting<br class="">+///     the prmopt + command and command output. Can be NULL.<br class="">+///<br class="">+/// @param[in] commands<br class="">+///     An array of LLDB commands to execute.<br class="">+///<br class="">+/// @return<br class="">+///     A std::string that contains the prefix and all commands and<br class="">+///     command output<br class="">+//----------------------------------------------------------------------<br class="">+std::string RunLLDBCommands(llvm::StringRef prefix,<br class="">+                            const llvm::ArrayRef<std::string> &commands);<br class="">+<br class="">+///----------------------------------------------------------------------<br class="">+/// Check if a thread has a stop reason.<br class="">+///<br class="">+/// @param[in] thread<br class="">+///     The LLDB thread object to check<br class="">+///<br class="">+/// @return<br class="">+///     \b True if the thread has a valid stop reason, \b false<br class="">+///     otherwise.<br class="">+//----------------------------------------------------------------------<br class="">+bool ThreadHasStopReason(lldb::SBThread &thread);<br class="">+<br class="">+///----------------------------------------------------------------------<br class="">+/// Given a LLDB frame, make a frame ID that is unique to a specific<br class="">+/// thread and frame.<br class="">+///<br class="">+/// VSCode requires a Stackframe "id" to be unique, so we use the frame<br class="">+/// index in the lower 32 bits and the thread index ID in the upper 32<br class="">+/// bits.<br class="">+///<br class="">+/// @param[in] frame<br class="">+///     The LLDB stack frame object generate the ID for<br class="">+///<br class="">+/// @return<br class="">+///     A unique integer that allows us to easily find the right<br class="">+///     stack frame within a thread on subsequent VS code requests.<br class="">+//----------------------------------------------------------------------<br class="">+int64_t MakeVSCodeFrameID(lldb::SBFrame &frame);<br class="">+<br class="">+} // namespace lldb_vscode<br class="">+<br class="">+#endif<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/README.md<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/README.md?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/README.md?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/README.md (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/README.md Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,194 @@<br class="">+<br class="">+# Table of Contents<br class="">+<br class="">+- [Introduction](#Introduction)<br class="">+- [Intallation](#Intallation Visual Studio Code)<br class="">+- [Configurations](#configurations)<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span>- [Launch Configuration Settings](#launch configuration settings)<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span>- [Attach Configuration Settings](#attach configuration settings)<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span>- [Example configurations](#example configurations)<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>- [Launching](#launching)<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>- [Attach to process using process ID](#attach using pid)<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>- [Attach to process by name](#attach by name)<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>- [Loading a core file](#loading a core file)<br class="">+<br class="">+# Introduction<br class="">+<br class="">+The `lldb-vscode` tool creates a command line tool that implements the [Visual<br class="">+Studio Code Debug API](<a href="https://code.visualstudio.com/docs/extensionAPI/api-debugging" class="">https://code.visualstudio.com/docs/extensionAPI/api-debugging</a>).<br class="">+It can be installed as an extension for the Visual Studio Code and Nuclide IDE. <br class="">+The protocol is easy to run remotely and also can allow other tools and IDEs to<br class="">+get a full featured debugger with a well defined protocol. <br class="">+<br class="">+# Intallation for Visual Studio Code<br class="">+<br class="">+Installing the plug-in involves creating a directory in the `~/.vscode/extensions` folder and copying the package.json file that is in the same directory as this<br class="">+documentation into it, and copying to symlinking a lldb-vscode binary into <br class="">+the `bin` directory inside the plug-in directory.<br class="">+<br class="">+If you want to make a stand alone plug-in that you can send to others on unix systems:<br class="">+<br class="">+```<br class="">+$ mkdir -p ~/.vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin<br class="">+$ cp package.json ~/.vscode/extensions/llvm-org.lldb-vscode-0.1.0<br class="">+$ cd ~/.vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin<br class="">+$ cp /path/to/a/built/lldb-vscode .<br class="">+$ cp /path/to/a/built/liblldb.so .<br class="">+```<br class="">+<br class="">+<br class="">+If you want to make a stand alone plug-in that you can send to others on macOS systems:<br class="">+<br class="">+```<br class="">+$ mkdir -p ~/.vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin<br class="">+$ cp package.json ~/.vscode/extensions/llvm-org.lldb-vscode-0.1.0<br class="">+$ cd ~/.vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin<br class="">+$ cp /path/to/a/built/lldb-vscode .<br class="">+$ rsync -av /path/to/a/built/LLDB.framework LLDB.framework<br class="">+```<br class="">+<br class="">+You might need to create additional directories for the `liblldb.so` or `LLDB.framework` inside or next to the `bin` folder depending on how the [rpath](<a href="https://en.wikipedia.org/wiki/Rpath" class="">https://en.wikipedia.org/wiki/Rpath</a>) is set in your `lldb-vscode` binary. By default the `Debug` builds of LLDB usually includes<br class="">+the current executable directory in the rpath, so these steps should work for most people.<br class="">+<br class="">+To create a plug-in that symlinks into your `lldb-vscode` in your build directory:<br class="">+<br class="">+```<br class="">+$ mkdir -p ~/.vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin<br class="">+$ cp package.json ~/.vscode/extensions/llvm-org.lldb-vscode-0.1.0<br class="">+$ cd ~/.vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin<br class="">+$ ln -s /path/to/a/built/lldb-vscode<br class="">+```<br class="">+<br class="">+This is handy if you want to debug and develope the `lldb-vscode` executable when adding features or fixing bugs.<br class="">+<br class="">+# Configurations<br class="">+<br class="">+Launching to attaching require you to create a [launch configuration](<a href="https://code.visualstudio.com/Docs/editor/debugging#_launch-configurations" class="">https://code.visualstudio.com/Docs/editor/debugging#_launch-configurations</a>). This file<br class="">+defines arguments that get passed to `lldb-vscode` and the configuration settings<br class="">+control how the launch or attach happens.<br class="">+<br class="">+## Launch Configuration Settings<br class="">+<br class="">+When you launch a program with Visual Studio Code you will need to create a [launch.json](<a href="https://code.visualstudio.com/Docs/editor/debugging#_launch-configurations" class="">https://code.visualstudio.com/Docs/editor/debugging#_launch-configurations</a>)<br class="">+file that defines how your program will be run. The JSON configuration file can contain the following `lldb-vscode` specific launch key/value pairs:<br class="">+<br class="">+|parameter          |type|req |         |<br class="">+|-------------------|----|:--:|---------|<br class="">+|**name**           |string|Y| A configuration name that will be displayed in the IDE.<br class="">+|**type**           |string|Y| Must be "lldb-vscode".<br class="">+|**request**        |string|Y| Must be "launch".<br class="">+|**program**        |string|Y| Path to the executable to launch.<br class="">+|**args**           |[string]|| An array of command line argument strings to be passed to the program being launched.<br class="">+|**cwd**            |string| | The program working directory.<br class="">+|**env**            |dictionary| | Environment variables to set when launching the program. The format of each environment variable string is "VAR=VALUE" for environment variables with values or just "VAR" for environment variables with no values.<br class="">+|**stopOnEntry**    |boolean| | Whether to stop program immediately after launching.<br class="">+|**initCommands**   |[string]| | LLDB commands executed upon debugger startup prior to creating a the LLDB target. Commands and command output will be sent to the debugger console when they are executed.<br class="">+|**preRunCommands** |[string]| | LLDB commands executed just before launching after the LLDB target has been created. Commands and command output will be sent to the debugger console when they are executed.<br class="">+|**stopCommands**   |[string]| | LLDB commands executed just after each stop. Commands and command output will be sent to the debugger console when they are executed.<br class="">+|**exitCommands**   |[string]| | LLDB commands executed when the program exits. Commands and command output will be sent to the debugger console when they are executed.<br class="">+|**sourceMap**      |[string[2]]| | Specify an array of path re-mappings. Each element in the array must be a two element array containing a source and destination pathname.<br class="">+|**debuggerRoot**   | string| |Specify a working directory to use when launching lldb-vscode. If the debug information in your executable contains relative paths, this option can be used so that `lldb-vscode` can find source files and object files that have relative paths.<br class="">+<br class="">+## Attaching Settings<br class="">+<br class="">+When attaching to a process using LLDB you can attach in a few ways<br class="">+<br class="">+1. Attach to an existing process using the process ID<br class="">+2. Attach to an existing process by name<br class="">+3. Attach by name by waiting for the next instance of a process to launch<br class="">+<br class="">+The JSON configuration file can contain the following `lldb-vscode` specific launch key/value pairs:<br class="">+<br class="">+|parameter          |type    |req |         |<br class="">+|-------------------|--------|:--:|---------|<br class="">+|**name**           |string  |Y| A configuration name that will be displayed in the IDE.<br class="">+|**type**           |string  |Y| Must be "lldb-vscode".<br class="">+|**request**        |string  |Y| Must be "attach".<br class="">+|**program**        |string  | | Path to the executable to attach to. This value is optional but can help to resolve breakpoints prior the attaching to the program.<br class="">+|**pid**            |number  | | The process id of the process you wish to attach to. If **pid** is omitted, the debugger will attempt to attach to the program by finding a process whose file name matches the file name from **porgram**. Setting this value to `${command:pickMyProcess}` will allow interactive process selection in the IDE.<br class="">+|**stopOnEntry**    |boolean| | Whether to stop program immediately after launching.<br class="">+|**waitFor**        |boolean | | Wait for the process to launch.<br class="">+|**initCommands**   |[string]| | LLDB commands executed upon debugger startup prior to creating a the LLDB target. Commands and command output will be sent to the debugger console when they are executed.<br class="">+|**preRunCommands** |[string]| | LLDB commands executed just before launching after the LLDB target has been created. Commands and command output will be sent to the debugger console when they are executed.<br class="">+|**stopCommands**   |[string]| | LLDB commands executed just after each stop. Commands and command output will be sent to the debugger console when they are executed.<br class="">+|**exitCommands**   |[string]| | LLDB commands executed when the program exits. Commands and command output will be sent to the debugger console when they are executed.<br class="">+|**attachCommands** |[string]| | LLDB commands that will be executed after **preRunCommands** which take place of the code that normally does the attach. The commands can create a new target and attach or launch it however desired. This allows custom launch and attach configurations. Core files can use `target create --core /path/to/core` to attach to core files.<br class="">+<br class="">+<br class="">+## Example configurations<br class="">+<br class="">+### Launching<br class="">+<br class="">+This will launch `/tmp/a.out` with arguments `one`, `two`, and `three` and<br class="">+adds `FOO=1` and `bar` to the environment:<br class="">+<br class="">+```javascript<br class="">+{<br class="">+  "type": "lldb-vscode",<br class="">+  "request": "launch",<br class="">+  "name": "Debug",<br class="">+  "program": "/tmp/a.out",<br class="">+  "args": [ "one", "two", "three" ],<br class="">+  "env": [ "FOO=1", "BAR" ],<br class="">+}<br class="">+```<br class="">+<br class="">+### Attach using PID<br class="">+<br class="">+This will attach to a process `a.out` whose process ID is 123:<br class="">+<br class="">+```javascript<br class="">+{<br class="">+  "type": "lldb-vscode",<br class="">+  "request": "attach",<br class="">+  "name": "Attach to PID",<br class="">+  "program": "/tmp/a.out",<br class="">+  "pid": 123<br class="">+}<br class="">+```<br class="">+<br class="">+### Attach by Name<br class="">+<br class="">+This will attach to an existing process whose base<br class="">+name matches `a.out`. All we have to do is leave the `pid` value out of the<br class="">+above configuration:<br class="">+<br class="">+```javascript<br class="">+{<br class="">+  "name": "Attach to Name",<br class="">+  "type": "lldb-vscode",<br class="">+  "request": "attach",<br class="">+  "program": "/tmp/a.out",<br class="">+}<br class="">+```<br class="">+<br class="">+If you want to ignore any existing a.out processes and wait for the next instance<br class="">+to be launched you can add the "waitFor" key value pair:<br class="">+<br class="">+```javascript<br class="">+{<br class="">+  "name": "Attach to Name (wait)",<br class="">+  "type": "lldb-vscode",<br class="">+  "request": "attach",<br class="">+  "program": "/tmp/a.out",<br class="">+  "waitFor": true<br class="">+}<br class="">+```<br class="">+<br class="">+This will work as long as the architecture, vendor and OS supports waiting<br class="">+for processes. Currently MacOS is the only platform that supports this.<br class="">+<br class="">+<br class="">+### Loading a Core File<br class="">+<br class="">+Loading a core file can use the `"attach"` request along with the<br class="">+`"attachCommands"` to implement a custom attach:<br class="">+<br class="">+```javascript<br class="">+{<br class="">+  "name": "Attach to Name (wait)",<br class="">+  "type": "lldb-vscode",<br class="">+  "request": "attach",<br class="">+  "attachCommands": ["target create -c /path/to/123.core /path/to/executable"],<br class="">+}<br class="">+```<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/SourceBreakpoint.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/SourceBreakpoint.cpp?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/SourceBreakpoint.cpp?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/SourceBreakpoint.cpp (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/SourceBreakpoint.cpp Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,27 @@<br class="">+//===-- SourceBreakpoint.cpp ------------------------------------*- C++ -*-===//<br class="">+//<br class="">+//                     The LLVM Compiler Infrastructure<br class="">+//<br class="">+// This file is distributed under the University of Illinois Open Source<br class="">+// License. See LICENSE.TXT for details.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+<br class="">+#include "SourceBreakpoint.h"<br class="">+#include "VSCode.h"<br class="">+<br class="">+namespace lldb_vscode {<br class="">+<br class="">+SourceBreakpoint::SourceBreakpoint(const llvm::json::Object &obj)<br class="">+    : BreakpointBase(obj), line(GetUnsigned(obj, "line", 0)),<br class="">+      column(GetUnsigned(obj, "column", 0)) {}<br class="">+<br class="">+void SourceBreakpoint::SetBreakpoint(const llvm::StringRef source_path) {<br class="">+  bp = g_vsc.target.BreakpointCreateByLocation(source_path.str().c_str(), line);<br class="">+  if (!condition.empty())<br class="">+    SetCondition();<br class="">+  if (!hitCondition.empty())<br class="">+    SetHitCondition();<br class="">+}<br class="">+<br class="">+} // namespace lldb_vscode<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/SourceBreakpoint.h<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/SourceBreakpoint.h?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/SourceBreakpoint.h?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/SourceBreakpoint.h (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/SourceBreakpoint.h Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,39 @@<br class="">+//===-- SourceBreakpoint.h --------------------------------------*- C++ -*-===//<br class="">+//<br class="">+//                     The LLVM Compiler Infrastructure<br class="">+//<br class="">+// This file is distributed under the University of Illinois Open Source<br class="">+// License. See LICENSE.TXT for details.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+<br class="">+#ifndef LLDBVSCODE_SOURCEBREAKPOINT_H_<br class="">+#define LLDBVSCODE_SOURCEBREAKPOINT_H_<br class="">+<br class="">+#include "llvm/ADT/StringRef.h"<br class="">+#include "BreakpointBase.h"<br class="">+<br class="">+namespace lldb_vscode {<br class="">+<br class="">+struct SourceBreakpoint : public BreakpointBase {<br class="">+<br class="">+  uint32_t line;   ///< The source line of the breakpoint or logpoint<br class="">+  uint32_t column; ///< An optional source column of the breakpoint<br class="">+<br class="">+  SourceBreakpoint() : BreakpointBase(), line(0), column(0) {}<br class="">+  SourceBreakpoint(const llvm::json::Object &obj);<br class="">+<br class="">+  // Set this breakpoint in LLDB as a new breakpoint<br class="">+  void SetBreakpoint(const llvm::StringRef source_path);<br class="">+};<br class="">+<br class="">+inline bool operator<(const SourceBreakpoint &lhs,<br class="">+                      const SourceBreakpoint &rhs) {<br class="">+  if (lhs.line == rhs.line)<br class="">+    return lhs.column < rhs.column;<br class="">+  return lhs.line < rhs.line;<br class="">+}<br class="">+<br class="">+} // namespace lldb_vscode<br class="">+<br class="">+#endif<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/SourceReference.h<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/SourceReference.h?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/SourceReference.h?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/SourceReference.h (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/SourceReference.h Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,33 @@<br class="">+//===-- SourceReference.h ---------------------------------------*- C++ -*-===//<br class="">+//<br class="">+//                     The LLVM Compiler Infrastructure<br class="">+//<br class="">+// This file is distributed under the University of Illinois Open Source<br class="">+// License. See LICENSE.TXT for details.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+<br class="">+#ifndef LLDBVSCODE_SOURCEREFERENCE_H_<br class="">+#define LLDBVSCODE_SOURCEREFERENCE_H_<br class="">+<br class="">+#include "lldb/lldb-types.h"<br class="">+#include "llvm/ADT/DenseMap.h"<br class="">+#include <string><br class="">+<br class="">+namespace lldb_vscode {<br class="">+<br class="">+struct SourceReference {<br class="">+  std::string content;<br class="">+  llvm::DenseMap<lldb::addr_t, int64_t> addr_to_line;<br class="">+<br class="">+  int64_t GetLineForPC(lldb::addr_t pc) const {<br class="">+    auto addr_line = addr_to_line.find(pc);<br class="">+    if (addr_line != addr_to_line.end())<br class="">+      return addr_line->second;<br class="">+    return 0;<br class="">+  }<br class="">+};<br class="">+<br class="">+} // namespace lldb_vscode<br class="">+<br class="">+#endif<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/VSCode.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/VSCode.cpp?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/VSCode.cpp?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/VSCode.cpp (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/VSCode.cpp Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,336 @@<br class="">+//===-- VSCode.cpp ----------------------------------------------*- C++ -*-===//<br class="">+//<br class="">+//                     The LLVM Compiler Infrastructure<br class="">+//<br class="">+// This file is distributed under the University of Illinois Open Source<br class="">+// License. See LICENSE.TXT for details.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+<br class="">+#include <stdarg.h><br class="">+#include <fstream><br class="">+#include <mutex><br class="">+<br class="">+#include "VSCode.h"<br class="">+#include "LLDBUtils.h"<br class="">+<br class="">+using namespace lldb_vscode;<br class="">+<br class="">+namespace {<br class="">+  inline bool IsEmptyLine(llvm::StringRef S) {<br class="">+    return S.ltrim().empty();<br class="">+  }<br class="">+} // namespace<br class="">+<br class="">+namespace lldb_vscode {<br class="">+<br class="">+VSCode g_vsc;<br class="">+<br class="">+VSCode::VSCode()<br class="">+    : in(stdin), out(stdout), launch_info(nullptr), variables(),<br class="">+      broadcaster("lldb-vscode"), num_regs(0), num_locals(0), num_globals(0),<br class="">+      log(), exception_breakpoints(<br class="">+                 {{"cpp_catch", "C++ Catch", lldb::eLanguageTypeC_plus_plus},<br class="">+                  {"cpp_throw", "C++ Throw", lldb::eLanguageTypeC_plus_plus},<br class="">+                  {"objc_catch", "Objective C Catch", lldb::eLanguageTypeObjC},<br class="">+                  {"objc_throw", "Objective C Throw", lldb::eLanguageTypeObjC},<br class="">+                  {"swift_catch", "Swift Catch", lldb::eLanguageTypeSwift},<br class="">+                  {"swift_throw", "Swift Throw", lldb::eLanguageTypeSwift}}),<br class="">+      focus_tid(LLDB_INVALID_THREAD_ID), sent_terminated_event(false),<br class="">+      stop_at_entry(false) {<br class="">+  const char *log_file_path = getenv("LLDBVSCODE_LOG");<br class="">+  if (log_file_path)<br class="">+    log.reset(new std::ofstream(log_file_path));<br class="">+}<br class="">+<br class="">+VSCode::~VSCode() {<br class="">+  CloseInputStream();<br class="">+  CloseOutputStream();<br class="">+}<br class="">+<br class="">+void VSCode::CloseInputStream() {<br class="">+  if (in != stdin) {<br class="">+    fclose(in);<br class="">+    in = nullptr;<br class="">+  }<br class="">+}<br class="">+<br class="">+void VSCode::CloseOutputStream() {<br class="">+  if (out != stdout) {<br class="">+    fclose(out);<br class="">+    out = nullptr;<br class="">+  }<br class="">+}<br class="">+<br class="">+int64_t VSCode::GetLineForPC(int64_t sourceReference, lldb::addr_t pc) const {<br class="">+  auto pos = source_map.find(sourceReference);<br class="">+  if (pos != source_map.end())<br class="">+    return pos->second.GetLineForPC(pc);<br class="">+  return 0;<br class="">+}<br class="">+<br class="">+ExceptionBreakpoint *VSCode::GetExceptionBreakpoint(const std::string &filter) {<br class="">+  for (auto &bp : exception_breakpoints) {<br class="">+    if (bp.filter == filter)<br class="">+      return &bp;<br class="">+  }<br class="">+  return nullptr;<br class="">+}<br class="">+<br class="">+ExceptionBreakpoint *<br class="">+VSCode::GetExceptionBreakpoint(const lldb::break_id_t bp_id) {<br class="">+  for (auto &bp : exception_breakpoints) {<br class="">+    if (bp.bp.GetID() == bp_id)<br class="">+      return &bp;<br class="">+  }<br class="">+  return nullptr;<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// Send the JSON in "json_str" to the "out" stream. Correctly send the<br class="">+// "Content-Length:" field followed by the length, followed by the raw<br class="">+// JSON bytes.<br class="">+//----------------------------------------------------------------------<br class="">+void VSCode::SendJSON(const std::string &json_str) {<br class="">+  fprintf(out, "Content-Length: %u\r\n\r\n%s", (uint32_t)json_str.size(),<br class="">+          json_str.c_str());<br class="">+  fflush(out);<br class="">+  if (log) {<br class="">+    *log << "<-- " << std::endl<br class="">+         << "Content-Length: " << json_str.size() << "\r\n\r\n"<br class="">+         << json_str << std::endl;<br class="">+  }<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// Serialize the JSON value into a string and send the JSON packet to<br class="">+// the "out" stream.<br class="">+//----------------------------------------------------------------------<br class="">+void VSCode::SendJSON(const llvm::json::Value &json) {<br class="">+  std::string s;<br class="">+  llvm::raw_string_ostream strm(s);<br class="">+  strm << json;<br class="">+  static std::mutex mutex;<br class="">+  std::lock_guard<std::mutex> locker(mutex);<br class="">+  SendJSON(strm.str());<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// Read a JSON packet from the "in" stream.<br class="">+//----------------------------------------------------------------------<br class="">+std::string VSCode::ReadJSON() {<br class="">+  static std::string header("Content-Length: ");<br class="">+<br class="">+  uint32_t packet_len = 0;<br class="">+  std::string json_str;<br class="">+  char line[1024];<br class="">+<br class="">+  while (fgets(line, sizeof(line), in)) {<br class="">+    if (strncmp(line, header.data(), header.size()) == 0) {<br class="">+      packet_len = atoi(line + header.size());<br class="">+      if (fgets(line, sizeof(line), in)) {<br class="">+        if (!IsEmptyLine(line))<br class="">+          if (log)<br class="">+            *log << "warning: expected empty line but got: \"" << line << "\""<br class="">+                 << std::endl;<br class="">+        break;<br class="">+      }<br class="">+    } else {<br class="">+      if (log)<br class="">+        *log << "warning: expected \"" << header << "\" but got: \"" << line<br class="">+             << "\"" << std::endl;<br class="">+    }<br class="">+  }<br class="">+  // This is followed by two windows newline sequences ("\r\n\r\n") so eat<br class="">+  // two the newline sequences<br class="">+  if (packet_len > 0) {<br class="">+    json_str.resize(packet_len);<br class="">+    auto bytes_read = fread(&json_str[0], 1, packet_len, in);<br class="">+    if (bytes_read < packet_len) {<br class="">+      if (log)<br class="">+        *log << "error: read fewer bytes (" << bytes_read<br class="">+             << ") than requested (" << packet_len << ")" << std::endl;<br class="">+      json_str.erase(bytes_read);<br class="">+    }<br class="">+    if (log) {<br class="">+      *log << "--> " << std::endl;<br class="">+      *log << header << packet_len << "\r\n\r\n" << json_str << std::endl;<br class="">+    }<br class="">+  }<br class="">+  return json_str;<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "OutputEvent": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Event" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Event message for 'output' event type. The event<br class="">+//                     indicates that the target has produced some output.",<br class="">+//     "properties": {<br class="">+//       "event": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "output" ]<br class="">+//       },<br class="">+//       "body": {<br class="">+//         "type": "object",<br class="">+//         "properties": {<br class="">+//           "category": {<br class="">+//             "type": "string",<br class="">+//             "description": "The output category. If not specified,<br class="">+//                             'console' is assumed.",<br class="">+//             "_enum": [ "console", "stdout", "stderr", "telemetry" ]<br class="">+//           },<br class="">+//           "output": {<br class="">+//             "type": "string",<br class="">+//             "description": "The output to report."<br class="">+//           },<br class="">+//           "variablesReference": {<br class="">+//             "type": "number",<br class="">+//             "description": "If an attribute 'variablesReference' exists<br class="">+//                             and its value is > 0, the output contains<br class="">+//                             objects which can be retrieved by passing<br class="">+//                             variablesReference to the VariablesRequest."<br class="">+//           },<br class="">+//           "source": {<br class="">+//             "$ref": "#/definitions/Source",<br class="">+//             "description": "An optional source location where the output<br class="">+//                             was produced."<br class="">+//           },<br class="">+//           "line": {<br class="">+//             "type": "integer",<br class="">+//             "description": "An optional source location line where the<br class="">+//                             output was produced."<br class="">+//           },<br class="">+//           "column": {<br class="">+//             "type": "integer",<br class="">+//             "description": "An optional source location column where the<br class="">+//                             output was produced."<br class="">+//           },<br class="">+//           "data": {<br class="">+//             "type":["array","boolean","integer","null","number","object",<br class="">+//                     "string"],<br class="">+//             "description": "Optional data to report. For the 'telemetry'<br class="">+//                             category the data will be sent to telemetry, for<br class="">+//                             the other categories the data is shown in JSON<br class="">+//                             format."<br class="">+//           }<br class="">+//         },<br class="">+//         "required": ["output"]<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "event", "body" ]<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void VSCode::SendOutput(OutputType o, const llvm::StringRef output) {<br class="">+  if (output.empty())<br class="">+    return;<br class="">+<br class="">+  llvm::json::Object event(CreateEvent("output"));<br class="">+  llvm::json::Object body;<br class="">+  const char *category = nullptr;<br class="">+  switch (o) {<br class="">+  case OutputType::Console:<br class="">+    category = "console";<br class="">+    break;<br class="">+  case OutputType::Stdout:<br class="">+    category = "stdout";<br class="">+    break;<br class="">+  case OutputType::Stderr:<br class="">+    category = "stderr";<br class="">+    break;<br class="">+  case OutputType::Telemetry:<br class="">+    category = "telemetry";<br class="">+    break;<br class="">+  }<br class="">+  body.try_emplace("category", category);<br class="">+  body.try_emplace("output", output.str());<br class="">+  event.try_emplace("body", std::move(body));<br class="">+  SendJSON(llvm::json::Value(std::move(event)));<br class="">+}<br class="">+<br class="">+void __attribute__((format(printf, 3, 4)))<br class="">+VSCode::SendFormattedOutput(OutputType o, const char *format, ...) {<br class="">+  char buffer[1024];<br class="">+  va_list args;<br class="">+  va_start(args, format);<br class="">+  int actual_length = vsnprintf(buffer, sizeof(buffer), format, args);<br class="">+  va_end(args);<br class="">+  SendOutput(o, llvm::StringRef(buffer,<br class="">+                                std::min<int>(actual_length, sizeof(buffer))));<br class="">+}<br class="">+<br class="">+int64_t VSCode::GetNextSourceReference() {<br class="">+  static int64_t ref = 0;<br class="">+  return ++ref;<br class="">+}<br class="">+<br class="">+ExceptionBreakpoint *<br class="">+VSCode::GetExceptionBPFromStopReason(lldb::SBThread &thread) {<br class="">+  const auto num = thread.GetStopReasonDataCount();<br class="">+  // Check to see if have hit an exception breakpoint and change the<br class="">+  // reason to "exception", but only do so if all breakpoints that were<br class="">+  // hit are exception breakpoints.<br class="">+  ExceptionBreakpoint *exc_bp = nullptr;<br class="">+  for (size_t i = 0; i < num; i += 2) {<br class="">+    // thread.GetStopReasonDataAtIndex(i) will return the bp ID and<br class="">+    // thread.GetStopReasonDataAtIndex(i+1) will return the location<br class="">+    // within that breakpoint. We only care about the bp ID so we can<br class="">+    // see if this is an exception breakpoint that is getting hit.<br class="">+    lldb::break_id_t bp_id = thread.GetStopReasonDataAtIndex(i);<br class="">+    exc_bp = GetExceptionBreakpoint(bp_id);<br class="">+    // If any breakpoint is not an exception breakpoint, then stop and<br class="">+    // report this as a normal breakpoint<br class="">+    if (exc_bp == nullptr)<br class="">+      return nullptr;<br class="">+  }<br class="">+  return exc_bp;<br class="">+}<br class="">+<br class="">+lldb::SBThread VSCode::GetLLDBThread(const llvm::json::Object &arguments) {<br class="">+  auto tid = GetSigned(arguments, "threadId", LLDB_INVALID_THREAD_ID);<br class="">+  return target.GetProcess().GetThreadByID(tid);<br class="">+}<br class="">+<br class="">+lldb::SBFrame VSCode::GetLLDBFrame(const llvm::json::Object &arguments) {<br class="">+  const uint64_t frame_id = GetUnsigned(arguments, "frameId", UINT64_MAX);<br class="">+  lldb::SBProcess process = target.GetProcess();<br class="">+  // Upper 32 bits is the thread index ID<br class="">+  lldb::SBThread thread = process.GetThreadByIndexID(frame_id >> 32);<br class="">+  // Lower 32 bits is the frame index<br class="">+  return thread.GetFrameAtIndex(frame_id & 0xffffffffu);<br class="">+}<br class="">+<br class="">+llvm::json::Value VSCode::CreateTopLevelScopes() {<br class="">+  llvm::json::Array scopes;<br class="">+  scopes.emplace_back(CreateScope("Locals", VARREF_LOCALS, num_locals, false));<br class="">+  scopes.emplace_back(<br class="">+      CreateScope("Globals", VARREF_GLOBALS, num_globals, false));<br class="">+  scopes.emplace_back(CreateScope("Registers", VARREF_REGS, num_regs, false));<br class="">+  return llvm::json::Value(std::move(scopes));<br class="">+}<br class="">+<br class="">+void VSCode::RunLLDBCommands(llvm::StringRef prefix,<br class="">+                             const std::vector<std::string> &commands) {<br class="">+  SendOutput(OutputType::Console,<br class="">+             llvm::StringRef(::RunLLDBCommands(prefix, commands)));<br class="">+}<br class="">+<br class="">+void VSCode::RunInitCommands() {<br class="">+  RunLLDBCommands("Running initCommands:", init_commands);<br class="">+}<br class="">+<br class="">+void VSCode::RunPreRunCommands() {<br class="">+  RunLLDBCommands("Running preRunCommands:", pre_run_commands);<br class="">+}<br class="">+<br class="">+void VSCode::RunStopCommands() {<br class="">+  RunLLDBCommands("Running stopCommands:", stop_commands);<br class="">+}<br class="">+<br class="">+void VSCode::RunExitCommands() {<br class="">+  RunLLDBCommands("Running exitCommands:", exit_commands);<br class="">+}<br class="">+<br class="">+} // namespace lldb_vscode<br class="">+<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/VSCode.h<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/VSCode.h?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/VSCode.h?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/VSCode.h (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/VSCode.h Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,146 @@<br class="">+//===-- VSCode.h ------------------------------------------------*- C++ -*-===//<br class="">+//<br class="">+//                     The LLVM Compiler Infrastructure<br class="">+//<br class="">+// This file is distributed under the University of Illinois Open Source<br class="">+// License. See LICENSE.TXT for details.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+<br class="">+#ifndef LLDBVSCODE_VSCODE_H_<br class="">+#define LLDBVSCODE_VSCODE_H_<br class="">+<br class="">+#include <iosfwd><br class="">+#include <map><br class="">+#include <set><br class="">+#include <stdio.h><br class="">+#include <thread><br class="">+<br class="">+#include "llvm/ADT/DenseMap.h"<br class="">+#include "llvm/ADT/DenseSet.h"<br class="">+#include "llvm/ADT/StringMap.h"<br class="">+#include "llvm/ADT/StringRef.h"<br class="">+<br class="">+#include "lldb/API/SBAttachInfo.h"<br class="">+#include "lldb/API/SBBreakpoint.h"<br class="">+#include "lldb/API/SBBreakpointLocation.h"<br class="">+#include "lldb/API/SBCommandInterpreter.h"<br class="">+#include "lldb/API/SBCommandReturnObject.h"<br class="">+#include "lldb/API/SBCommunication.h"<br class="">+#include "lldb/API/SBDebugger.h"<br class="">+#include "lldb/API/SBEvent.h"<br class="">+#include "lldb/API/SBHostOS.h"<br class="">+#include "lldb/API/SBInstruction.h"<br class="">+#include "lldb/API/SBInstructionList.h"<br class="">+#include "lldb/API/SBLanguageRuntime.h"<br class="">+#include "lldb/API/SBLaunchInfo.h"<br class="">+#include "lldb/API/SBLineEntry.h"<br class="">+#include "lldb/API/SBListener.h"<br class="">+#include "lldb/API/SBProcess.h"<br class="">+#include "lldb/API/SBStream.h"<br class="">+#include "lldb/API/SBStringList.h"<br class="">+#include "lldb/API/SBTarget.h"<br class="">+#include "lldb/API/SBThread.h"<br class="">+<br class="">+#include "ExceptionBreakpoint.h"<br class="">+#include "FunctionBreakpoint.h"<br class="">+#include "SourceBreakpoint.h"<br class="">+#include "SourceReference.h"<br class="">+<br class="">+#define VARREF_LOCALS (int64_t)1<br class="">+#define VARREF_GLOBALS (int64_t)2<br class="">+#define VARREF_REGS (int64_t)3<br class="">+#define VARREF_FIRST_VAR_IDX (int64_t)4<br class="">+#define VARREF_IS_SCOPE(v) (VARREF_LOCALS <= 1 && v < VARREF_FIRST_VAR_IDX)<br class="">+#define VARIDX_TO_VARREF(i) ((i) + VARREF_FIRST_VAR_IDX)<br class="">+#define VARREF_TO_VARIDX(v) ((v)-VARREF_FIRST_VAR_IDX)<br class="">+#define NO_TYPENAME "<no-type>"<br class="">+<br class="">+namespace lldb_vscode {<br class="">+<br class="">+typedef llvm::DenseMap<uint32_t, SourceBreakpoint> SourceBreakpointMap;<br class="">+typedef llvm::StringMap<FunctionBreakpoint> FunctionBreakpointMap;<br class="">+enum class OutputType { Console, Stdout, Stderr, Telemetry };<br class="">+<br class="">+struct VSCode {<br class="">+  FILE *in;<br class="">+  FILE *out;<br class="">+  lldb::SBDebugger debugger;<br class="">+  lldb::SBTarget target;<br class="">+  lldb::SBAttachInfo attach_info;<br class="">+  lldb::SBLaunchInfo launch_info;<br class="">+  lldb::SBValueList variables;<br class="">+  lldb::SBBroadcaster broadcaster;<br class="">+  int64_t num_regs;<br class="">+  int64_t num_locals;<br class="">+  int64_t num_globals;<br class="">+  std::thread event_thread;<br class="">+  std::unique_ptr<std::ofstream> log;<br class="">+  llvm::DenseMap<lldb::addr_t, int64_t> addr_to_source_ref;<br class="">+  llvm::DenseMap<int64_t, SourceReference> source_map;<br class="">+  llvm::StringMap<SourceBreakpointMap> source_breakpoints;<br class="">+  FunctionBreakpointMap function_breakpoints;<br class="">+  std::vector<ExceptionBreakpoint> exception_breakpoints;<br class="">+  std::vector<std::string> init_commands;<br class="">+  std::vector<std::string> pre_run_commands;<br class="">+  std::vector<std::string> exit_commands;<br class="">+  std::vector<std::string> stop_commands;<br class="">+  lldb::tid_t focus_tid;<br class="">+  bool sent_terminated_event;<br class="">+  bool stop_at_entry;<br class="">+  // Keep track of the last stop thread index IDs as threads won't go away<br class="">+  // unless we send a "thread" event to indicate the thread exited.<br class="">+  llvm::DenseSet<lldb::tid_t> thread_ids;<br class="">+  VSCode();<br class="">+  ~VSCode();<br class="">+  VSCode(const VSCode &rhs) = delete;<br class="">+  void operator=(const VSCode &rhs) = delete;<br class="">+  void CloseInputStream();<br class="">+  void CloseOutputStream();<br class="">+  int64_t GetLineForPC(int64_t sourceReference, lldb::addr_t pc) const;<br class="">+  ExceptionBreakpoint *GetExceptionBreakpoint(const std::string &filter);<br class="">+  ExceptionBreakpoint *GetExceptionBreakpoint(const lldb::break_id_t bp_id);<br class="">+  //----------------------------------------------------------------------<br class="">+  // Send the JSON in "json_str" to the "out" stream. Correctly send the<br class="">+  // "Content-Length:" field followed by the length, followed by the raw<br class="">+  // JSON bytes.<br class="">+  //----------------------------------------------------------------------<br class="">+  void SendJSON(const std::string &json_str);<br class="">+<br class="">+  //----------------------------------------------------------------------<br class="">+  // Serialize the JSON value into a string and send the JSON packet to<br class="">+  // the "out" stream.<br class="">+  //----------------------------------------------------------------------<br class="">+  void SendJSON(const llvm::json::Value &json);<br class="">+<br class="">+  std::string ReadJSON();<br class="">+<br class="">+  void SendOutput(OutputType o, const llvm::StringRef output);<br class="">+<br class="">+  void __attribute__((format(printf, 3, 4)))<br class="">+  SendFormattedOutput(OutputType o, const char *format, ...);<br class="">+<br class="">+  static int64_t GetNextSourceReference();<br class="">+<br class="">+  ExceptionBreakpoint *GetExceptionBPFromStopReason(lldb::SBThread &thread);<br class="">+<br class="">+  lldb::SBThread GetLLDBThread(const llvm::json::Object &arguments);<br class="">+<br class="">+  lldb::SBFrame GetLLDBFrame(const llvm::json::Object &arguments);<br class="">+<br class="">+  llvm::json::Value CreateTopLevelScopes();<br class="">+<br class="">+  void RunLLDBCommands(llvm::StringRef prefix,<br class="">+                       const std::vector<std::string> &commands);<br class="">+<br class="">+  void RunInitCommands();<br class="">+  void RunPreRunCommands();<br class="">+  void RunStopCommands();<br class="">+  void RunExitCommands();<br class="">+};<br class="">+<br class="">+extern VSCode g_vsc;<br class="">+<br class="">+} // namespace lldb_vscode<br class="">+<br class="">+#endif<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/VSCodeForward.h<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/VSCodeForward.h?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/VSCodeForward.h?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/VSCodeForward.h (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/VSCodeForward.h Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,47 @@<br class="">+//===-- VSCodeForward.h -----------------------------------------*- C++ -*-===//<br class="">+//<br class="">+//                     The LLVM Compiler Infrastructure<br class="">+//<br class="">+// This file is distributed under the University of Illinois Open Source<br class="">+// License. See LICENSE.TXT for details.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+<br class="">+#ifndef LLDBVSCODE_VSCODEFORWARD_H_<br class="">+#define LLDBVSCODE_VSCODEFORWARD_H_<br class="">+<br class="">+<br class="">+namespace lldb_vscode {<br class="">+struct BreakpointBase;<br class="">+struct ExceptionBreakpoint;<br class="">+struct FunctionBreakpoint;<br class="">+struct SourceBreakpoint;<br class="">+struct SourceReference;<br class="">+} // namespace lldb_vscode<br class="">+<br class="">+namespace lldb {<br class="">+class SBAttachInfo;<br class="">+class SBBreakpoint;<br class="">+class SBBreakpointLocation;<br class="">+class SBCommandInterpreter;<br class="">+class SBCommandReturnObject;<br class="">+class SBCommunication;<br class="">+class SBDebugger;<br class="">+class SBEvent;<br class="">+class SBFrame;<br class="">+class SBHostOS;<br class="">+class SBInstruction;<br class="">+class SBInstructionList;<br class="">+class SBLanguageRuntime;<br class="">+class SBLaunchInfo;<br class="">+class SBLineEntry;<br class="">+class SBListener;<br class="">+class SBProcess;<br class="">+class SBStream;<br class="">+class SBStringList;<br class="">+class SBTarget;<br class="">+class SBThread;<br class="">+class SBValue;<br class="">+} // namespace lldb<br class="">+<br class="">+#endif<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/lldb-vscode-Info.plist<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/lldb-vscode-Info.plist?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/lldb-vscode-Info.plist?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/lldb-vscode-Info.plist (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/lldb-vscode-Info.plist Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,21 @@<br class="">+<?xml version="1.0" encoding="UTF-8"?><br class="">+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "<a href="http://www.apple.com/DTDs/PropertyList-1.0.dtd" class="">http://www.apple.com/DTDs/PropertyList-1.0.dtd</a>"><br class="">+<plist version="1.0"><br class="">+<dict><br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><key>CFBundleDevelopmentRegion</key><br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><string>English</string><br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><key>CFBundleIdentifier</key><br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><string>com.apple.lldb-vscode</string><br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><key>CFBundleInfoDictionaryVersion</key><br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><string>6.0</string><br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><key>CFBundleName</key><br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><string>lldb-vscode</string><br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><key>CFBundleVersion</key><br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><string>360.99.0</string><br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><key>SecTaskAccess</key><br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><array><br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><string>allowed</string><br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><string>debug</string><br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span></array><br class="">+</dict><br class="">+</plist><br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/lldb-vscode.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/lldb-vscode.cpp?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/lldb-vscode.cpp?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/lldb-vscode.cpp (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/lldb-vscode.cpp Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,2706 @@<br class="">+//===-- lldb-vscode.cpp -----------------------------------------*- C++ -*-===//<br class="">+//<br class="">+//                     The LLVM Compiler Infrastructure<br class="">+//<br class="">+// This file is distributed under the University of Illinois Open Source<br class="">+// License. See LICENSE.TXT for details.<br class="">+//<br class="">+//===----------------------------------------------------------------------===//<br class="">+<br class="">+#include <assert.h><br class="">+#include <limits.h><br class="">+#include <stdarg.h><br class="">+#include <stdio.h><br class="">+#include <stdlib.h><br class="">+#include <string.h><br class="">+#include <sys/stat.h><br class="">+#include <sys/types.h><br class="">+#if defined(_WIN32)<br class="">+// We need to #define NOMINMAX in order to skip `min()` and `max()` macro<br class="">+// definitions that conflict with other system headers.<br class="">+// We also need to #undef GetObject (which is defined to GetObjectW) because<br class="">+// the JSON code we use also has methods named `GetObject()` and we conflict<br class="">+// against these.<br class="">+#define NOMINMAX<br class="">+#include <windows.h><br class="">+#undef GetObject<br class="">+#else<br class="">+#include <netinet/in.h><br class="">+#include <sys/socket.h><br class="">+#include <unistd.h><br class="">+#endif<br class="">+<br class="">+#include <algorithm><br class="">+#include <chrono><br class="">+#include <fstream><br class="">+#include <map><br class="">+#include <memory><br class="">+#include <mutex><br class="">+#include <set><br class="">+#include <sstream><br class="">+#include <thread><br class="">+<br class="">+#include "llvm/ADT/ArrayRef.h"<br class="">+#include "llvm/Support/FileSystem.h"<br class="">+#include "llvm/Support/raw_ostream.h"<br class="">+<br class="">+#include "JSONUtils.h"<br class="">+#include "LLDBUtils.h"<br class="">+#include "VSCode.h"<br class="">+<br class="">+#if defined(_WIN32)<br class="">+#define PATH_MAX MAX_PATH<br class="">+typedef int socklen_t;<br class="">+constexpr const char *dev_null_path = "nul";<br class="">+<br class="">+#else<br class="">+typedef int SOCKET;<br class="">+constexpr const char *dev_null_path = "/dev/null";<br class="">+<br class="">+#endif<br class="">+<br class="">+using namespace lldb_vscode;<br class="">+<br class="">+namespace {<br class="">+<br class="">+typedef void (*RequestCallback)(const llvm::json::Object &command);<br class="">+<br class="">+enum LaunchMethod { Launch, Attach, AttachForSuspendedLaunch };<br class="">+<br class="">+enum VSCodeBroadcasterBits { eBroadcastBitStopEventThread = 1u << 0 };<br class="">+<br class="">+int AcceptConnection(int portno) {<br class="">+  // Accept a socket connection from any host on "portno".<br class="">+  int newsockfd = -1;<br class="">+  struct sockaddr_in serv_addr, cli_addr;<br class="">+  SOCKET sockfd = socket(AF_INET, SOCK_STREAM, 0);<br class="">+  if (sockfd < 0) {<br class="">+    if (g_vsc.log)<br class="">+      *g_vsc.log << "error: opening socket (" << strerror(errno) << ")"<br class="">+                 << std::endl;<br class="">+  } else {<br class="">+    memset((char *)&serv_addr, 0, sizeof(serv_addr));<br class="">+    serv_addr.sin_family = AF_INET;<br class="">+    // serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);<br class="">+    serv_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);<br class="">+    serv_addr.sin_port = htons(portno);<br class="">+    if (bind(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) {<br class="">+      if (g_vsc.log)<br class="">+        *g_vsc.log << "error: binding socket (" << strerror(errno) << ")"<br class="">+                   << std::endl;<br class="">+    } else {<br class="">+      listen(sockfd, 5);<br class="">+      socklen_t clilen = sizeof(cli_addr);<br class="">+      newsockfd = accept(sockfd, (struct sockaddr *)&cli_addr, &clilen);<br class="">+      if (newsockfd < 0)<br class="">+        if (g_vsc.log)<br class="">+          *g_vsc.log << "error: accept (" << strerror(errno) << ")"<br class="">+                     << std::endl;<br class="">+    }<br class="">+#if defined(_WIN32)<br class="">+    closesocket(sockfd);<br class="">+#else<br class="">+    close(sockfd);<br class="">+#endif<br class="">+  }<br class="">+  return newsockfd;<br class="">+}<br class="">+<br class="">+std::vector<const char *> MakeArgv(const llvm::ArrayRef<std::string> &strs) {<br class="">+  // Create and return an array of "const char *", one for each C string in<br class="">+  // "strs" and terminate the list with a NULL. This can be used for argument<br class="">+  // vectors (argv) or environment vectors (envp) like those passed to the<br class="">+  // "main" function in C programs.<br class="">+  std::vector<const char *> argv;<br class="">+  for (const auto &s : strs)<br class="">+    argv.push_back(s.c_str());<br class="">+  argv.push_back(nullptr);<br class="">+  return argv;<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// Send a "exited" event to indicate the process has exited.<br class="">+//----------------------------------------------------------------------<br class="">+void SendProcessExitedEvent(lldb::SBProcess &process) {<br class="">+  llvm::json::Object event(CreateEvent("exited"));<br class="">+  llvm::json::Object body;<br class="">+  body.try_emplace("exitCode", (int64_t)process.GetExitStatus());<br class="">+  event.try_emplace("body", std::move(body));<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(event)));<br class="">+}<br class="">+<br class="">+void SendThreadExitedEvent(lldb::tid_t tid) {<br class="">+  llvm::json::Object event(CreateEvent("thread"));<br class="">+  llvm::json::Object body;<br class="">+  body.try_emplace("reason", "exited");<br class="">+  body.try_emplace("threadId", (int64_t)tid);<br class="">+  event.try_emplace("body", std::move(body));<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(event)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// Send a "terminated" event to indicate the process is done being<br class="">+// debugged.<br class="">+//----------------------------------------------------------------------<br class="">+void SendTerminatedEvent() {<br class="">+  if (!g_vsc.sent_terminated_event) {<br class="">+    g_vsc.sent_terminated_event = true;<br class="">+    // Send a "terminated" event<br class="">+    llvm::json::Object event(CreateEvent("terminated"));<br class="">+    g_vsc.SendJSON(llvm::json::Value(std::move(event)));<br class="">+  }<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// Send a thread stopped event for all threads as lons as the process<br class="">+// is stopped.<br class="">+//----------------------------------------------------------------------<br class="">+void SendThreadStoppedEvent() {<br class="">+  lldb::SBProcess process = g_vsc.target.GetProcess();<br class="">+  if (process.IsValid()) {<br class="">+    auto state = process.GetState();<br class="">+    if (state == lldb::eStateStopped) {<br class="">+      llvm::DenseSet<lldb::tid_t> old_thread_ids;<br class="">+      old_thread_ids.swap(g_vsc.thread_ids);<br class="">+      uint32_t stop_id = process.GetStopID();<br class="">+      const uint32_t num_threads = process.GetNumThreads();<br class="">+<br class="">+      // First make a pass through the threads to see if the focused thread<br class="">+      // has a stop reason. In case the focus thread doesn't have a stop<br class="">+      // reason, remember the first thread that has a stop reason so we can<br class="">+      // set it as the focus thread if below if needed.<br class="">+      lldb::tid_t first_tid_with_reason = LLDB_INVALID_THREAD_ID;<br class="">+      uint32_t num_threads_with_reason = 0;<br class="">+      for (uint32_t thread_idx = 0; thread_idx < num_threads; ++thread_idx) {<br class="">+        lldb::SBThread thread = process.GetThreadAtIndex(thread_idx);<br class="">+        const lldb::tid_t tid = thread.GetThreadID();<br class="">+        const bool has_reason = ThreadHasStopReason(thread);<br class="">+        // If the focus thread doesn't have a stop reason, clear the thread ID<br class="">+        if (tid == g_vsc.focus_tid && !has_reason)<br class="">+          g_vsc.focus_tid = LLDB_INVALID_THREAD_ID;<br class="">+        if (has_reason) {<br class="">+          ++num_threads_with_reason;<br class="">+          if (first_tid_with_reason == LLDB_INVALID_THREAD_ID)<br class="">+            first_tid_with_reason = tid;<br class="">+        }<br class="">+      }<br class="">+<br class="">+      // We will have cleared g_vsc.focus_tid if he focus thread doesn't<br class="">+      // have a stop reason, so if it was cleared, or wasn't set, then set the<br class="">+      // focus thread to the first thread with a stop reason.<br class="">+      if (g_vsc.focus_tid == LLDB_INVALID_THREAD_ID)<br class="">+        g_vsc.focus_tid = first_tid_with_reason;<br class="">+<br class="">+      // If no threads stopped with a reaspon, then report the first one so<br class="">+      // we at least let the UI know we stopped.<br class="">+      if (num_threads_with_reason == 0) {<br class="">+        lldb::SBThread thread = process.GetThreadAtIndex(0);<br class="">+        g_vsc.SendJSON(CreateThreadStopped(thread, stop_id));<br class="">+      } else {<br class="">+        for (uint32_t thread_idx = 0; thread_idx < num_threads; ++thread_idx) {<br class="">+          lldb::SBThread thread = process.GetThreadAtIndex(thread_idx);<br class="">+          g_vsc.thread_ids.insert(thread.GetThreadID());<br class="">+          if (ThreadHasStopReason(thread)) {<br class="">+            g_vsc.SendJSON(CreateThreadStopped(thread, stop_id));<br class="">+          }<br class="">+        }<br class="">+      }<br class="">+<br class="">+      for (auto tid : old_thread_ids) {<br class="">+        auto end = g_vsc.thread_ids.end();<br class="">+        auto pos = g_vsc.thread_ids.find(tid);<br class="">+        if (pos == end)<br class="">+          SendThreadExitedEvent(tid);<br class="">+      }<br class="">+    } else {<br class="">+      if (g_vsc.log)<br class="">+        *g_vsc.log << "error: SendThreadStoppedEvent() when process"<br class="">+                      " isn't stopped ("<br class="">+                   << lldb::SBDebugger::StateAsCString(state) << ')'<br class="">+                   << std::endl;<br class="">+    }<br class="">+  } else {<br class="">+    if (g_vsc.log)<br class="">+      *g_vsc.log << "error: SendThreadStoppedEvent() invalid process"<br class="">+                 << std::endl;<br class="">+  }<br class="">+  g_vsc.RunStopCommands();<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "ProcessEvent": {<br class="">+//   "allOf": [<br class="">+//     { "$ref": "#/definitions/Event" },<br class="">+//     {<br class="">+//       "type": "object",<br class="">+//       "description": "Event message for 'process' event type. The event<br class="">+//                       indicates that the debugger has begun debugging a<br class="">+//                       new process. Either one that it has launched, or one<br class="">+//                       that it has attached to.",<br class="">+//       "properties": {<br class="">+//         "event": {<br class="">+//           "type": "string",<br class="">+//           "enum": [ "process" ]<br class="">+//         },<br class="">+//         "body": {<br class="">+//           "type": "object",<br class="">+//           "properties": {<br class="">+//             "name": {<br class="">+//               "type": "string",<br class="">+//               "description": "The logical name of the process. This is<br class="">+//                               usually the full path to process's executable<br class="">+//                               file. Example: /home/myproj/program.js."<br class="">+//             },<br class="">+//             "systemProcessId": {<br class="">+//               "type": "integer",<br class="">+//               "description": "The system process id of the debugged process.<br class="">+//                               This property will be missing for non-system<br class="">+//                               processes."<br class="">+//             },<br class="">+//             "isLocalProcess": {<br class="">+//               "type": "boolean",<br class="">+//               "description": "If true, the process is running on the same<br class="">+//                               computer as the debug adapter."<br class="">+//             },<br class="">+//             "startMethod": {<br class="">+//               "type": "string",<br class="">+//               "enum": [ "launch", "attach", "attachForSuspendedLaunch" ],<br class="">+//               "description": "Describes how the debug engine started<br class="">+//                               debugging this process.",<br class="">+//               "enumDescriptions": [<br class="">+//                 "Process was launched under the debugger.",<br class="">+//                 "Debugger attached to an existing process.",<br class="">+//                 "A project launcher component has launched a new process in<br class="">+//                  a suspended state and then asked the debugger to attach."<br class="">+//               ]<br class="">+//             }<br class="">+//           },<br class="">+//           "required": [ "name" ]<br class="">+//         }<br class="">+//       },<br class="">+//       "required": [ "event", "body" ]<br class="">+//     }<br class="">+//   ]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void SendProcessEvent(LaunchMethod launch_method) {<br class="">+  lldb::SBFileSpec exe_fspec = g_vsc.target.GetExecutable();<br class="">+  char exe_path[PATH_MAX];<br class="">+  exe_fspec.GetPath(exe_path, sizeof(exe_path));<br class="">+  llvm::json::Object event(CreateEvent("process"));<br class="">+  llvm::json::Object body;<br class="">+  body.try_emplace("name", std::string(exe_path));<br class="">+  const auto pid = g_vsc.target.GetProcess().GetProcessID();<br class="">+  body.try_emplace("systemProcessId", (int64_t)pid);<br class="">+  body.try_emplace("isLocalProcess", true);<br class="">+  const char *startMethod = nullptr;<br class="">+  switch (launch_method) {<br class="">+  case Launch:<br class="">+    startMethod = "launch";<br class="">+    break;<br class="">+  case Attach:<br class="">+    startMethod = "attach";<br class="">+    break;<br class="">+  case AttachForSuspendedLaunch:<br class="">+    startMethod = "attachForSuspendedLaunch";<br class="">+    break;<br class="">+  }<br class="">+  body.try_emplace("startMethod", startMethod);<br class="">+  event.try_emplace("body", std::move(body));<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(event)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// Grab any STDOUT and STDERR from the process and send it up to VS Code<br class="">+// via an "output" event to the "stdout" and "stderr" categories.<br class="">+//----------------------------------------------------------------------<br class="">+void SendStdOutStdErr(lldb::SBProcess &process) {<br class="">+  char buffer[1024];<br class="">+  size_t count;<br class="">+  while ((count = process.GetSTDOUT(buffer, sizeof(buffer))) > 0)<br class="">+  g_vsc.SendOutput(OutputType::Stdout, llvm::StringRef(buffer, count));<br class="">+  while ((count = process.GetSTDERR(buffer, sizeof(buffer))) > 0)<br class="">+    g_vsc.SendOutput(OutputType::Stderr, llvm::StringRef(buffer, count));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// All events from a the debugger, target, process, thread and frames are<br class="">+// received in this function that runs in its own thread. We are using a<br class="">+// "FILE *" to output packets back to VS Code and they have mutexes in them<br class="">+// them prevent multiple threads from writing simultaneously so no locking<br class="">+// is required.<br class="">+//----------------------------------------------------------------------<br class="">+void EventThreadFunction() {<br class="">+  lldb::SBEvent event;<br class="">+  lldb::SBListener listener = g_vsc.debugger.GetListener();<br class="">+  bool done = false;<br class="">+  while (!done) {<br class="">+    if (listener.WaitForEvent(1, event)) {<br class="">+      const auto event_mask = event.GetType();<br class="">+      if (lldb::SBProcess::EventIsProcessEvent(event)) {<br class="">+        lldb::SBProcess process = lldb::SBProcess::GetProcessFromEvent(event);<br class="">+        if (event_mask & lldb::SBProcess::eBroadcastBitStateChanged) {<br class="">+          auto state = lldb::SBProcess::GetStateFromEvent(event);<br class="">+          switch (state) {<br class="">+          case lldb::eStateInvalid:<br class="">+            // Not a state event<br class="">+            break;<br class="">+          case lldb::eStateUnloaded:<br class="">+            break;<br class="">+          case lldb::eStateConnected:<br class="">+            break;<br class="">+          case lldb::eStateAttaching:<br class="">+            break;<br class="">+          case lldb::eStateLaunching:<br class="">+            break;<br class="">+          case lldb::eStateStepping:<br class="">+            break;<br class="">+          case lldb::eStateCrashed:<br class="">+            break;<br class="">+          case lldb::eStateDetached:<br class="">+            break;<br class="">+          case lldb::eStateSuspended:<br class="">+            break;<br class="">+          case lldb::eStateStopped:<br class="">+            // Only report a stopped event if the process was not restarted.<br class="">+            if (!lldb::SBProcess::GetRestartedFromEvent(event)) {<br class="">+              SendStdOutStdErr(process);<br class="">+              SendThreadStoppedEvent();<br class="">+            }<br class="">+            break;<br class="">+          case lldb::eStateRunning:<br class="">+            break;<br class="">+          case lldb::eStateExited: {<br class="">+            // Run any exit LLDB commands the user specified in the<br class="">+            // launch.json<br class="">+            g_vsc.RunExitCommands();<br class="">+            SendProcessExitedEvent(process);<br class="">+            SendTerminatedEvent();<br class="">+            done = true;<br class="">+          } break;<br class="">+          }<br class="">+        } else if ((event_mask & lldb::SBProcess::eBroadcastBitSTDOUT) ||<br class="">+                   (event_mask & lldb::SBProcess::eBroadcastBitSTDERR)) {<br class="">+          SendStdOutStdErr(process);<br class="">+        }<br class="">+      } else if (lldb::SBBreakpoint::EventIsBreakpointEvent(event)) {<br class="">+        if (event_mask & lldb::SBTarget::eBroadcastBitBreakpointChanged) {<br class="">+          auto event_type =<br class="">+              lldb::SBBreakpoint::GetBreakpointEventTypeFromEvent(event);<br class="">+          const auto num_locs =<br class="">+              lldb::SBBreakpoint::GetNumBreakpointLocationsFromEvent(event);<br class="">+          auto bp = lldb::SBBreakpoint::GetBreakpointFromEvent(event);<br class="">+          bool added = event_type & lldb::eBreakpointEventTypeLocationsAdded;<br class="">+          bool removed =<br class="">+              event_type & lldb::eBreakpointEventTypeLocationsRemoved;<br class="">+          if (added || removed) {<br class="">+            for (size_t i = 0; i < num_locs; ++i) {<br class="">+              auto bp_loc =<br class="">+                  lldb::SBBreakpoint::GetBreakpointLocationAtIndexFromEvent(<br class="">+                      event, i);<br class="">+              auto bp_event = CreateEvent("breakpoint");<br class="">+              llvm::json::Object body;<br class="">+              body.try_emplace("breakpoint", CreateBreakpoint(bp_loc));<br class="">+              if (added)<br class="">+                body.try_emplace("reason", "new");<br class="">+              else<br class="">+                body.try_emplace("reason", "removed");<br class="">+              bp_event.try_emplace("body", std::move(body));<br class="">+              g_vsc.SendJSON(llvm::json::Value(std::move(bp_event)));<br class="">+            }<br class="">+          }<br class="">+        }<br class="">+      } else if (event.BroadcasterMatchesRef(g_vsc.broadcaster)) {<br class="">+        if (event_mask & eBroadcastBitStopEventThread) {<br class="">+          done = true;<br class="">+        }<br class="">+      }<br class="">+    }<br class="">+  }<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// Both attach and launch take a either a sourcePath or sourceMap<br class="">+// argument (or neither), from which we need to set the target.source-map.<br class="">+//----------------------------------------------------------------------<br class="">+void SetSourceMapFromArguments(const llvm::json::Object &arguments) {<br class="">+  const char *sourceMapHelp =<br class="">+      "source must be be an array of two-element arrays, "<br class="">+      "each containing a source and replacement path string.\n";<br class="">+<br class="">+  std::string sourceMapCommand;<br class="">+  llvm::raw_string_ostream strm(sourceMapCommand);<br class="">+  strm << "settings set target.source-map ";<br class="">+  auto sourcePath = GetString(arguments, "sourcePath");<br class="">+<br class="">+  // sourceMap is the new, more general form of sourcePath and overrides it.<br class="">+  auto sourceMap = arguments.getArray("sourceMap");<br class="">+  if (sourceMap) {<br class="">+    for (const auto &value : *sourceMap) {<br class="">+      auto mapping = value.getAsArray();<br class="">+      if (mapping == nullptr || mapping->size() != 2 ||<br class="">+          (*mapping)[0].kind() != llvm::json::Value::String ||<br class="">+          (*mapping)[1].kind() != llvm::json::Value::String) {<br class="">+        g_vsc.SendOutput(OutputType::Console, llvm::StringRef(sourceMapHelp));<br class="">+        return;<br class="">+      }<br class="">+      auto mapFrom = GetAsString((*mapping)[0]);<br class="">+      auto mapTo = GetAsString((*mapping)[1]);<br class="">+      strm << "\"" << mapFrom << "\" \"" << mapTo << "\"";<br class="">+    }<br class="">+  } else {<br class="">+    if (ObjectContainsKey(arguments, "sourceMap")) {<br class="">+      g_vsc.SendOutput(OutputType::Console, llvm::StringRef(sourceMapHelp));<br class="">+      return;<br class="">+    }<br class="">+    if (sourcePath.empty())<br class="">+      return;<br class="">+    // Do any source remapping needed before we create our targets<br class="">+    strm << "\".\" \"" << sourcePath << "\"";<br class="">+  }<br class="">+  strm.flush();<br class="">+  if (!sourceMapCommand.empty()) {<br class="">+    g_vsc.RunLLDBCommands("Setting source map:", {sourceMapCommand});<br class="">+  }<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "AttachRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Attach request; value of command field is 'attach'.",<br class="">+//     "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "attach" ]<br class="">+//       },<br class="">+//       "arguments": {<br class="">+//         "$ref": "#/definitions/AttachRequestArguments"<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command", "arguments" ]<br class="">+//   }]<br class="">+// },<br class="">+// "AttachRequestArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'attach' request.\nThe attach request has no<br class="">+//   standardized attributes."<br class="">+// },<br class="">+// "AttachResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'attach' request. This is just an<br class="">+//     acknowledgement, so no body field is required."<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_attach(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  lldb::SBError error;<br class="">+  FillResponse(request, response);<br class="">+  auto arguments = request.getObject("arguments");<br class="">+  const lldb::pid_t pid =<br class="">+      GetUnsigned(arguments, "pid", LLDB_INVALID_PROCESS_ID);<br class="">+  if (pid != LLDB_INVALID_PROCESS_ID)<br class="">+    g_vsc.attach_info.SetProcessID(pid);<br class="">+  const auto wait_for = GetBoolean(arguments, "waitFor", false);<br class="">+  g_vsc.attach_info.SetWaitForLaunch(wait_for, false /*async*/);<br class="">+  g_vsc.init_commands = GetStrings(arguments, "initCommands");<br class="">+  g_vsc.pre_run_commands = GetStrings(arguments, "preRunCommands");<br class="">+  g_vsc.stop_commands = GetStrings(arguments, "stopCommands");<br class="">+  g_vsc.exit_commands = GetStrings(arguments, "exitCommands");<br class="">+  auto attachCommands = GetStrings(arguments, "attachCommands");<br class="">+  g_vsc.stop_at_entry = GetBoolean(arguments, "stopOnEntry", false);<br class="">+  const auto debuggerRoot = GetString(arguments, "debuggerRoot");<br class="">+<br class="">+  // This is a hack for loading DWARF in .o files on Mac where the .o files<br class="">+  // in the debug map of the main executable have relative paths which require<br class="">+  // the lldb-vscode binary to have its working directory set to that relative<br class="">+  // root for the .o files in order to be able to load debug info.<br class="">+  if (!debuggerRoot.empty()) {<br class="">+    llvm::sys::fs::set_current_path(debuggerRoot.data());<br class="">+  }<br class="">+<br class="">+  // Run any initialize LLDB commands the user specified in the launch.json<br class="">+  g_vsc.RunInitCommands();<br class="">+<br class="">+  // Grab the name of the program we need to debug and set it as the first<br class="">+  // argument that will be passed to the program we will debug.<br class="">+  const auto program = GetString(arguments, "program");<br class="">+  if (!program.empty()) {<br class="">+    lldb::SBFileSpec program_fspec(program.data(), true /*resolve_path*/);<br class="">+<br class="">+    g_vsc.launch_info.SetExecutableFile(program_fspec,<br class="">+                                        false /*add_as_first_arg*/);<br class="">+    const char *target_triple = nullptr;<br class="">+    const char *uuid_cstr = nullptr;<br class="">+    // Stand alone debug info file if different from executable<br class="">+    const char *symfile = nullptr;<br class="">+    g_vsc.target.AddModule(program.data(), target_triple, uuid_cstr, symfile);<br class="">+    if (error.Fail()) {<br class="">+      response.try_emplace("success", false);<br class="">+      response.try_emplace("message", std::string(error.GetCString()));<br class="">+      g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+      return;<br class="">+    }<br class="">+  }<br class="">+<br class="">+  const bool detatchOnError = GetBoolean(arguments, "detachOnError", false);<br class="">+  g_vsc.launch_info.SetDetachOnError(detatchOnError);<br class="">+<br class="">+  // Run any pre run LLDB commands the user specified in the launch.json<br class="">+  g_vsc.RunPreRunCommands();<br class="">+<br class="">+  if (pid == LLDB_INVALID_PROCESS_ID && wait_for) {<br class="">+    char attach_info[256];<br class="">+    auto attach_info_len =<br class="">+        snprintf(attach_info, sizeof(attach_info),<br class="">+                 "Waiting to attach to \"%s\"...", program.data());<br class="">+    g_vsc.SendOutput(OutputType::Console, llvm::StringRef(attach_info,<br class="">+                                                          attach_info_len));<br class="">+  }<br class="">+  if (attachCommands.empty()) {<br class="">+    // No "attachCommands", just attach normally.<br class="">+    // Disable async events so the attach will be successful when we return from<br class="">+    // the launch call and the launch will happen synchronously<br class="">+    g_vsc.debugger.SetAsync(false);<br class="">+    g_vsc.target.Attach(g_vsc.attach_info, error);<br class="">+    // Reenable async events<br class="">+    g_vsc.debugger.SetAsync(true);<br class="">+  } else {<br class="">+    // We have "attachCommands" that are a set of commands that are expected<br class="">+    // to execute the commands after which a process should be created. If there<br class="">+    // is no valid process after running these commands, we have failed.<br class="">+    g_vsc.RunLLDBCommands("Running attachCommands:", attachCommands);<br class="">+    // The custom commands might have created a new target so we should use the<br class="">+    // selected target after these commands are run.<br class="">+    g_vsc.target = g_vsc.debugger.GetSelectedTarget();<br class="">+  }<br class="">+<br class="">+  SetSourceMapFromArguments(*arguments);<br class="">+<br class="">+  if (error.Success()) {<br class="">+    auto attached_pid = g_vsc.target.GetProcess().GetProcessID();<br class="">+    if (attached_pid == LLDB_INVALID_PROCESS_ID) {<br class="">+      if (attachCommands.empty())<br class="">+        error.SetErrorString("failed to attach to a process");<br class="">+      else<br class="">+        error.SetErrorString("attachCommands failed to attach to a process");<br class="">+    }<br class="">+  }<br class="">+<br class="">+  if (error.Fail()) {<br class="">+    response.try_emplace("success", false);<br class="">+    response.try_emplace("message", std::string(error.GetCString()));<br class="">+  }<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+  if (error.Success()) {<br class="">+    SendProcessEvent(Attach);<br class="">+    g_vsc.SendJSON(CreateEvent("initialized"));<br class="">+    // SendThreadStoppedEvent();<br class="">+  }<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "ContinueRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Continue request; value of command field is 'continue'.<br class="">+//                     The request starts the debuggee to run again.",<br class="">+//     "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "continue" ]<br class="">+//       },<br class="">+//       "arguments": {<br class="">+//         "$ref": "#/definitions/ContinueArguments"<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command", "arguments"  ]<br class="">+//   }]<br class="">+// },<br class="">+// "ContinueArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'continue' request.",<br class="">+//   "properties": {<br class="">+//     "threadId": {<br class="">+//       "type": "integer",<br class="">+//       "description": "Continue execution for the specified thread (if<br class="">+//                       possible). If the backend cannot continue on a single<br class="">+//                       thread but will continue on all threads, it should<br class="">+//                       set the allThreadsContinued attribute in the response<br class="">+//                       to true."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "threadId" ]<br class="">+// },<br class="">+// "ContinueResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'continue' request.",<br class="">+//     "properties": {<br class="">+//       "body": {<br class="">+//         "type": "object",<br class="">+//         "properties": {<br class="">+//           "allThreadsContinued": {<br class="">+//             "type": "boolean",<br class="">+//             "description": "If true, the continue request has ignored the<br class="">+//                             specified thread and continued all threads<br class="">+//                             instead. If this attribute is missing a value<br class="">+//                             of 'true' is assumed for backward<br class="">+//                             compatibility."<br class="">+//           }<br class="">+//         }<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "body" ]<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_continue(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  FillResponse(request, response);<br class="">+  lldb::SBProcess process = g_vsc.target.GetProcess();<br class="">+  auto arguments = request.getObject("arguments");<br class="">+  // Remember the thread ID that caused the resume so we can set the<br class="">+  // "threadCausedFocus" boolean value in the "stopped" events.<br class="">+  g_vsc.focus_tid = GetUnsigned(arguments, "threadId", LLDB_INVALID_THREAD_ID);<br class="">+  lldb::SBError error = process.Continue();<br class="">+  llvm::json::Object body;<br class="">+  body.try_emplace("allThreadsContinued", true);<br class="">+  response.try_emplace("body", std::move(body));<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "ConfigurationDoneRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//             "type": "object",<br class="">+//             "description": "ConfigurationDone request; value of command field<br class="">+//             is 'configurationDone'.\nThe client of the debug protocol must<br class="">+//             send this request at the end of the sequence of configuration<br class="">+//             requests (which was started by the InitializedEvent).",<br class="">+//             "properties": {<br class="">+//             "command": {<br class="">+//             "type": "string",<br class="">+//             "enum": [ "configurationDone" ]<br class="">+//             },<br class="">+//             "arguments": {<br class="">+//             "$ref": "#/definitions/ConfigurationDoneArguments"<br class="">+//             }<br class="">+//             },<br class="">+//             "required": [ "command" ]<br class="">+//             }]<br class="">+// },<br class="">+// "ConfigurationDoneArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'configurationDone' request.\nThe<br class="">+//   configurationDone request has no standardized attributes."<br class="">+// },<br class="">+// "ConfigurationDoneResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//             "type": "object",<br class="">+//             "description": "Response to 'configurationDone' request. This is<br class="">+//             just an acknowledgement, so no body field is required."<br class="">+//             }]<br class="">+// },<br class="">+//----------------------------------------------------------------------<br class="">+void request_configurationDone(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  FillResponse(request, response);<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+  if (g_vsc.stop_at_entry)<br class="">+    SendThreadStoppedEvent();<br class="">+  else<br class="">+    g_vsc.target.GetProcess().Continue();<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "DisconnectRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Disconnect request; value of command field is<br class="">+//                     'disconnect'.",<br class="">+//     "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "disconnect" ]<br class="">+//       },<br class="">+//       "arguments": {<br class="">+//         "$ref": "#/definitions/DisconnectArguments"<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command" ]<br class="">+//   }]<br class="">+// },<br class="">+// "DisconnectArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'disconnect' request.",<br class="">+//   "properties": {<br class="">+//     "terminateDebuggee": {<br class="">+//       "type": "boolean",<br class="">+//       "description": "Indicates whether the debuggee should be terminated<br class="">+//                       when the debugger is disconnected. If unspecified,<br class="">+//                       the debug adapter is free to do whatever it thinks<br class="">+//                       is best. A client can only rely on this attribute<br class="">+//                       being properly honored if a debug adapter returns<br class="">+//                       true for the 'supportTerminateDebuggee' capability."<br class="">+//     },<br class="">+//     "restart": {<br class="">+//       "type": "boolean",<br class="">+//       "description": "Indicates whether the debuggee should be restart<br class="">+//                       the process."<br class="">+//     }<br class="">+//   }<br class="">+// },<br class="">+// "DisconnectResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'disconnect' request. This is just an<br class="">+//                     acknowledgement, so no body field is required."<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_disconnect(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  FillResponse(request, response);<br class="">+  auto arguments = request.getObject("arguments");<br class="">+<br class="">+  bool terminateDebuggee = GetBoolean(arguments, "terminateDebuggee", false);<br class="">+  lldb::SBProcess process = g_vsc.target.GetProcess();<br class="">+  auto state = process.GetState();<br class="">+<br class="">+  switch (state) {<br class="">+  case lldb::eStateInvalid:<br class="">+  case lldb::eStateUnloaded:<br class="">+  case lldb::eStateDetached:<br class="">+  case lldb::eStateExited:<br class="">+    break;<br class="">+  case lldb::eStateConnected:<br class="">+  case lldb::eStateAttaching:<br class="">+  case lldb::eStateLaunching:<br class="">+  case lldb::eStateStepping:<br class="">+  case lldb::eStateCrashed:<br class="">+  case lldb::eStateSuspended:<br class="">+  case lldb::eStateStopped:<br class="">+  case lldb::eStateRunning:<br class="">+    g_vsc.debugger.SetAsync(false);<br class="">+    if (terminateDebuggee)<br class="">+      process.Kill();<br class="">+    else<br class="">+      process.Detach();<br class="">+    g_vsc.debugger.SetAsync(true);<br class="">+    break;<br class="">+  }<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+  SendTerminatedEvent();<br class="">+  if (g_vsc.event_thread.joinable()) {<br class="">+    g_vsc.broadcaster.BroadcastEventByType(eBroadcastBitStopEventThread);<br class="">+    g_vsc.event_thread.join();<br class="">+  }<br class="">+}<br class="">+<br class="">+void request_exceptionInfo(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  FillResponse(request, response);<br class="">+  auto arguments = request.getObject("arguments");<br class="">+  llvm::json::Object body;<br class="">+  lldb::SBThread thread = g_vsc.GetLLDBThread(*arguments);<br class="">+  if (thread.IsValid()) {<br class="">+    auto stopReason = thread.GetStopReason();<br class="">+    if (stopReason == lldb::eStopReasonSignal)<br class="">+      body.try_emplace("exceptionId", "signal");<br class="">+    else if (stopReason == lldb::eStopReasonBreakpoint) {<br class="">+      ExceptionBreakpoint *exc_bp = g_vsc.GetExceptionBPFromStopReason(thread);<br class="">+      if (exc_bp) {<br class="">+        body.try_emplace("exceptionId", exc_bp->filter);<br class="">+        body.try_emplace("description", exc_bp->label);<br class="">+      } else {<br class="">+        body.try_emplace("exceptionId", "exception");<br class="">+      }<br class="">+    } else {<br class="">+      body.try_emplace("exceptionId", "exception");<br class="">+    }<br class="">+    if (!ObjectContainsKey(body, "description")) {<br class="">+      char description[1024];<br class="">+      if (thread.GetStopDescription(description, sizeof(description))) {<br class="">+        body.try_emplace("description", std::string(description));<br class="">+      }<br class="">+    }<br class="">+    body.try_emplace("breakMode", "always");<br class="">+    // auto excInfoCount = thread.GetStopReasonDataCount();<br class="">+    // for (auto i=0; i<excInfoCount; ++i) {<br class="">+    //   uint64_t exc_data = thread.GetStopReasonDataAtIndex(i);<br class="">+    // }<br class="">+  } else {<br class="">+    response.try_emplace("success", false);<br class="">+  }<br class="">+  response.try_emplace("body", std::move(body));<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+//  "EvaluateRequest": {<br class="">+//    "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//      "type": "object",<br class="">+//      "description": "Evaluate request; value of command field is 'evaluate'.<br class="">+//                      Evaluates the given expression in the context of the<br class="">+//                      top most stack frame. The expression has access to any<br class="">+//                      variables and arguments that are in scope.",<br class="">+//      "properties": {<br class="">+//        "command": {<br class="">+//          "type": "string",<br class="">+//          "enum": [ "evaluate" ]<br class="">+//        },<br class="">+//        "arguments": {<br class="">+//          "$ref": "#/definitions/EvaluateArguments"<br class="">+//        }<br class="">+//      },<br class="">+//      "required": [ "command", "arguments"  ]<br class="">+//    }]<br class="">+//  },<br class="">+//  "EvaluateArguments": {<br class="">+//    "type": "object",<br class="">+//    "description": "Arguments for 'evaluate' request.",<br class="">+//    "properties": {<br class="">+//      "expression": {<br class="">+//        "type": "string",<br class="">+//        "description": "The expression to evaluate."<br class="">+//      },<br class="">+//      "frameId": {<br class="">+//        "type": "integer",<br class="">+//        "description": "Evaluate the expression in the scope of this stack<br class="">+//                        frame. If not specified, the expression is evaluated<br class="">+//                        in the global scope."<br class="">+//      },<br class="">+//      "context": {<br class="">+//        "type": "string",<br class="">+//        "_enum": [ "watch", "repl", "hover" ],<br class="">+//        "enumDescriptions": [<br class="">+//          "evaluate is run in a watch.",<br class="">+//          "evaluate is run from REPL console.",<br class="">+//          "evaluate is run from a data hover."<br class="">+//        ],<br class="">+//        "description": "The context in which the evaluate request is run."<br class="">+//      },<br class="">+//      "format": {<br class="">+//        "$ref": "#/definitions/ValueFormat",<br class="">+//        "description": "Specifies details on how to format the Evaluate<br class="">+//                        result."<br class="">+//      }<br class="">+//    },<br class="">+//    "required": [ "expression" ]<br class="">+//  },<br class="">+//  "EvaluateResponse": {<br class="">+//    "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//      "type": "object",<br class="">+//      "description": "Response to 'evaluate' request.",<br class="">+//      "properties": {<br class="">+//        "body": {<br class="">+//          "type": "object",<br class="">+//          "properties": {<br class="">+//            "result": {<br class="">+//              "type": "string",<br class="">+//              "description": "The result of the evaluate request."<br class="">+//            },<br class="">+//            "type": {<br class="">+//              "type": "string",<br class="">+//              "description": "The optional type of the evaluate result."<br class="">+//            },<br class="">+//            "presentationHint": {<br class="">+//              "$ref": "#/definitions/VariablePresentationHint",<br class="">+//              "description": "Properties of a evaluate result that can be<br class="">+//                              used to determine how to render the result in<br class="">+//                              the UI."<br class="">+//            },<br class="">+//            "variablesReference": {<br class="">+//              "type": "number",<br class="">+//              "description": "If variablesReference is > 0, the evaluate<br class="">+//                              result is structured and its children can be<br class="">+//                              retrieved by passing variablesReference to the<br class="">+//                              VariablesRequest."<br class="">+//            },<br class="">+//            "namedVariables": {<br class="">+//              "type": "number",<br class="">+//              "description": "The number of named child variables. The<br class="">+//                              client can use this optional information to<br class="">+//                              present the variables in a paged UI and fetch<br class="">+//                              them in chunks."<br class="">+//            },<br class="">+//            "indexedVariables": {<br class="">+//              "type": "number",<br class="">+//              "description": "The number of indexed child variables. The<br class="">+//                              client can use this optional information to<br class="">+//                              present the variables in a paged UI and fetch<br class="">+//                              them in chunks."<br class="">+//            }<br class="">+//          },<br class="">+//          "required": [ "result", "variablesReference" ]<br class="">+//        }<br class="">+//      },<br class="">+//      "required": [ "body" ]<br class="">+//    }]<br class="">+//  }<br class="">+//----------------------------------------------------------------------<br class="">+void request_evaluate(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  FillResponse(request, response);<br class="">+  llvm::json::Object body;<br class="">+  auto arguments = request.getObject("arguments");<br class="">+  lldb::SBFrame frame = g_vsc.GetLLDBFrame(*arguments);<br class="">+  const auto expression = GetString(arguments, "expression");<br class="">+<br class="">+  if (!expression.empty() && expression[0] == '`') {<br class="">+    body.try_emplace("result",<br class="">+                     RunLLDBCommands(llvm::StringRef(),<br class="">+                                     {expression.substr(1)}));<br class="">+    body.try_emplace("variablesReference", (int64_t)0);<br class="">+  } else {<br class="">+    // Always try to get the answer from the local variables if possible. If<br class="">+    // this fails, then actually evaluate an expression using the expression<br class="">+    // parser. "frame variable" is more reliable than the expression parser in<br class="">+    // many cases and it is faster.<br class="">+    lldb::SBValue value = frame.GetValueForVariablePath(<br class="">+        expression.data(), lldb::eDynamicDontRunTarget);<br class="">+    if (value.GetError().Fail())<br class="">+      value = frame.EvaluateExpression(expression.data());<br class="">+    if (value.GetError().Fail()) {<br class="">+      response.try_emplace("success", false);<br class="">+      const char *error_cstr = value.GetError().GetCString();<br class="">+      if (error_cstr && error_cstr[0])<br class="">+        response.try_emplace("message", std::string(error_cstr));<br class="">+      else<br class="">+        response.try_emplace("message", "evaluate failed");<br class="">+    } else {<br class="">+      SetValueForKey(value, body, "result");<br class="">+      auto value_typename = value.GetType().GetDisplayTypeName();<br class="">+      body.try_emplace("type", value_typename ? value_typename : NO_TYPENAME);<br class="">+      if (value.MightHaveChildren()) {<br class="">+        auto variablesReference = VARIDX_TO_VARREF(g_vsc.variables.GetSize());<br class="">+        g_vsc.variables.Append(value);<br class="">+        body.try_emplace("variablesReference", variablesReference);<br class="">+      } else {<br class="">+        body.try_emplace("variablesReference", (int64_t)0);<br class="">+      }<br class="">+    }<br class="">+  }<br class="">+  response.try_emplace("body", std::move(body));<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "InitializeRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Initialize request; value of command field is<br class="">+//                     'initialize'.",<br class="">+//     "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "initialize" ]<br class="">+//       },<br class="">+//       "arguments": {<br class="">+//         "$ref": "#/definitions/InitializeRequestArguments"<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command", "arguments" ]<br class="">+//   }]<br class="">+// },<br class="">+// "InitializeRequestArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'initialize' request.",<br class="">+//   "properties": {<br class="">+//     "clientID": {<br class="">+//       "type": "string",<br class="">+//       "description": "The ID of the (frontend) client using this adapter."<br class="">+//     },<br class="">+//     "adapterID": {<br class="">+//       "type": "string",<br class="">+//       "description": "The ID of the debug adapter."<br class="">+//     },<br class="">+//     "locale": {<br class="">+//       "type": "string",<br class="">+//       "description": "The ISO-639 locale of the (frontend) client using<br class="">+//                       this adapter, e.g. en-US or de-CH."<br class="">+//     },<br class="">+//     "linesStartAt1": {<br class="">+//       "type": "boolean",<br class="">+//       "description": "If true all line numbers are 1-based (default)."<br class="">+//     },<br class="">+//     "columnsStartAt1": {<br class="">+//       "type": "boolean",<br class="">+//       "description": "If true all column numbers are 1-based (default)."<br class="">+//     },<br class="">+//     "pathFormat": {<br class="">+//       "type": "string",<br class="">+//       "_enum": [ "path", "uri" ],<br class="">+//       "description": "Determines in what format paths are specified. The<br class="">+//                       default is 'path', which is the native format."<br class="">+//     },<br class="">+//     "supportsVariableType": {<br class="">+//       "type": "boolean",<br class="">+//       "description": "Client supports the optional type attribute for<br class="">+//                       variables."<br class="">+//     },<br class="">+//     "supportsVariablePaging": {<br class="">+//       "type": "boolean",<br class="">+//       "description": "Client supports the paging of variables."<br class="">+//     },<br class="">+//     "supportsRunInTerminalRequest": {<br class="">+//       "type": "boolean",<br class="">+//       "description": "Client supports the runInTerminal request."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "adapterID" ]<br class="">+// },<br class="">+// "InitializeResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'initialize' request.",<br class="">+//     "properties": {<br class="">+//       "body": {<br class="">+//         "$ref": "#/definitions/Capabilities",<br class="">+//         "description": "The capabilities of this debug adapter."<br class="">+//       }<br class="">+//     }<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_initialize(const llvm::json::Object &request) {<br class="">+  g_vsc.debugger = lldb::SBDebugger::Create(true /*source_init_files*/);<br class="">+  // Create an empty target right away since we might get breakpoint requests<br class="">+  // before we are given an executable to launch in a "launch" request, or a<br class="">+  // executable when attaching to a process by process ID in a "attach"<br class="">+  // request.<br class="">+  FILE *out = fopen(dev_null_path, "w");<br class="">+  if (out) {<br class="">+    // Set the output and error file handles to redirect into nothing otherwise<br class="">+    // if any code in LLDB prints to the debugger file handles, the output and<br class="">+    // error file handles are initialized to STDOUT and STDERR and any output<br class="">+    // will kill our debug session.<br class="">+    g_vsc.debugger.SetOutputFileHandle(out, true);<br class="">+    g_vsc.debugger.SetErrorFileHandle(out, false);<br class="">+  }<br class="">+<br class="">+  g_vsc.target = g_vsc.debugger.CreateTarget(nullptr);<br class="">+  lldb::SBListener listener = g_vsc.debugger.GetListener();<br class="">+  listener.StartListeningForEvents(<br class="">+      g_vsc.target.GetBroadcaster(),<br class="">+      lldb::SBTarget::eBroadcastBitBreakpointChanged);<br class="">+  listener.StartListeningForEvents(g_vsc.broadcaster,<br class="">+                                   eBroadcastBitStopEventThread);<br class="">+  // Start our event thread so we can receive events from the debugger, target,<br class="">+  // process and more.<br class="">+  g_vsc.event_thread = std::thread(EventThreadFunction);<br class="">+<br class="">+  llvm::json::Object response;<br class="">+  FillResponse(request, response);<br class="">+  llvm::json::Object body;<br class="">+  // The debug adapter supports the configurationDoneRequest.<br class="">+  body.try_emplace("supportsConfigurationDoneRequest", true);<br class="">+  // The debug adapter supports function breakpoints.<br class="">+  body.try_emplace("supportsFunctionBreakpoints", true);<br class="">+  // The debug adapter supports conditional breakpoints.<br class="">+  body.try_emplace("supportsConditionalBreakpoints", true);<br class="">+  // The debug adapter supports breakpoints that break execution after a<br class="">+  // specified number of hits.<br class="">+  body.try_emplace("supportsHitConditionalBreakpoints", true);<br class="">+  // The debug adapter supports a (side effect free) evaluate request for<br class="">+  // data hovers.<br class="">+  body.try_emplace("supportsEvaluateForHovers", true);<br class="">+  // Available filters or options for the setExceptionBreakpoints request.<br class="">+  llvm::json::Array filters;<br class="">+  for (const auto &exc_bp : g_vsc.exception_breakpoints) {<br class="">+    filters.emplace_back(CreateExceptionBreakpointFilter(exc_bp));<br class="">+  }<br class="">+  body.try_emplace("exceptionBreakpointFilters", std::move(filters));<br class="">+  // The debug adapter supports stepping back via the stepBack and<br class="">+  // reverseContinue requests.<br class="">+  body.try_emplace("supportsStepBack", false);<br class="">+  // The debug adapter supports setting a variable to a value.<br class="">+  body.try_emplace("supportsSetVariable", true);<br class="">+  // The debug adapter supports restarting a frame.<br class="">+  body.try_emplace("supportsRestartFrame", false);<br class="">+  // The debug adapter supports the gotoTargetsRequest.<br class="">+  body.try_emplace("supportsGotoTargetsRequest", false);<br class="">+  // The debug adapter supports the stepInTargetsRequest.<br class="">+  body.try_emplace("supportsStepInTargetsRequest", false);<br class="">+  // The debug adapter supports the completionsRequest.<br class="">+  body.try_emplace("supportsCompletionsRequest", false);<br class="">+  // The debug adapter supports the modules request.<br class="">+  body.try_emplace("supportsModulesRequest", false);<br class="">+  // The set of additional module information exposed by the debug adapter.<br class="">+  //   body.try_emplace("additionalModuleColumns"] = ColumnDescriptor<br class="">+  // Checksum algorithms supported by the debug adapter.<br class="">+  //   body.try_emplace("supportedChecksumAlgorithms"] = ChecksumAlgorithm<br class="">+  // The debug adapter supports the RestartRequest. In this case a client<br class="">+  // should not implement 'restart' by terminating and relaunching the adapter<br class="">+  // but by calling the RestartRequest.<br class="">+  body.try_emplace("supportsRestartRequest", false);<br class="">+  // The debug adapter supports 'exceptionOptions' on the<br class="">+  // setExceptionBreakpoints request.<br class="">+  body.try_emplace("supportsExceptionOptions", true);<br class="">+  // The debug adapter supports a 'format' attribute on the stackTraceRequest,<br class="">+  // variablesRequest, and evaluateRequest.<br class="">+  body.try_emplace("supportsValueFormattingOptions", true);<br class="">+  // The debug adapter supports the exceptionInfo request.<br class="">+  body.try_emplace("supportsExceptionInfoRequest", true);<br class="">+  // The debug adapter supports the 'terminateDebuggee' attribute on the<br class="">+  // 'disconnect' request.<br class="">+  body.try_emplace("supportTerminateDebuggee", true);<br class="">+  // The debug adapter supports the delayed loading of parts of the stack,<br class="">+  // which requires that both the 'startFrame' and 'levels' arguments and the<br class="">+  // 'totalFrames' result of the 'StackTrace' request are supported.<br class="">+  body.try_emplace("supportsDelayedStackTraceLoading", true);<br class="">+  // The debug adapter supports the 'loadedSources' request.<br class="">+  body.try_emplace("supportsLoadedSourcesRequest", false);<br class="">+<br class="">+  response.try_emplace("body", std::move(body));<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "LaunchRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Launch request; value of command field is 'launch'.",<br class="">+//     "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "launch" ]<br class="">+//       },<br class="">+//       "arguments": {<br class="">+//         "$ref": "#/definitions/LaunchRequestArguments"<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command", "arguments"  ]<br class="">+//   }]<br class="">+// },<br class="">+// "LaunchRequestArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'launch' request.",<br class="">+//   "properties": {<br class="">+//     "noDebug": {<br class="">+//       "type": "boolean",<br class="">+//       "description": "If noDebug is true the launch request should launch<br class="">+//                       the program without enabling debugging."<br class="">+//     }<br class="">+//   }<br class="">+// },<br class="">+// "LaunchResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'launch' request. This is just an<br class="">+//                     acknowledgement, so no body field is required."<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_launch(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  lldb::SBError error;<br class="">+  FillResponse(request, response);<br class="">+  auto arguments = request.getObject("arguments");<br class="">+  g_vsc.init_commands = GetStrings(arguments, "initCommands");<br class="">+  g_vsc.pre_run_commands = GetStrings(arguments, "preRunCommands");<br class="">+  g_vsc.stop_commands = GetStrings(arguments, "stopCommands");<br class="">+  g_vsc.exit_commands = GetStrings(arguments, "exitCommands");<br class="">+  g_vsc.stop_at_entry = GetBoolean(arguments, "stopOnEntry", false);<br class="">+  const auto debuggerRoot = GetString(arguments, "debuggerRoot");<br class="">+<br class="">+  // This is a hack for loading DWARF in .o files on Mac where the .o files<br class="">+  // in the debug map of the main executable have relative paths which require<br class="">+  // the lldb-vscode binary to have its working directory set to that relative<br class="">+  // root for the .o files in order to be able to load debug info.<br class="">+  if (!debuggerRoot.empty()) {<br class="">+    llvm::sys::fs::set_current_path(debuggerRoot.data());<br class="">+  }<br class="">+<br class="">+  SetSourceMapFromArguments(*arguments);<br class="">+<br class="">+  // Run any initialize LLDB commands the user specified in the launch.json<br class="">+  g_vsc.RunInitCommands();<br class="">+<br class="">+  // Grab the current working directory if there is one and set it in the<br class="">+  // launch info.<br class="">+  const auto cwd = GetString(arguments, "cwd");<br class="">+  if (!cwd.empty())<br class="">+    g_vsc.launch_info.SetWorkingDirectory(cwd.data());<br class="">+<br class="">+  // Grab the name of the program we need to debug and set it as the first<br class="">+  // argument that will be passed to the program we will debug.<br class="">+  const auto program = GetString(arguments, "program");<br class="">+  if (!program.empty()) {<br class="">+    lldb::SBFileSpec program_fspec(program.data(), true /*resolve_path*/);<br class="">+<br class="">+    g_vsc.launch_info.SetExecutableFile(program_fspec,<br class="">+                                        true /*add_as_first_arg*/);<br class="">+    const char *target_triple = nullptr;<br class="">+    const char *uuid_cstr = nullptr;<br class="">+    // Stand alone debug info file if different from executable<br class="">+    const char *symfile = nullptr;<br class="">+    g_vsc.target.AddModule(program.data(), target_triple, uuid_cstr, symfile);<br class="">+    if (error.Fail()) {<br class="">+      response.try_emplace("success", false);<br class="">+      response.try_emplace("message", std::string(error.GetCString()));<br class="">+      g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+    }<br class="">+  }<br class="">+<br class="">+  // Extract any extra arguments and append them to our program arguments for<br class="">+  // when we launch<br class="">+  auto args = GetStrings(arguments, "args");<br class="">+  if (!args.empty())<br class="">+    g_vsc.launch_info.SetArguments(MakeArgv(args).data(), true);<br class="">+<br class="">+  // Pass any environment variables along that the user specified.<br class="">+  auto envs = GetStrings(arguments, "env");<br class="">+  if (!envs.empty())<br class="">+    g_vsc.launch_info.SetEnvironmentEntries(MakeArgv(envs).data(), true);<br class="">+<br class="">+  auto flags = g_vsc.launch_info.GetLaunchFlags();<br class="">+<br class="">+  if (GetBoolean(arguments, "disableASLR", true))<br class="">+    flags |= lldb::eLaunchFlagDisableASLR;<br class="">+  if (GetBoolean(arguments, "disableSTDIO", false))<br class="">+    flags |= lldb::eLaunchFlagDisableSTDIO;<br class="">+  if (GetBoolean(arguments, "shellExpandArguments", false))<br class="">+    flags |= lldb::eLaunchFlagShellExpandArguments;<br class="">+  const bool detatchOnError = GetBoolean(arguments, "detachOnError", false);<br class="">+  g_vsc.launch_info.SetDetachOnError(detatchOnError);<br class="">+  g_vsc.launch_info.SetLaunchFlags(flags | lldb::eLaunchFlagDebug |<br class="">+                                   lldb::eLaunchFlagStopAtEntry);<br class="">+<br class="">+  // Run any pre run LLDB commands the user specified in the launch.json<br class="">+  g_vsc.RunPreRunCommands();<br class="">+<br class="">+  // Disable async events so the launch will be successful when we return from<br class="">+  // the launch call and the launch will happen synchronously<br class="">+  g_vsc.debugger.SetAsync(false);<br class="">+  g_vsc.target.Launch(g_vsc.launch_info, error);<br class="">+  if (error.Fail()) {<br class="">+    response.try_emplace("success", false);<br class="">+    response.try_emplace("message", std::string(error.GetCString()));<br class="">+  }<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+<br class="">+  SendProcessEvent(Launch);<br class="">+  g_vsc.SendJSON(llvm::json::Value(CreateEvent("initialized")));<br class="">+  // Reenable async events and start the event thread to catch async events.<br class="">+  g_vsc.debugger.SetAsync(true);<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "NextRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Next request; value of command field is 'next'. The<br class="">+//                     request starts the debuggee to run again for one step.<br class="">+//                     The debug adapter first sends the NextResponse and then<br class="">+//                     a StoppedEvent (event type 'step') after the step has<br class="">+//                     completed.",<br class="">+//     "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "next" ]<br class="">+//       },<br class="">+//       "arguments": {<br class="">+//         "$ref": "#/definitions/NextArguments"<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command", "arguments"  ]<br class="">+//   }]<br class="">+// },<br class="">+// "NextArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'next' request.",<br class="">+//   "properties": {<br class="">+//     "threadId": {<br class="">+//       "type": "integer",<br class="">+//       "description": "Execute 'next' for this thread."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "threadId" ]<br class="">+// },<br class="">+// "NextResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'next' request. This is just an<br class="">+//                     acknowledgement, so no body field is required."<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_next(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  FillResponse(request, response);<br class="">+  auto arguments = request.getObject("arguments");<br class="">+  lldb::SBThread thread = g_vsc.GetLLDBThread(*arguments);<br class="">+  if (thread.IsValid()) {<br class="">+    // Remember the thread ID that caused the resume so we can set the<br class="">+    // "threadCausedFocus" boolean value in the "stopped" events.<br class="">+    g_vsc.focus_tid = thread.GetThreadID();<br class="">+    thread.StepOver();<br class="">+  } else {<br class="">+    response.try_emplace("success", false);<br class="">+  }<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "PauseRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Pause request; value of command field is 'pause'. The<br class="">+//     request suspenses the debuggee. The debug adapter first sends the<br class="">+//     PauseResponse and then a StoppedEvent (event type 'pause') after the<br class="">+//     thread has been paused successfully.", "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "pause" ]<br class="">+//       },<br class="">+//       "arguments": {<br class="">+//         "$ref": "#/definitions/PauseArguments"<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command", "arguments"  ]<br class="">+//   }]<br class="">+// },<br class="">+// "PauseArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'pause' request.",<br class="">+//   "properties": {<br class="">+//     "threadId": {<br class="">+//       "type": "integer",<br class="">+//       "description": "Pause execution for this thread."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "threadId" ]<br class="">+// },<br class="">+// "PauseResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'pause' request. This is just an<br class="">+//     acknowledgement, so no body field is required."<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_pause(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  FillResponse(request, response);<br class="">+  lldb::SBProcess process = g_vsc.target.GetProcess();<br class="">+  lldb::SBError error = process.Stop();<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "ScopesRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Scopes request; value of command field is 'scopes'. The<br class="">+//     request returns the variable scopes for a given stackframe ID.",<br class="">+//     "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "scopes" ]<br class="">+//       },<br class="">+//       "arguments": {<br class="">+//         "$ref": "#/definitions/ScopesArguments"<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command", "arguments"  ]<br class="">+//   }]<br class="">+// },<br class="">+// "ScopesArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'scopes' request.",<br class="">+//   "properties": {<br class="">+//     "frameId": {<br class="">+//       "type": "integer",<br class="">+//       "description": "Retrieve the scopes for this stackframe."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "frameId" ]<br class="">+// },<br class="">+// "ScopesResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'scopes' request.",<br class="">+//     "properties": {<br class="">+//       "body": {<br class="">+//         "type": "object",<br class="">+//         "properties": {<br class="">+//           "scopes": {<br class="">+//             "type": "array",<br class="">+//             "items": {<br class="">+//               "$ref": "#/definitions/Scope"<br class="">+//             },<br class="">+//             "description": "The scopes of the stackframe. If the array has<br class="">+//             length zero, there are no scopes available."<br class="">+//           }<br class="">+//         },<br class="">+//         "required": [ "scopes" ]<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "body" ]<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_scopes(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  FillResponse(request, response);<br class="">+  llvm::json::Object body;<br class="">+  auto arguments = request.getObject("arguments");<br class="">+  lldb::SBFrame frame = g_vsc.GetLLDBFrame(*arguments);<br class="">+  g_vsc.variables.Clear();<br class="">+  g_vsc.variables.Append(frame.GetVariables(true,   // arguments<br class="">+                                            true,   // locals<br class="">+                                            false,  // statics<br class="">+                                            true)); // in_scope_only<br class="">+  g_vsc.num_locals = g_vsc.variables.GetSize();<br class="">+  g_vsc.variables.Append(frame.GetVariables(false,  // arguments<br class="">+                                            false,  // locals<br class="">+                                            true,   // statics<br class="">+                                            true)); // in_scope_only<br class="">+  g_vsc.num_globals = g_vsc.variables.GetSize() - (g_vsc.num_locals);<br class="">+  g_vsc.variables.Append(frame.GetRegisters());<br class="">+  g_vsc.num_regs =<br class="">+      g_vsc.variables.GetSize() - (g_vsc.num_locals + g_vsc.num_globals);<br class="">+  body.try_emplace("scopes", g_vsc.CreateTopLevelScopes());<br class="">+  response.try_emplace("body", std::move(body));<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "SetBreakpointsRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "SetBreakpoints request; value of command field is<br class="">+//     'setBreakpoints'. Sets multiple breakpoints for a single source and<br class="">+//     clears all previous breakpoints in that source. To clear all breakpoint<br class="">+//     for a source, specify an empty array. When a breakpoint is hit, a<br class="">+//     StoppedEvent (event type 'breakpoint') is generated.", "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "setBreakpoints" ]<br class="">+//       },<br class="">+//       "arguments": {<br class="">+//         "$ref": "#/definitions/SetBreakpointsArguments"<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command", "arguments"  ]<br class="">+//   }]<br class="">+// },<br class="">+// "SetBreakpointsArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'setBreakpoints' request.",<br class="">+//   "properties": {<br class="">+//     "source": {<br class="">+//       "$ref": "#/definitions/Source",<br class="">+//       "description": "The source location of the breakpoints; either<br class="">+//       source.path or source.reference must be specified."<br class="">+//     },<br class="">+//     "breakpoints": {<br class="">+//       "type": "array",<br class="">+//       "items": {<br class="">+//         "$ref": "#/definitions/SourceBreakpoint"<br class="">+//       },<br class="">+//       "description": "The code locations of the breakpoints."<br class="">+//     },<br class="">+//     "lines": {<br class="">+//       "type": "array",<br class="">+//       "items": {<br class="">+//         "type": "integer"<br class="">+//       },<br class="">+//       "description": "Deprecated: The code locations of the breakpoints."<br class="">+//     },<br class="">+//     "sourceModified": {<br class="">+//       "type": "boolean",<br class="">+//       "description": "A value of true indicates that the underlying source<br class="">+//       has been modified which results in new breakpoint locations."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "source" ]<br class="">+// },<br class="">+// "SetBreakpointsResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'setBreakpoints' request. Returned is<br class="">+//     information about each breakpoint created by this request. This includes<br class="">+//     the actual code location and whether the breakpoint could be verified.<br class="">+//     The breakpoints returned are in the same order as the elements of the<br class="">+//     'breakpoints' (or the deprecated 'lines') in the<br class="">+//     SetBreakpointsArguments.", "properties": {<br class="">+//       "body": {<br class="">+//         "type": "object",<br class="">+//         "properties": {<br class="">+//           "breakpoints": {<br class="">+//             "type": "array",<br class="">+//             "items": {<br class="">+//               "$ref": "#/definitions/Breakpoint"<br class="">+//             },<br class="">+//             "description": "Information about the breakpoints. The array<br class="">+//             elements are in the same order as the elements of the<br class="">+//             'breakpoints' (or the deprecated 'lines') in the<br class="">+//             SetBreakpointsArguments."<br class="">+//           }<br class="">+//         },<br class="">+//         "required": [ "breakpoints" ]<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "body" ]<br class="">+//   }]<br class="">+// },<br class="">+// "SourceBreakpoint": {<br class="">+//   "type": "object",<br class="">+//   "description": "Properties of a breakpoint or logpoint passed to the<br class="">+//   setBreakpoints request.", "properties": {<br class="">+//     "line": {<br class="">+//       "type": "integer",<br class="">+//       "description": "The source line of the breakpoint or logpoint."<br class="">+//     },<br class="">+//     "column": {<br class="">+//       "type": "integer",<br class="">+//       "description": "An optional source column of the breakpoint."<br class="">+//     },<br class="">+//     "condition": {<br class="">+//       "type": "string",<br class="">+//       "description": "An optional expression for conditional breakpoints."<br class="">+//     },<br class="">+//     "hitCondition": {<br class="">+//       "type": "string",<br class="">+//       "description": "An optional expression that controls how many hits of<br class="">+//       the breakpoint are ignored. The backend is expected to interpret the<br class="">+//       expression as needed."<br class="">+//     },<br class="">+//     "logMessage": {<br class="">+//       "type": "string",<br class="">+//       "description": "If this attribute exists and is non-empty, the backend<br class="">+//       must not 'break' (stop) but log the message instead. Expressions within<br class="">+//       {} are interpolated."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "line" ]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_setBreakpoints(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  lldb::SBError error;<br class="">+  FillResponse(request, response);<br class="">+  auto arguments = request.getObject("arguments");<br class="">+  auto source = arguments->getObject("source");<br class="">+  const auto path = GetString(source, "path");<br class="">+  auto breakpoints = arguments->getArray("breakpoints");<br class="">+  llvm::json::Array response_breakpoints;<br class="">+  // Decode the source breakpoint infos for this "setBreakpoints" request<br class="">+  SourceBreakpointMap request_bps;<br class="">+  for (const auto &bp : *breakpoints) {<br class="">+    auto bp_obj = bp.getAsObject();<br class="">+    if (bp_obj) {<br class="">+      SourceBreakpoint src_bp(*bp_obj);<br class="">+      request_bps[src_bp.line] = std::move(src_bp);<br class="">+    }<br class="">+  }<br class="">+<br class="">+  // See if we already have breakpoints set for this source file from a<br class="">+  // previous "setBreakpoints" request<br class="">+  auto old_src_bp_pos = g_vsc.source_breakpoints.find(path);<br class="">+  if (old_src_bp_pos != g_vsc.source_breakpoints.end()) {<br class="">+<br class="">+    // We have already set breakpoints in this source file and they are giving<br class="">+    // use a new list of lines to set breakpoints on. Some breakpoints might<br class="">+    // already be set, and some might not. We need to remove any breakpoints<br class="">+    // whose lines are not contained in the any breakpoints lines in in the<br class="">+    // "breakpoints" array.<br class="">+<br class="">+    // Delete any breakpoints in this source file that aren't in the<br class="">+    // request_bps set. There is no call to remove breakpoints other than<br class="">+    // calling this function with a smaller or empty "breakpoints" list.<br class="">+    std::vector<uint32_t> remove_lines;<br class="">+    for (auto &pair: old_src_bp_pos->second) {<br class="">+      auto request_pos = request_bps.find(pair.first);<br class="">+      if (request_pos == request_bps.end()) {<br class="">+        // This breakpoint no longer exists in this source file, delete it<br class="">+        g_vsc.target.BreakpointDelete(pair.second.bp.GetID());<br class="">+        remove_lines.push_back(pair.first);<br class="">+      } else {<br class="">+        pair.second.UpdateBreakpoint(request_pos->second);<br class="">+        // Remove this breakpopint from the request breakpoints since we have<br class="">+        // handled it here and we don't need to set a new breakpoint below.<br class="">+        request_bps.erase(request_pos);<br class="">+        // Add this breakpoint info to the response<br class="">+        AppendBreakpoint(pair.second.bp, response_breakpoints);<br class="">+      }<br class="">+    }<br class="">+    // Remove any lines from this existing source breakpoint map<br class="">+    for (auto line: remove_lines)<br class="">+     old_src_bp_pos->second.erase(line);<br class="">+<br class="">+    // Now add any breakpoint infos left over in request_bps are the<br class="">+    // breakpoints that weren't set in this source file yet. We need to update<br class="">+    // thread source breakpoint info for the source file in the variable<br class="">+    // "old_src_bp_pos->second" so the info for this source file is up to date.<br class="">+    for (auto &pair : request_bps) {<br class="">+      pair.second.SetBreakpoint(path.data());<br class="">+      // Add this breakpoint info to the response<br class="">+      AppendBreakpoint(pair.second.bp, response_breakpoints);<br class="">+      old_src_bp_pos->second[pair.first] = std::move(pair.second);<br class="">+    }<br class="">+  } else {<br class="">+    // No breakpoints were set for this source file yet. Set all breakpoints<br class="">+    // for each line and add them to the response and create an entry in<br class="">+    // g_vsc.source_breakpoints for this source file.<br class="">+    for (auto &pair : request_bps) {<br class="">+      pair.second.SetBreakpoint(path.data());<br class="">+      // Add this breakpoint info to the response<br class="">+      AppendBreakpoint(pair.second.bp, response_breakpoints);<br class="">+    }<br class="">+    g_vsc.source_breakpoints[path] = std::move(request_bps);<br class="">+  }<br class="">+<br class="">+  llvm::json::Object body;<br class="">+  body.try_emplace("breakpoints", std::move(response_breakpoints));<br class="">+  response.try_emplace("body", std::move(body));<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "SetExceptionBreakpointsRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "SetExceptionBreakpoints request; value of command field<br class="">+//     is 'setExceptionBreakpoints'. The request configures the debuggers<br class="">+//     response to thrown exceptions. If an exception is configured to break, a<br class="">+//     StoppedEvent is fired (event type 'exception').", "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "setExceptionBreakpoints" ]<br class="">+//       },<br class="">+//       "arguments": {<br class="">+//         "$ref": "#/definitions/SetExceptionBreakpointsArguments"<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command", "arguments"  ]<br class="">+//   }]<br class="">+// },<br class="">+// "SetExceptionBreakpointsArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'setExceptionBreakpoints' request.",<br class="">+//   "properties": {<br class="">+//     "filters": {<br class="">+//       "type": "array",<br class="">+//       "items": {<br class="">+//         "type": "string"<br class="">+//       },<br class="">+//       "description": "IDs of checked exception options. The set of IDs is<br class="">+//       returned via the 'exceptionBreakpointFilters' capability."<br class="">+//     },<br class="">+//     "exceptionOptions": {<br class="">+//       "type": "array",<br class="">+//       "items": {<br class="">+//         "$ref": "#/definitions/ExceptionOptions"<br class="">+//       },<br class="">+//       "description": "Configuration options for selected exceptions."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "filters" ]<br class="">+// },<br class="">+// "SetExceptionBreakpointsResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'setExceptionBreakpoints' request. This is<br class="">+//     just an acknowledgement, so no body field is required."<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_setExceptionBreakpoints(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  lldb::SBError error;<br class="">+  FillResponse(request, response);<br class="">+  auto arguments = request.getObject("arguments");<br class="">+  auto filters = arguments->getArray("filters");<br class="">+  // Keep a list of any exception breakpoint filter names that weren't set<br class="">+  // so we can clear any exception breakpoints if needed.<br class="">+  std::set<std::string> unset_filters;<br class="">+  for (const auto &bp : g_vsc.exception_breakpoints)<br class="">+    unset_filters.insert(bp.filter);<br class="">+<br class="">+  for (const auto &value : *filters) {<br class="">+    const auto filter = GetAsString(value);<br class="">+    auto exc_bp = g_vsc.GetExceptionBreakpoint(filter);<br class="">+    if (exc_bp) {<br class="">+      exc_bp->SetBreakpoint();<br class="">+      unset_filters.erase(filter);<br class="">+    }<br class="">+  }<br class="">+  for (const auto &filter : unset_filters) {<br class="">+    auto exc_bp = g_vsc.GetExceptionBreakpoint(filter);<br class="">+    if (exc_bp)<br class="">+      exc_bp->ClearBreakpoint();<br class="">+  }<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "SetFunctionBreakpointsRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "SetFunctionBreakpoints request; value of command field is<br class="">+//     'setFunctionBreakpoints'. Sets multiple function breakpoints and clears<br class="">+//     all previous function breakpoints. To clear all function breakpoint,<br class="">+//     specify an empty array. When a function breakpoint is hit, a StoppedEvent<br class="">+//     (event type 'function breakpoint') is generated.", "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "setFunctionBreakpoints" ]<br class="">+//       },<br class="">+//       "arguments": {<br class="">+//         "$ref": "#/definitions/SetFunctionBreakpointsArguments"<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command", "arguments"  ]<br class="">+//   }]<br class="">+// },<br class="">+// "SetFunctionBreakpointsArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'setFunctionBreakpoints' request.",<br class="">+//   "properties": {<br class="">+//     "breakpoints": {<br class="">+//       "type": "array",<br class="">+//       "items": {<br class="">+//         "$ref": "#/definitions/FunctionBreakpoint"<br class="">+//       },<br class="">+//       "description": "The function names of the breakpoints."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "breakpoints" ]<br class="">+// },<br class="">+// "FunctionBreakpoint": {<br class="">+//   "type": "object",<br class="">+//   "description": "Properties of a breakpoint passed to the<br class="">+//   setFunctionBreakpoints request.", "properties": {<br class="">+//     "name": {<br class="">+//       "type": "string",<br class="">+//       "description": "The name of the function."<br class="">+//     },<br class="">+//     "condition": {<br class="">+//       "type": "string",<br class="">+//       "description": "An optional expression for conditional breakpoints."<br class="">+//     },<br class="">+//     "hitCondition": {<br class="">+//       "type": "string",<br class="">+//       "description": "An optional expression that controls how many hits of<br class="">+//       the breakpoint are ignored. The backend is expected to interpret the<br class="">+//       expression as needed."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "name" ]<br class="">+// },<br class="">+// "SetFunctionBreakpointsResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'setFunctionBreakpoints' request. Returned is<br class="">+//     information about each breakpoint created by this request.",<br class="">+//     "properties": {<br class="">+//       "body": {<br class="">+//         "type": "object",<br class="">+//         "properties": {<br class="">+//           "breakpoints": {<br class="">+//             "type": "array",<br class="">+//             "items": {<br class="">+//               "$ref": "#/definitions/Breakpoint"<br class="">+//             },<br class="">+//             "description": "Information about the breakpoints. The array<br class="">+//             elements correspond to the elements of the 'breakpoints' array."<br class="">+//           }<br class="">+//         },<br class="">+//         "required": [ "breakpoints" ]<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "body" ]<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_setFunctionBreakpoints(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  lldb::SBError error;<br class="">+  FillResponse(request, response);<br class="">+  auto arguments = request.getObject("arguments");<br class="">+  auto breakpoints = arguments->getArray("breakpoints");<br class="">+  FunctionBreakpointMap request_bps;<br class="">+  llvm::json::Array response_breakpoints;<br class="">+  for (const auto &value : *breakpoints) {<br class="">+    auto bp_obj = value.getAsObject();<br class="">+    if (bp_obj == nullptr)<br class="">+      continue;<br class="">+    FunctionBreakpoint func_bp(*bp_obj);<br class="">+    request_bps[func_bp.functionName] = std::move(func_bp);<br class="">+  }<br class="">+<br class="">+  std::vector<llvm::StringRef> remove_names;<br class="">+  // Disable any function breakpoints that aren't in the request_bps.<br class="">+  // There is no call to remove function breakpoints other than calling this<br class="">+  // function with a smaller or empty "breakpoints" list.<br class="">+  for (auto &pair: g_vsc.function_breakpoints) {<br class="">+    auto request_pos = request_bps.find(pair.first());<br class="">+    if (request_pos == request_bps.end()) {<br class="">+      // This function breakpoint no longer exists delete it from LLDB<br class="">+      g_vsc.target.BreakpointDelete(pair.second.bp.GetID());<br class="">+      remove_names.push_back(pair.first());<br class="">+    } else {<br class="">+      // Update the existing breakpoint as any setting withing the function<br class="">+      // breakpoint might have changed.<br class="">+      pair.second.UpdateBreakpoint(request_pos->second);<br class="">+      // Remove this breakpopint from the request breakpoints since we have<br class="">+      // handled it here and we don't need to set a new breakpoint below.<br class="">+      request_bps.erase(request_pos);<br class="">+      // Add this breakpoint info to the response<br class="">+      AppendBreakpoint(pair.second.bp, response_breakpoints);<br class="">+    }<br class="">+  }<br class="">+  // Remove any breakpoints that are no longer in our list<br class="">+  for (const auto &name: remove_names)<br class="">+    g_vsc.function_breakpoints.erase(name);<br class="">+<br class="">+  // Any breakpoints that are left in "request_bps" are breakpoints that<br class="">+  // need to be set.<br class="">+  for (auto &pair : request_bps) {<br class="">+    pair.second.SetBreakpoint();<br class="">+    // Add this breakpoint info to the response<br class="">+    AppendBreakpoint(pair.second.bp, response_breakpoints);<br class="">+    g_vsc.function_breakpoints[pair.first()] = std::move(pair.second);<br class="">+  }<br class="">+<br class="">+  llvm::json::Object body;<br class="">+  body.try_emplace("breakpoints", std::move(response_breakpoints));<br class="">+  response.try_emplace("body", std::move(body));<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "SourceRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Source request; value of command field is 'source'. The<br class="">+//     request retrieves the source code for a given source reference.",<br class="">+//     "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "source" ]<br class="">+//       },<br class="">+//       "arguments": {<br class="">+//         "$ref": "#/definitions/SourceArguments"<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command", "arguments"  ]<br class="">+//   }]<br class="">+// },<br class="">+// "SourceArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'source' request.",<br class="">+//   "properties": {<br class="">+//     "source": {<br class="">+//       "$ref": "#/definitions/Source",<br class="">+//       "description": "Specifies the source content to load. Either<br class="">+//       source.path or source.sourceReference must be specified."<br class="">+//     },<br class="">+//     "sourceReference": {<br class="">+//       "type": "integer",<br class="">+//       "description": "The reference to the source. This is the same as<br class="">+//       source.sourceReference. This is provided for backward compatibility<br class="">+//       since old backends do not understand the 'source' attribute."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "sourceReference" ]<br class="">+// },<br class="">+// "SourceResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'source' request.",<br class="">+//     "properties": {<br class="">+//       "body": {<br class="">+//         "type": "object",<br class="">+//         "properties": {<br class="">+//           "content": {<br class="">+//             "type": "string",<br class="">+//             "description": "Content of the source reference."<br class="">+//           },<br class="">+//           "mimeType": {<br class="">+//             "type": "string",<br class="">+//             "description": "Optional content type (mime type) of the source."<br class="">+//           }<br class="">+//         },<br class="">+//         "required": [ "content" ]<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "body" ]<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_source(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  FillResponse(request, response);<br class="">+  llvm::json::Object body;<br class="">+<br class="">+  auto arguments = request.getObject("arguments");<br class="">+  auto source = arguments->getObject("source");<br class="">+  auto sourceReference = GetSigned(source, "sourceReference", -1);<br class="">+  auto pos = g_vsc.source_map.find((lldb::addr_t)sourceReference);<br class="">+  if (pos != g_vsc.source_map.end()) {<br class="">+    body.try_emplace("content", pos->second.content);<br class="">+  } else {<br class="">+    response.try_emplace("success", false);<br class="">+  }<br class="">+  response.try_emplace("body", std::move(body));<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "StackTraceRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "StackTrace request; value of command field is<br class="">+//     'stackTrace'. The request returns a stacktrace from the current execution<br class="">+//     state.", "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "stackTrace" ]<br class="">+//       },<br class="">+//       "arguments": {<br class="">+//         "$ref": "#/definitions/StackTraceArguments"<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command", "arguments"  ]<br class="">+//   }]<br class="">+// },<br class="">+// "StackTraceArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'stackTrace' request.",<br class="">+//   "properties": {<br class="">+//     "threadId": {<br class="">+//       "type": "integer",<br class="">+//       "description": "Retrieve the stacktrace for this thread."<br class="">+//     },<br class="">+//     "startFrame": {<br class="">+//       "type": "integer",<br class="">+//       "description": "The index of the first frame to return; if omitted<br class="">+//       frames start at 0."<br class="">+//     },<br class="">+//     "levels": {<br class="">+//       "type": "integer",<br class="">+//       "description": "The maximum number of frames to return. If levels is<br class="">+//       not specified or 0, all frames are returned."<br class="">+//     },<br class="">+//     "format": {<br class="">+//       "$ref": "#/definitions/StackFrameFormat",<br class="">+//       "description": "Specifies details on how to format the stack frames."<br class="">+//     }<br class="">+//  },<br class="">+//   "required": [ "threadId" ]<br class="">+// },<br class="">+// "StackTraceResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'stackTrace' request.",<br class="">+//     "properties": {<br class="">+//       "body": {<br class="">+//         "type": "object",<br class="">+//         "properties": {<br class="">+//           "stackFrames": {<br class="">+//             "type": "array",<br class="">+//             "items": {<br class="">+//               "$ref": "#/definitions/StackFrame"<br class="">+//             },<br class="">+//             "description": "The frames of the stackframe. If the array has<br class="">+//             length zero, there are no stackframes available. This means that<br class="">+//             there is no location information available."<br class="">+//           },<br class="">+//           "totalFrames": {<br class="">+//             "type": "integer",<br class="">+//             "description": "The total number of frames available."<br class="">+//           }<br class="">+//         },<br class="">+//         "required": [ "stackFrames" ]<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "body" ]<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_stackTrace(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  FillResponse(request, response);<br class="">+  lldb::SBError error;<br class="">+  auto arguments = request.getObject("arguments");<br class="">+  lldb::SBThread thread = g_vsc.GetLLDBThread(*arguments);<br class="">+  llvm::json::Array stackFrames;<br class="">+  llvm::json::Object body;<br class="">+<br class="">+  if (thread.IsValid()) {<br class="">+    const auto startFrame = GetUnsigned(arguments, "startFrame", 0);<br class="">+    const auto levels = GetUnsigned(arguments, "levels", 0);<br class="">+    const auto endFrame = (levels == 0) ? INT64_MAX : (startFrame + levels);<br class="">+    for (uint32_t i = startFrame; i < endFrame; ++i) {<br class="">+      auto frame = thread.GetFrameAtIndex(i);<br class="">+      if (!frame.IsValid())<br class="">+        break;<br class="">+      stackFrames.emplace_back(CreateStackFrame(frame));<br class="">+    }<br class="">+  }<br class="">+  body.try_emplace("stackFrames", std::move(stackFrames));<br class="">+  response.try_emplace("body", std::move(body));<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "StepInRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "StepIn request; value of command field is 'stepIn'. The<br class="">+//     request starts the debuggee to step into a function/method if possible.<br class="">+//     If it cannot step into a target, 'stepIn' behaves like 'next'. The debug<br class="">+//     adapter first sends the StepInResponse and then a StoppedEvent (event<br class="">+//     type 'step') after the step has completed. If there are multiple<br class="">+//     function/method calls (or other targets) on the source line, the optional<br class="">+//     argument 'targetId' can be used to control into which target the 'stepIn'<br class="">+//     should occur. The list of possible targets for a given source line can be<br class="">+//     retrieved via the 'stepInTargets' request.", "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "stepIn" ]<br class="">+//       },<br class="">+//       "arguments": {<br class="">+//         "$ref": "#/definitions/StepInArguments"<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command", "arguments"  ]<br class="">+//   }]<br class="">+// },<br class="">+// "StepInArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'stepIn' request.",<br class="">+//   "properties": {<br class="">+//     "threadId": {<br class="">+//       "type": "integer",<br class="">+//       "description": "Execute 'stepIn' for this thread."<br class="">+//     },<br class="">+//     "targetId": {<br class="">+//       "type": "integer",<br class="">+//       "description": "Optional id of the target to step into."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "threadId" ]<br class="">+// },<br class="">+// "StepInResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'stepIn' request. This is just an<br class="">+//     acknowledgement, so no body field is required."<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_stepIn(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  FillResponse(request, response);<br class="">+  auto arguments = request.getObject("arguments");<br class="">+  lldb::SBThread thread = g_vsc.GetLLDBThread(*arguments);<br class="">+  if (thread.IsValid()) {<br class="">+    // Remember the thread ID that caused the resume so we can set the<br class="">+    // "threadCausedFocus" boolean value in the "stopped" events.<br class="">+    g_vsc.focus_tid = thread.GetThreadID();<br class="">+    thread.StepInto();<br class="">+  } else {<br class="">+    response.try_emplace("success", false);<br class="">+  }<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "StepOutRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "StepOut request; value of command field is 'stepOut'. The<br class="">+//     request starts the debuggee to run again for one step. The debug adapter<br class="">+//     first sends the StepOutResponse and then a StoppedEvent (event type<br class="">+//     'step') after the step has completed.", "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "stepOut" ]<br class="">+//       },<br class="">+//       "arguments": {<br class="">+//         "$ref": "#/definitions/StepOutArguments"<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command", "arguments"  ]<br class="">+//   }]<br class="">+// },<br class="">+// "StepOutArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'stepOut' request.",<br class="">+//   "properties": {<br class="">+//     "threadId": {<br class="">+//       "type": "integer",<br class="">+//       "description": "Execute 'stepOut' for this thread."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "threadId" ]<br class="">+// },<br class="">+// "StepOutResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'stepOut' request. This is just an<br class="">+//     acknowledgement, so no body field is required."<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_stepOut(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  FillResponse(request, response);<br class="">+  auto arguments = request.getObject("arguments");<br class="">+  lldb::SBThread thread = g_vsc.GetLLDBThread(*arguments);<br class="">+  if (thread.IsValid()) {<br class="">+    // Remember the thread ID that caused the resume so we can set the<br class="">+    // "threadCausedFocus" boolean value in the "stopped" events.<br class="">+    g_vsc.focus_tid = thread.GetThreadID();<br class="">+    thread.StepOut();<br class="">+  } else {<br class="">+    response.try_emplace("success", false);<br class="">+  }<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "ThreadsRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Thread request; value of command field is 'threads'. The<br class="">+//     request retrieves a list of all threads.", "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "threads" ]<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command" ]<br class="">+//   }]<br class="">+// },<br class="">+// "ThreadsResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'threads' request.",<br class="">+//     "properties": {<br class="">+//       "body": {<br class="">+//         "type": "object",<br class="">+//         "properties": {<br class="">+//           "threads": {<br class="">+//             "type": "array",<br class="">+//             "items": {<br class="">+//               "$ref": "#/definitions/Thread"<br class="">+//             },<br class="">+//             "description": "All threads."<br class="">+//           }<br class="">+//         },<br class="">+//         "required": [ "threads" ]<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "body" ]<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_threads(const llvm::json::Object &request) {<br class="">+<br class="">+  lldb::SBProcess process = g_vsc.target.GetProcess();<br class="">+  llvm::json::Object response;<br class="">+  FillResponse(request, response);<br class="">+<br class="">+  const uint32_t num_threads = process.GetNumThreads();<br class="">+  llvm::json::Array threads;<br class="">+  for (uint32_t thread_idx = 0; thread_idx < num_threads; ++thread_idx) {<br class="">+    lldb::SBThread thread = process.GetThreadAtIndex(thread_idx);<br class="">+    threads.emplace_back(CreateThread(thread));<br class="">+  }<br class="">+  if (threads.size() == 0) {<br class="">+    response.try_emplace("success", false);<br class="">+  }<br class="">+  llvm::json::Object body;<br class="">+  body.try_emplace("threads", std::move(threads));<br class="">+  response.try_emplace("body", std::move(body));<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "SetVariableRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "setVariable request; value of command field is<br class="">+//     'setVariable'. Set the variable with the given name in the variable<br class="">+//     container to a new value.", "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "setVariable" ]<br class="">+//       },<br class="">+//       "arguments": {<br class="">+//         "$ref": "#/definitions/SetVariableArguments"<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command", "arguments"  ]<br class="">+//   }]<br class="">+// },<br class="">+// "SetVariableArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'setVariable' request.",<br class="">+//   "properties": {<br class="">+//     "variablesReference": {<br class="">+//       "type": "integer",<br class="">+//       "description": "The reference of the variable container."<br class="">+//     },<br class="">+//     "name": {<br class="">+//       "type": "string",<br class="">+//       "description": "The name of the variable."<br class="">+//     },<br class="">+//     "value": {<br class="">+//       "type": "string",<br class="">+//       "description": "The value of the variable."<br class="">+//     },<br class="">+//     "format": {<br class="">+//       "$ref": "#/definitions/ValueFormat",<br class="">+//       "description": "Specifies details on how to format the response value."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "variablesReference", "name", "value" ]<br class="">+// },<br class="">+// "SetVariableResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'setVariable' request.",<br class="">+//     "properties": {<br class="">+//       "body": {<br class="">+//         "type": "object",<br class="">+//         "properties": {<br class="">+//           "value": {<br class="">+//             "type": "string",<br class="">+//             "description": "The new value of the variable."<br class="">+//           },<br class="">+//           "type": {<br class="">+//             "type": "string",<br class="">+//             "description": "The type of the new value. Typically shown in the<br class="">+//             UI when hovering over the value."<br class="">+//           },<br class="">+//           "variablesReference": {<br class="">+//             "type": "number",<br class="">+//             "description": "If variablesReference is > 0, the new value is<br class="">+//             structured and its children can be retrieved by passing<br class="">+//             variablesReference to the VariablesRequest."<br class="">+//           },<br class="">+//           "namedVariables": {<br class="">+//             "type": "number",<br class="">+//             "description": "The number of named child variables. The client<br class="">+//             can use this optional information to present the variables in a<br class="">+//             paged UI and fetch them in chunks."<br class="">+//           },<br class="">+//           "indexedVariables": {<br class="">+//             "type": "number",<br class="">+//             "description": "The number of indexed child variables. The client<br class="">+//             can use this optional information to present the variables in a<br class="">+//             paged UI and fetch them in chunks."<br class="">+//           }<br class="">+//         },<br class="">+//         "required": [ "value" ]<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "body" ]<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_setVariable(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  FillResponse(request, response);<br class="">+  llvm::json::Array variables;<br class="">+  llvm::json::Object body;<br class="">+  auto arguments = request.getObject("arguments");<br class="">+  // This is a reference to the containing variable/scope<br class="">+  const auto variablesReference =<br class="">+      GetUnsigned(arguments, "variablesReference", 0);<br class="">+  const auto name = GetString(arguments, "name");<br class="">+  const auto value = GetString(arguments, "value");<br class="">+  // Set success to false just in case we don't find the variable by name<br class="">+  response.try_emplace("success", false);<br class="">+<br class="">+  lldb::SBValue variable;<br class="">+  int64_t newVariablesReference = 0;<br class="">+<br class="">+  // The "id" is the unique integer ID that is unique within the enclosing<br class="">+  // variablesReference. It is optionally added to any "interface Variable"<br class="">+  // objects to uniquely identify a variable within an enclosing<br class="">+  // variablesReference. It helps to disambiguate between two variables that<br class="">+  // have the same name within the same scope since the "setVariables" request<br class="">+  // only specifies the variable reference of the enclosing scope/variable, and<br class="">+  // the name of the variable. We could have two shadowed variables with the<br class="">+  // same name in "Locals" or "Globals". In our case the "id" absolute index<br class="">+  // of the variable within the the g_vsc.variables list.<br class="">+  const auto id_value = GetUnsigned(arguments, "id", UINT64_MAX);<br class="">+  if (id_value != UINT64_MAX) {<br class="">+    variable = g_vsc.variables.GetValueAtIndex(id_value);<br class="">+  } else if (VARREF_IS_SCOPE(variablesReference)) {<br class="">+    // variablesReference is one of our scopes, not an actual variable it is<br class="">+    // asking for a variable inlocals or globals or registers<br class="">+    int64_t start_idx = 0;<br class="">+    int64_t end_idx = 0;<br class="">+    switch (variablesReference) {<br class="">+    case VARREF_LOCALS:<br class="">+      start_idx = 0;<br class="">+      end_idx = start_idx + g_vsc.num_locals;<br class="">+      break;<br class="">+    case VARREF_GLOBALS:<br class="">+      start_idx = g_vsc.num_locals;<br class="">+      end_idx = start_idx + g_vsc.num_globals;<br class="">+      break;<br class="">+    case VARREF_REGS:<br class="">+      start_idx = g_vsc.num_locals + g_vsc.num_globals;<br class="">+      end_idx = start_idx + g_vsc.num_regs;<br class="">+      break;<br class="">+    default:<br class="">+      break;<br class="">+    }<br class="">+<br class="">+    // Find the variable by name in the correct scope and hope we don't have<br class="">+    // multiple variables with the same name. We search backwards because<br class="">+    // the list of variables has the top most variables first and variables<br class="">+    // in deeper scopes are last. This means we will catch the deepest<br class="">+    // variable whose name matches which is probably what the user wants.<br class="">+    for (int64_t i = end_idx - 1; i >= start_idx; --i) {<br class="">+      auto curr_variable = g_vsc.variables.GetValueAtIndex(i);<br class="">+      llvm::StringRef variable_name(curr_variable.GetName());<br class="">+      if (variable_name == name) {<br class="">+        variable = curr_variable;<br class="">+        if (curr_variable.MightHaveChildren())<br class="">+          newVariablesReference = i;<br class="">+        break;<br class="">+      }<br class="">+    }<br class="">+  } else {<br class="">+    // We have a named item within an actual variable so we need to find it<br class="">+    // withing the container variable by name.<br class="">+    const int64_t var_idx = VARREF_TO_VARIDX(variablesReference);<br class="">+    lldb::SBValue container = g_vsc.variables.GetValueAtIndex(var_idx);<br class="">+    variable = container.GetChildMemberWithName(name.data());<br class="">+    if (!variable.IsValid()) {<br class="">+      if (name.startswith("[")) {<br class="">+        llvm::StringRef index_str(name.drop_front(1));<br class="">+        uint64_t index = 0;<br class="">+        if (!index_str.consumeInteger(0, index)) {<br class="">+          if (index_str == "]")<br class="">+            variable = container.GetChildAtIndex(index);<br class="">+        }<br class="">+      }<br class="">+    }<br class="">+<br class="">+    // We don't know the index of the variable in our g_vsc.variables<br class="">+    if (variable.IsValid()) {<br class="">+      if (variable.MightHaveChildren()) {<br class="">+        newVariablesReference = VARIDX_TO_VARREF(g_vsc.variables.GetSize());<br class="">+        g_vsc.variables.Append(variable);<br class="">+      }<br class="">+    }<br class="">+  }<br class="">+<br class="">+  if (variable.IsValid()) {<br class="">+    lldb::SBError error;<br class="">+    bool success = variable.SetValueFromCString(value.data(), error);<br class="">+    if (success) {<br class="">+      SetValueForKey(variable, body, "value");<br class="">+      body.try_emplace("type", variable.GetType().GetDisplayTypeName());<br class="">+      body.try_emplace("variablesReference", newVariablesReference);<br class="">+    } else {<br class="">+      body.try_emplace("message", std::string(error.GetCString()));<br class="">+    }<br class="">+    response.try_emplace("success", success);<br class="">+  }<br class="">+<br class="">+  response.try_emplace("body", std::move(body));<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+//----------------------------------------------------------------------<br class="">+// "VariablesRequest": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Request" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Variables request; value of command field is 'variables'.<br class="">+//     Retrieves all child variables for the given variable reference. An<br class="">+//     optional filter can be used to limit the fetched children to either named<br class="">+//     or indexed children.", "properties": {<br class="">+//       "command": {<br class="">+//         "type": "string",<br class="">+//         "enum": [ "variables" ]<br class="">+//       },<br class="">+//       "arguments": {<br class="">+//         "$ref": "#/definitions/VariablesArguments"<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "command", "arguments"  ]<br class="">+//   }]<br class="">+// },<br class="">+// "VariablesArguments": {<br class="">+//   "type": "object",<br class="">+//   "description": "Arguments for 'variables' request.",<br class="">+//   "properties": {<br class="">+//     "variablesReference": {<br class="">+//       "type": "integer",<br class="">+//       "description": "The Variable reference."<br class="">+//     },<br class="">+//     "filter": {<br class="">+//       "type": "string",<br class="">+//       "enum": [ "indexed", "named" ],<br class="">+//       "description": "Optional filter to limit the child variables to either<br class="">+//       named or indexed. If ommited, both types are fetched."<br class="">+//     },<br class="">+//     "start": {<br class="">+//       "type": "integer",<br class="">+//       "description": "The index of the first variable to return; if omitted<br class="">+//       children start at 0."<br class="">+//     },<br class="">+//     "count": {<br class="">+//       "type": "integer",<br class="">+//       "description": "The number of variables to return. If count is missing<br class="">+//       or 0, all variables are returned."<br class="">+//     },<br class="">+//     "format": {<br class="">+//       "$ref": "#/definitions/ValueFormat",<br class="">+//       "description": "Specifies details on how to format the Variable<br class="">+//       values."<br class="">+//     }<br class="">+//   },<br class="">+//   "required": [ "variablesReference" ]<br class="">+// },<br class="">+// "VariablesResponse": {<br class="">+//   "allOf": [ { "$ref": "#/definitions/Response" }, {<br class="">+//     "type": "object",<br class="">+//     "description": "Response to 'variables' request.",<br class="">+//     "properties": {<br class="">+//       "body": {<br class="">+//         "type": "object",<br class="">+//         "properties": {<br class="">+//           "variables": {<br class="">+//             "type": "array",<br class="">+//             "items": {<br class="">+//               "$ref": "#/definitions/Variable"<br class="">+//             },<br class="">+//             "description": "All (or a range) of variables for the given<br class="">+//             variable reference."<br class="">+//           }<br class="">+//         },<br class="">+//         "required": [ "variables" ]<br class="">+//       }<br class="">+//     },<br class="">+//     "required": [ "body" ]<br class="">+//   }]<br class="">+// }<br class="">+//----------------------------------------------------------------------<br class="">+void request_variables(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  FillResponse(request, response);<br class="">+  llvm::json::Array variables;<br class="">+  auto arguments = request.getObject("arguments");<br class="">+  const auto variablesReference =<br class="">+      GetUnsigned(arguments, "variablesReference", 0);<br class="">+  const int64_t start = GetSigned(arguments, "start", 0);<br class="">+  const int64_t count = GetSigned(arguments, "count", 0);<br class="">+  bool hex = false;<br class="">+  auto format = arguments->getObject("format");<br class="">+  if (format)<br class="">+    hex = GetBoolean(format, "hex", false);<br class="">+<br class="">+  if (VARREF_IS_SCOPE(variablesReference)) {<br class="">+    // variablesReference is one of our scopes, not an actual variable it is<br class="">+    // asking for the list of args, locals or globals.<br class="">+    int64_t start_idx = 0;<br class="">+    int64_t num_children = 0;<br class="">+    switch (variablesReference) {<br class="">+    case VARREF_LOCALS:<br class="">+      start_idx = start;<br class="">+      num_children = g_vsc.num_locals;<br class="">+      break;<br class="">+    case VARREF_GLOBALS:<br class="">+      start_idx = start + g_vsc.num_locals + start;<br class="">+      num_children = g_vsc.num_globals;<br class="">+      break;<br class="">+    case VARREF_REGS:<br class="">+      start_idx = start + g_vsc.num_locals + g_vsc.num_globals;<br class="">+      num_children = g_vsc.num_regs;<br class="">+      break;<br class="">+    default:<br class="">+      break;<br class="">+    }<br class="">+    const int64_t end_idx = start_idx + ((count == 0) ? num_children : count);<br class="">+    for (auto i = start_idx; i < end_idx; ++i) {<br class="">+      lldb::SBValue variable = g_vsc.variables.GetValueAtIndex(i);<br class="">+      if (!variable.IsValid())<br class="">+        break;<br class="">+      variables.emplace_back(<br class="">+          CreateVariable(variable, VARIDX_TO_VARREF(i), i, hex));<br class="">+    }<br class="">+  } else {<br class="">+    // We are expanding a variable that has children, so we will return its<br class="">+    // children.<br class="">+    const int64_t var_idx = VARREF_TO_VARIDX(variablesReference);<br class="">+    lldb::SBValue variable = g_vsc.variables.GetValueAtIndex(var_idx);<br class="">+    if (variable.IsValid()) {<br class="">+      const auto num_children = variable.GetNumChildren();<br class="">+      const int64_t end_idx = start + ((count == 0) ? num_children : count);<br class="">+      for (auto i = start; i < end_idx; ++i) {<br class="">+        lldb::SBValue child = variable.GetChildAtIndex(i);<br class="">+        if (!child.IsValid())<br class="">+          break;<br class="">+        if (child.MightHaveChildren()) {<br class="">+          const int64_t var_idx = g_vsc.variables.GetSize();<br class="">+          auto childVariablesReferences = VARIDX_TO_VARREF(var_idx);<br class="">+          variables.emplace_back(<br class="">+              CreateVariable(child, childVariablesReferences, var_idx, hex));<br class="">+          g_vsc.variables.Append(child);<br class="">+        } else {<br class="">+          variables.emplace_back(CreateVariable(child, 0, INT64_MAX, hex));<br class="">+        }<br class="">+      }<br class="">+    }<br class="">+  }<br class="">+  llvm::json::Object body;<br class="">+  body.try_emplace("variables", std::move(variables));<br class="">+  response.try_emplace("body", std::move(body));<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+// A request used in testing to get the details on all breakpoints that are<br class="">+// currently set in the target. This helps us to test "setBreakpoints" and<br class="">+// "setFunctionBreakpoints" requests to verify we have the correct set of<br class="">+// breakpoints currently set in LLDB.<br class="">+void request__testGetTargetBreakpoints(const llvm::json::Object &request) {<br class="">+  llvm::json::Object response;<br class="">+  FillResponse(request, response);<br class="">+  llvm::json::Array response_breakpoints;<br class="">+  for (uint32_t i = 0; g_vsc.target.GetBreakpointAtIndex(i).IsValid(); ++i) {<br class="">+    auto bp = g_vsc.target.GetBreakpointAtIndex(i);<br class="">+    AppendBreakpoint(bp, response_breakpoints);<br class="">+  }<br class="">+  llvm::json::Object body;<br class="">+  body.try_emplace("breakpoints", std::move(response_breakpoints));<br class="">+  response.try_emplace("body", std::move(body));<br class="">+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));<br class="">+}<br class="">+<br class="">+const std::map<std::string, RequestCallback> &GetRequestHandlers() {<br class="">+#define REQUEST_CALLBACK(name)                                                 \<br class="">+  { #name, request_##name }<br class="">+  static std::map<std::string, RequestCallback> g_request_handlers = {<br class="">+      // VSCode Debug Adaptor requests<br class="">+      REQUEST_CALLBACK(attach),<br class="">+      REQUEST_CALLBACK(continue),<br class="">+      REQUEST_CALLBACK(configurationDone),<br class="">+      REQUEST_CALLBACK(disconnect),<br class="">+      REQUEST_CALLBACK(evaluate),<br class="">+      REQUEST_CALLBACK(exceptionInfo),<br class="">+      REQUEST_CALLBACK(initialize),<br class="">+      REQUEST_CALLBACK(launch),<br class="">+      REQUEST_CALLBACK(next),<br class="">+      REQUEST_CALLBACK(pause),<br class="">+      REQUEST_CALLBACK(scopes),<br class="">+      REQUEST_CALLBACK(setBreakpoints),<br class="">+      REQUEST_CALLBACK(setExceptionBreakpoints),<br class="">+      REQUEST_CALLBACK(setFunctionBreakpoints),<br class="">+      REQUEST_CALLBACK(setVariable),<br class="">+      REQUEST_CALLBACK(source),<br class="">+      REQUEST_CALLBACK(stackTrace),<br class="">+      REQUEST_CALLBACK(stepIn),<br class="">+      REQUEST_CALLBACK(stepOut),<br class="">+      REQUEST_CALLBACK(threads),<br class="">+      REQUEST_CALLBACK(variables),<br class="">+      // Testing requests<br class="">+      REQUEST_CALLBACK(_testGetTargetBreakpoints),<br class="">+  };<br class="">+#undef REQUEST_CALLBACK<br class="">+  return g_request_handlers;<br class="">+}<br class="">+  <br class="">+} // anonymous namespace<br class="">+<br class="">+int main(int argc, char *argv[]) {<br class="">+<br class="">+  // Initialize LLDB first before we do anything.<br class="">+  lldb::SBDebugger::Initialize();<br class="">+<br class="">+  if (argc == 2) {<br class="">+    const char *arg = argv[1];<br class="">+#if !defined(_WIN32)<br class="">+    if (strcmp(arg, "-g") == 0) {<br class="">+      printf("Paused waiting for debugger to attach (pid = %i)...\n", getpid());<br class="">+      pause();<br class="">+    } else {<br class="">+#else<br class="">+    {<br class="">+#endif<br class="">+      int portno = atoi(arg);<br class="">+      printf("Listening on port %i...\n", portno);<br class="">+      int socket_fd = AcceptConnection(portno);<br class="">+      if (socket_fd >= 0) {<br class="">+        // We must open two FILE objects, one for reading and one for writing<br class="">+        // the FILE objects have a mutex in them that won't allow reading and<br class="">+        // writing to the socket stream.<br class="">+        g_vsc.in = fdopen(socket_fd, "r");<br class="">+        g_vsc.out = fdopen(socket_fd, "w");<br class="">+        if (g_vsc.in == nullptr || g_vsc.out == nullptr) {<br class="">+          if (g_vsc.log)<br class="">+            *g_vsc.log << "fdopen failed (" << strerror(errno) << ")"<br class="">+                       << std::endl;<br class="">+          exit(1);<br class="">+        }<br class="">+      } else {<br class="">+        exit(1);<br class="">+      }<br class="">+    }<br class="">+  }<br class="">+  auto request_handlers = GetRequestHandlers();<br class="">+  uint32_t packet_idx = 0;<br class="">+  while (true) {<br class="">+    std::string json = g_vsc.ReadJSON();<br class="">+    if (json.empty())<br class="">+      break;<br class="">+<br class="">+    llvm::StringRef json_sref(json);<br class="">+    llvm::Expected<llvm::json::Value> json_value = llvm::json::parse(json_sref);<br class="">+    if (!json_value) {<br class="">+      auto error = json_value.takeError();<br class="">+      if (g_vsc.log) {<br class="">+        std::string error_str;<br class="">+        llvm::raw_string_ostream strm(error_str);<br class="">+        strm << error;<br class="">+        strm.flush();<br class="">+<br class="">+        *g_vsc.log << "error: failed to parse JSON: " << error_str << std::endl<br class="">+                   << json << std::endl;<br class="">+      }<br class="">+      return 1;<br class="">+    }<br class="">+<br class="">+    auto object = json_value->getAsObject();<br class="">+    if (!object) {<br class="">+      if (g_vsc.log)<br class="">+        *g_vsc.log << "error: json packet isn't a object" << std::endl;<br class="">+      return 1;<br class="">+    }<br class="">+<br class="">+    const auto packet_type = GetString(object, "type");<br class="">+    if (packet_type == "request") {<br class="">+      const auto command = GetString(object, "command");<br class="">+      auto handler_pos = request_handlers.find(command);<br class="">+      if (handler_pos != request_handlers.end()) {<br class="">+        handler_pos->second(*object);<br class="">+      } else {<br class="">+        if (g_vsc.log)<br class="">+          *g_vsc.log << "error: unhandled command \"" << command.data() << std::endl;<br class="">+        return 1;<br class="">+      }<br class="">+    }<br class="">+    ++packet_idx;<br class="">+  }<br class="">+<br class="">+  // We must terminate the debugger in a thread before the C++ destructor<br class="">+  // chain messes everything up.<br class="">+  lldb::SBDebugger::Terminate();<br class="">+  return 0;<br class="">+}<br class=""><br class="">Added: lldb/trunk/tools/lldb-vscode/package.json<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/package.json?rev=339911&view=auto" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/package.json?rev=339911&view=auto</a><br class="">==============================================================================<br class="">--- lldb/trunk/tools/lldb-vscode/package.json (added)<br class="">+++ lldb/trunk/tools/lldb-vscode/package.json Thu Aug 16 10:59:38 2018<br class="">@@ -0,0 +1,242 @@<br class="">+{<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span>"name": "lldb-vscode",<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span>"displayName": "LLDB native Debug stub",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span>"version": "0.1.0",<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span>"publisher": "<a href="http://llvm.org/" class="">llvm.org</a>",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span>"description": "Debug adapter for LLDB which uses a C++ tool to interface directly with LLDB.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span>"author": {<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>"name": "Greg Clayton",<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span>"email": "<a href="mailto:clayborg@gmail.com" class="">clayborg@gmail.com</a>"<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span>"license": "LLVM",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span>"keywords": [<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>"multi-root ready"<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span>],<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span>"engines": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>"vscode": "^1.18.0",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>"node": "^7.9.0"<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span>"icon": "images/lldb.png",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span>"categories": [<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>"Debuggers"<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span>],<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span>"private": true,<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span>"devDependencies": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>"@types/node": "7.0.43",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>"@types/mocha": "2.2.45",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>"typescript": "2.6.2",<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"mocha": "4.0.1",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>"vscode": "1.1.10",<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span>"vscode-debugadapter-testsupport": "1.25.0",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>"tslint": "5.8.0",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span>"vsce": "1.35.0"<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span>"contributes": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"debuggers": [<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>{<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "lldb-vscode",<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"label": "Native LLDB Debugger",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"enableBreakpointsFor": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"languageIds": [<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"ada",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"arm",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"asm",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"c",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"cpp",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"crystal",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"d",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"fortan",<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"fortran-modern",<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"nim",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"objective-c",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"objectpascal",<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"pascal",<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"rust",<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"swift"<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>]<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"program": "./bin/lldb-vscode",<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"configurationAttributes": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"launch": {<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"required": [<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"program"<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>],<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"properties": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"program": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "string",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Path to the program to debug."<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"args": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": [ "array", "string" ],<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Program arguments.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": []<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"cwd": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "string",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Program working directory.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": "${workspaceRoot}"<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"env": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "array",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Additional environment variables.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": []<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"stopOnEntry": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "boolean",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Automatically stop after launch.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": false<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"disableASLR": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "boolean",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Enable or disable Address space layout randomization if the debugger supports it.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": true<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"disableSTDIO": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "boolean",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Don't retrieve STDIN, STDOUT and STDERR as the program is running.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": false<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"shellExpandArguments": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "boolean",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Expand program arguments as a shell would without actually launching the program in a shell.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": false<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"detachOnError": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "boolean",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Detach from the program.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": false<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"trace": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "boolean",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Enable logging of the Debug Adapter Protocol.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": true<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"sourcePath": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "string",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Specify a source path to remap \"./\" to allow full paths to be used when setting breakpoints in binaries that have relative source paths."<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"sourceMap": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "array",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Specify an array of path remappings; each element must itself be a two element array containing a source and desination pathname. Overrides sourcePath.",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": []<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"debuggerRoot": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "string",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Specify a working directory to set the debug adaptor to so relative object files can be located."<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"initCommands": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "array",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Initialization commands executed upon debugger startup.",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": []<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"preRunCommands": {<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "array",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Commands executed just before the program is launched.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": []<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"stopCommands": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "array",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Commands executed each time the program stops.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": []<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"exitCommands": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "array",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Commands executed at the end of debugging session.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": []<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>}<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>}<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"attach": {<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"properties": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"program": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "string",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Path to the program to attach to."<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"pid": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": [<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"number",<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"string"<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>],<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "System process ID to attach to."<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"waitFor": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "boolean",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "If set to true, then wait for the process to launch by looking for a process with a basename that matches `program`. No process ID needs to be specified when using this flag.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": true<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"trace": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "boolean",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Enable logging of the Debug Adapter Protocol.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": true<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"sourcePath": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "string",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Specify a source path to remap \"./\" to allow full paths to be used when setting breakpoints in binaries that have relative source paths."<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"sourceMap": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "array",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Specify an array of path remappings; each element must itself be a two element array containing a source and desination pathname. Overrides sourcePath.",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": []<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"debuggerRoot": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "string",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Specify a working directory to set the debug adaptor to so relative object files can be located."<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"attachCommands": {<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "array",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Custom commands that are executed instead of attaching to a process ID or to a process by name. These commands may optionally create a new target and must perform an attach. A valid process must exist after these commands complete or the \"attach\" will fail.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": []<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"initCommands": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "array",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Initialization commands executed upon debugger startup.",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": []<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"preRunCommands": {<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "array",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Commands executed just before the program is attached to.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": []<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"stopCommands": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "array",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Commands executed each time the program stops.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": []<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"exitCommands": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "array",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "Commands executed at the end of debugging session.",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"default": []<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>}<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>}<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>}<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>},<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"initialConfigurations": [<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>{<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "lldb-vscode",<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"request": "launch",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"name": "Debug",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"program": "${workspaceRoot}/<your program>",<br class="">+<span class="Apple-tab-span" style="white-space:pre">       </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"args": [],<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"env": [],<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"cwd": "${workspaceRoot}"<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>}<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>],<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"configurationSnippets": [<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>{<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"label": "LLDB: Launch",<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"description": "",<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"body": {<br class="">+<span class="Apple-tab-span" style="white-space:pre">   </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"type": "lldb-vscode",<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"request": "launch",<br class="">+<span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"name": "${2:Launch}",<br class="">+<span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"program": "^\"\\${workspaceRoot}/${1:<your program>}\"",<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"args": [],<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"env": [],<br class="">+<span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>"cwd": "^\"\\${workspaceRoot}\""<br class="">+<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>}<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>}<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>]<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="white-space:pre">    </span>}<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span><span class="Apple-tab-span" style="white-space:pre">    </span>]<br class="">+<span class="Apple-tab-span" style="white-space:pre">     </span>}<br class="">+}<br class=""><br class=""><br class="">_______________________________________________<br class="">lldb-commits mailing list<br class=""><a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br class=""></div></div></blockquote></div><br class=""></div>_______________________________________________<br class="">lldb-commits mailing list<br class=""><a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br class=""></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div></body></html>